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: sport3497 (1034)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/pip/_internal/utils/__pycache__/urls.cpython-310.pyc
o

��hA�@sTddlZddlZddlZddlZddlmZdedefdd�Zdedefd	d
�Z	dS)�N�)�WINDOWS�path�returncCs.tj�tj�|��}tj�dtj�|��}|S)zh
    Convert a path to a file: URL.  The path will be made absolute and have
    quoted path parts.
    zfile://)	�osr�normpath�abspath�urllib�parse�urljoin�request�pathname2url)r�url�r�C/usr/local/lib/python3.10/dist-packages/pip/_internal/utils/urls.py�path_to_url	srrcCs�|�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.
    zfile:z1You can only turn file: urls into filenames (not �)�	localhost�z\\z8non-local file URIs are not supported on this platform: �r�/r��)�:z:/N)�
startswithr	r
�urlsplitr�
ValueErrorr�url2pathname�len�string�
ascii_letters)r�_�netlocrrrr�url_to_paths0�
�
���r#)
rr�urllib.parser	�urllib.request�compatr�strrr#rrrr�<module>s