HEX
Server: Apache
System: Linux insrv.serversdaddy.com 5.14.0-362.24.2.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Mar 30 14:11:54 EDT 2024 x86_64
User: jsaha (1066)
PHP: 8.3.6
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3.9/site-packages/pip/_internal/utils/__pycache__/urls.cpython-39.pyc
a

g��e�@sTddlZddlZddlZddlZddlmZddlmZdd�Z	dd�Z
d	d
�ZdS)�N)�Optional�)�WINDOWScCs d|vrdS|�dd�d��S)N�:rr)�split�lower)�url�r	�</usr/lib/python3.9/site-packages/pip/_internal/utils/urls.py�get_url_scheme
srcCs.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:)	�os�path�normpath�abspath�urllib�parse�urljoin�requestZpathname2url)rrr	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.
    rz1You 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�_�netlocrr	r	r
�url_to_paths8�
�
���
�
���r$)r
r �urllib.parserZurllib.request�typingr�compatrrrr$r	r	r	r
�<module>s