R`i r d dl Z d dlZd dlZd dlZd dlmZ ddlmZ de dee fdZ
de de fd Zde de fd
Zy) N)Optional )WINDOWSurlreturnc R d| vry | j dd d j S )N:r r )splitlower)r s /builddir/build/BUILDROOT/alt-python312-pip-23.3.1-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_internal/utils/urls.pyget_url_schemer
s+
#~99S!Q%%'' pathc t j j t j j | } t j
j
dt j j | }|S )zh
Convert a path to a file: URL. The path will be made absolute and have
quoted path parts.
file:) osr normpathabspathurllibparseurljoinrequestpathname2url)r r s r path_to_urlr sO
77BGGOOD12D
,,
w(C(CD(I
JCJr c | j d sJ d| d t j j | \ }}}}}|r|dk( rd}nt rd|z }nt d| t j j ||z }t r9|s7t | dk\ r)|d d
k( r!|d t j v r|dd
dv r|dd }|S )z(
Convert a file: URL to a path.
r z1You can only turn file: urls into filenames (not ) localhost z\\z8non-local file URIs are not supported on this platform: r /r )r z:/N)
startswithr r urlsplitr
ValueErrorr url2pathnamelenstring
ascii_letters)r _netlocr s r url_to_pathr, s >> D :3'CD #LL11#6AvtQV{* &FsgN
>>&&v}5D INGsNGv+++1I$ABxKr )
r r( urllib.parser urllib.requesttypingr compatr strr
r r, r r