Current File : //lib/python3.9/site-packages/pip/_internal/utils/__pycache__/urls.cpython-39.pyc
a

[��f��@spddlZddlZddlZddlZddlmZddlmZe	ee	d�dd�Z
e	e	d�d	d
�Ze	e	d�dd�ZdS)
�N)�Optional�)�WINDOWS)�url�returncCs d|vrdS|�dd�d��S)N�:rr)�split�lower)r�r
�</usr/lib/python3.9/site-packages/pip/_internal/utils/urls.py�get_url_scheme
sr)�pathrcCs.tj�tj�|��}tj�dtj�|��}|S)zh
    Convert a path to a file: URL.  The path will be made absolute and have
    quoted path parts.
    �file:)	�osr
�normpath�abspath�urllib�parse�urljoin�requestZpathname2url)r
rr
r
r�path_to_urlsrcCs�|�d�sJd|�d���tj�|�\}}}}}|r<|dkrBd}ntrPd|}ntd|����tj�||�}tr�|s�t|�dkr�|d	d
kr�|dt	j
vr�|dd
�dvr�|dd�}|S)z(
    Convert a file: URL to a path.
    rz1You can only turn file: urls into filenames (not �)Z	localhost�z\\z8non-local file URIs are not supported on this platform: �r�/r��)rz:/N)�
startswithrr�urlsplitr�
ValueErrorrZurl2pathname�len�string�
ascii_letters)r�_�netlocr
r
r
r�url_to_paths8�
�
���
�
���r%)
rr!�urllib.parserZurllib.request�typingr�compatr�strrrr%r
r
r
r�<module>s