HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/pip/_internal/utils/__pycache__/urls.cpython-310.pyc
o

!��h��@svddlZddlZddlZddlZddlmZddlmZde	dee	fdd�Z
d	e	de	fd
d�Zde	de	fdd
�ZdS)�N)�Optional�)�WINDOWS�url�returncCs d|vrdS|�dd�d��S)N�:rr)�split�lower)r�r
�:/usr/lib/python3/dist-packages/pip/_internal/utils/urls.py�get_url_scheme
sr�pathcCs.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�request�pathname2url)r
rr
r
r�path_to_urlsrcCs�|�d�s
Jd|�d���tj�|�\}}}}}|r|dkr!d}ntr(d|}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 �)�	localhost�z\\z8non-local file URIs are not supported on this platform: �r�/r��)rz:/N)�
startswithrr�urlsplitr�
ValueErrorr�url2pathname�len�string�
ascii_letters)r�_�netlocr
r
r
r�url_to_paths0�
�
���r()
rr$�urllib.parser�urllib.request�typingr�compatr�strrrr(r
r
r
r�<module>s