Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/__pycache__/urls.cpython-35.pyc



t_@sddlZddlZddlmZddlmZddlmZerjddl	m
Z
mZmZddZ
dd	Zd
dZdS)N)parse)request)MYPY_CHECK_RUNNING)OptionalTextUnioncCs*d|krdS|jdddjS)N:r)splitlower)urlr
/builddir/build/BUILDROOT/alt-python35-pip-20.2.4-1.el7.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/urls.pyget_url_scheme
srcCs=tjjtjj|}tjdtj|}|S)zh
    Convert a path to a file: URL.  The path will be made absolute and have
    quoted path parts.
    zfile:)ospathnormpathabspathurllib_parseurljoinurllib_requestpathname2url)rrr
r
rpath_to_urlsrcCs|jds'tdjttj|\}}}}}|sX|dkrad}n4tjdkr}d|}ntdjtt	j
||}|S)z(
    Convert a file: URL to a path.
    zfile:z9You can only turn file: urls into filenames (not {url!r})	localhostwin32z\\z?non-local file URIs are not supported on this platform: {url!r})
startswithAssertionErrorformatlocalsrurlsplitsysplatform
ValueErrorrurl2pathname)r_netlocrr
r
rurl_to_paths	
r')rr!Zpip._vendor.six.moves.urllibrrrrpip._internal.utils.typingrtypingrrrrrr'r
r
r
r<module>s
Back to Directory File Manager