AlkantarClanX12

Your IP : 18.119.122.69


Current Path : /opt/alt/python310/lib64/python3.10/urllib/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/urllib/__pycache__/parse.cpython-310.opt-2.pyc

o

6��f
��@s	ddlZddlZddlZddlZddlZgd�Zgd�Zgd�Zgd�Zgd�Z	gd�Z
gd�Zd	Zd
Z
gd�ZdZiZd
d�ZdZdZdd�Zeefdd�Zeefdd�Zdd�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd �d ee�ZGd!d"�d"ee�Zdd#lmZed$d%�Zed&d'�Z ed(d)�Z!d*e_"d+ej#_"d,ej$_"d-e _"d.e j%_"d/e j&_"d0e j'_"d1e j(_"d2e j$_"d3e!_"e j%j"e!j%_"e j&j"e!j&_"e j'j"e!j'_"d4e!j)_"e j(j"e!j(_"e j$j"e!j$_"eZ*Gd5d$�d$ee�Z+Gd6d&�d&e e�Z,Gd7d(�d(e!e�Z-Gd8d9�d9ee�Z.Gd:d;�d;e e�Z/Gd<d=�d=e!e�Z0d>d?�Z1e1�[1d�dBdC�Z2dDdE�Z3d�dFdG�Z4dHdI�Z5d�dJdK�Z6dLdM�Z7dNdO�Z8d�dPdQ�Z9dRdS�Z:dTZ;da<dUdV�Z=e�>dW�Z?d�dZd[�Z@	\	]d�d^d_�ZA	\	]d�d`da�ZBd�dbdc�ZCeDdd�ZEeFeE�ZGiZHGdedf�dfejI�ZJd�dhdi�ZKd�djdk�ZLd�dldm�ZMd\d@ddeLfdndo�ZNdpdq�ZOdrds�ZPdtdu�ZQdvdw�ZRdaSdxdy�ZTdzd{�ZUdaVd|d}�ZWd~d�ZXd�d��ZYd�d��ZZd�d��Z[d�d��Z\da]d�d��Z^d�d�d��Z_d�d�d��Z`d�d��Zad�d��Zbd�d��Zcd�d��Zdd�d��Zed�d��Zfd�d��Zgd�d��ZhdS)��N)�urlparse�
urlunparse�urljoin�	urldefrag�urlsplit�
urlunsplit�	urlencode�parse_qs�	parse_qsl�quote�
quote_plus�quote_from_bytes�unquote�unquote_plus�unquote_to_bytes�DefragResult�ParseResult�SplitResult�DefragResultBytes�ParseResultBytes�SplitResultBytes)��ftp�http�gopher�nntp�imap�wais�file�https�shttp�mms�prospero�rtsp�rtspu�sftp�svn�svn+ssh�ws�wss)rrrrr�telnetrrrr!rr �snewsr"r#r$Zrsyncr&r'r%ZnfsZgitzgit+sshr(r))rr�hdlr"rrrr r#r$�sip�sipsr!r%Ztel)
rr,Zmailto�newsr*rrr+r-r.)rrrrrr r!rr#r$r-r.)
rrr,rrr/rrrr r+rr"zAabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-.z!	

 )�	�
�
�cCs	t��t��dS�N)�_parse_cache�clear�
_safe_quoters�r8r8�3/opt/alt/python310/lib64/python3.10/urllib/parse.py�clear_cache`sr:�ascii�strictcCs|Sr4r8)�objr8r8r9�_nooposr>cCs|�||�Sr4��encode)r=�encoding�errorsr8r8r9�_encode_resultrsrCcst��fdd�|D��S)Nc3s$�|]
}|r|����ndVqdS)rN��decode��.0�x�rArBr8r9�	<genexpr>xs�"z_decode_args.<locals>.<genexpr>)�tuple)�argsrArBr8rIr9�_decode_argsvsrMcGsVt|dt�}|dd�D]}|rt|t�|krtd��q
|r$|tfSt|�tfS)Nr�z$Cannot mix str and non-str arguments)�
isinstance�str�	TypeErrorr>rMrC)rLZ	str_input�argr8r8r9�_coerce_argszs�
rSc@�eZdZ	dZddd�ZdS)�_ResultMixinStrr8r;r<c�|j��fdd�|D��S)Nc3��|]	}|����VqdSr4r?rFrIr8r9rJ���z)_ResultMixinStr.encode.<locals>.<genexpr>)�_encoded_counterpart��selfrArBr8rIr9r@��z_ResultMixinStr.encodeN�r;r<)�__name__�
__module__�__qualname__�	__slots__r@r8r8r8r9rU��rUc@rT)�_ResultMixinBytesr8r;r<crV)Nc3rWr4rDrFrIr8r9rJ�rXz+_ResultMixinBytes.decode.<locals>.<genexpr>)�_decoded_counterpartrZr8rIr9rE�r\z_ResultMixinBytes.decodeNr])r^r_r`rarEr8r8r8r9rc�rbrcc@sLeZdZ	dZedd��Zedd��Zedd��Zedd	��Ze	e
j�Zd
S)�_NetlocResultMixinBaser8cC�
|jdS)Nr��	_userinfo�r[r8r8r9�username��
z_NetlocResultMixinBase.usernamecCrf)NrNrgrir8r8r9�password�rkz_NetlocResultMixinBase.passwordcCsD|jd}|s	dSt|t�rdnd}|�|�\}}}|��||S)Nr�%�%)�	_hostinforOrP�	partition�lower)r[�hostname�	separatorZpercentZzoner8r8r9rr�s
z_NetlocResultMixinBase.hostnamecCsb|jd}|dur/|��r|��rt|�}ntd|����d|kr*dks/td��td��|S)NrNz+Port could not be cast to integer value as ri��zPort out of range 0-65535)ro�isdigit�isascii�int�
ValueError)r[�portr8r8r9rx�s

�z_NetlocResultMixinBase.portN)
r^r_r`ra�propertyrjrlrrrx�classmethod�types�GenericAlias�__class_getitem__r8r8r8r9re�s




rec@�(eZdZdZedd��Zedd��ZdS)�_NetlocResultMixinStrr8cC�J|j}|�d�\}}}|r|�d�\}}}|sd}||fSd}}||fS)N�@�:��netloc�
rpartitionrp�r[r�ZuserinfoZ	have_info�hostinforjZ
have_passwordrlr8r8r9rh���z_NetlocResultMixinStr._userinfocC�l|j}|�d�\}}}|�d�\}}}|r&|�d�\}}}|�d�\}}}n|�d�\}}}|s2d}||fS)Nr��[�]r�r��r[r��_r�Zhave_open_brZ	bracketedrrrxr8r8r9ro��z_NetlocResultMixinStr._hostinfoN�r^r_r`raryrhror8r8r8r9r��
rc@r~)�_NetlocResultMixinBytesr8cCr�)N�@�:r�r�r8r8r9rh�r�z!_NetlocResultMixinBytes._userinfocCr�)Nr��[�]r�r�r�r8r8r9ro�r�z!_NetlocResultMixinBytes._hostinfoNr�r8r8r8r9r��r�r�)�
namedtuplerzurl fragmentrz!scheme netloc path query fragmentrz(scheme netloc path params query fragmentz�
DefragResult(url, fragment)

A 2-tuple that contains the url without fragment identifier and the fragment
identifier as a separate argument.
z$The URL with no fragment identifier.z�
Fragment identifier separated from URL, that allows indirect identification of a
secondary resource by reference to a primary resource and additional identifying
information.
z�
SplitResult(scheme, netloc, path, query, fragment)

A 5-tuple that contains the different components of a URL. Similar to
ParseResult, but does not split params.
z%Specifies URL scheme for the request.z0
Network location where the request is made to.
z@
The hierarchical path, such as the path to a file to download.
z�
The query component, that contains non-hierarchical data, that along with data
in path component, identifies a resource in the scope of URI's scheme and
network location.
z�
Fragment identifier, that allows indirect identification of a secondary resource
by reference to a primary resource and additional identifying information.
zq
ParseResult(scheme, netloc, path, params, query, fragment)

A 6-tuple that contains components of a parsed URL.
z�
Parameters for last path element used to dereference the URI in order to provide
access to perform some operation on the resource.
c@�eZdZdZdd�ZdS)rr8cC�|jr|jd|jS|jS�N�#��fragment�urlrir8r8r9�geturlJ�zDefragResult.geturlN�r^r_r`rar�r8r8r8r9rH�c@r�)rr8cC�t|�Sr4�rrir8r8r9r�R�zSplitResult.geturlNr�r8r8r8r9rPr�c@r�)rr8cCr�r4�rrir8r8r9r�Wr�zParseResult.geturlNr�r8r8r8r9rUr�c@r�)rr8cCr�)N�#r�rir8r8r9r�]r�zDefragResultBytes.geturlNr�r8r8r8r9r[r�rc@r�)rr8cCr�r4r�rir8r8r9r�er�zSplitResultBytes.geturlNr�r8r8r8r9rcr�rc@r�)rr8cCr�r4r�rir8r8r9r�jr�zParseResultBytes.geturlNr�r8r8r8r9rhr�rcCs4ttfttfttff}|D]
\}}||_||_q
dSr4)rrrrrrrYrd)Z
_result_pairsZ_decodedZ_encodedr8r8r9�_fix_result_transcodingns��r�rTc
Csh	t||�\}}}t|||�}|\}}}}}|tvr%d|vr%t|�\}}nd}t||||||�}	||	�S)N�;r)rSr�uses_params�_splitparamsr)
r��scheme�allow_fragments�_coerce_resultZsplitresultr��queryr��params�resultr8r8r9r{srcCsRd|vr|�d|�d��}|dkr|dfSn|�d�}|d|�||dd�fS)N�/r�rrrN)�find�rfind)r��ir8r8r9r��s�
r�cCsHt|�}dD]}|�||�}|dkrt||�}q|||�||d�fS)Nz/?#r)�lenr��min)r��start�delim�cZwdelimr8r8r9�_splitnetloc�s
�r�cCs�|r|��rdSddl}|�dd�}|�dd�}|�dd�}|�dd�}|�d|�}||kr0dSdD]}||vrBtd	|d
d��q2dS)Nrr�rr�r��?�NFKCz/?#@:znetloc 'z' contains invalid z#characters under NFKC normalization)ru�unicodedata�replace�	normalizerw)r�r��nZnetloc2r�r8r8r9�_checknetloc�s"���r�c
Cs�	t||�\}}}|�t�}|�t�}tD]}|�|d�}|�|d�}qt|�}|||t|�t|�f}t�	|d�}|r?||�St
t�tkrHt�d}}}	|�
d�}
|
dkrw|d|
�D]}|tvrenq]|d|
���||
dd�}}|dd�dkr�t|d�\}}d|vr�d|vs�d|vr�d|vr�td	��|r�d
|vr�|�d
d�\}}	d|vr�|�dd�\}}t|�t|||||	�}|t|<||�S)Nrr�rrN��//r�r�zInvalid IPv6 URLr�r�)rS�lstrip�_WHATWG_C0_CONTROL_OR_SPACE�strip�_UNSAFE_URL_BYTES_TO_REMOVEr��bool�typer5�getr��MAX_CACHE_SIZEr:r��scheme_charsrqr�rw�splitr�r)
r�r�r�r��b�key�cachedr�r�r�r�r��vr8r8r9r�sF


�"rcCs>	t|�\}}}}}}}|rd||f}|t|||||f��S)Nz%s;%s)rSr)�
componentsr�r�r�r�r�r�r�r8r8r9r�s�rcCs�	t|�\}}}}}}|s|r|tvs|dd�dkr1|r)|dd�dkr)d|}d|p-d|}|r9|d|}|rA|d|}|rI|d|}||�S)	Nr�r�rNr�rr�r�r�)rS�uses_netloc)r�r�r�r�r�r�r�r8r8r9rs� rc	Cs�	|s|S|s	|St||�\}}}t|d|�\}}}}}}	t|||�\}
}}}
}}|
|ks1|
tvr5||�S|
tvrI|rG|t|
|||
||f��S|}|sa|
sa|}|}
|sU|}|t|
|||
||f��S|�d�}|ddkro|d=|dd�dkr}|�d�}n||�d�}td|dd��|dd�<g}|D] }|dkr�z|��Wq�ty�Yq�w|dkr�q�|�	|�q�|ddvr�|�	d�|t|
|d�
|�p�d|
||f��S)Nrr����rN�..�.)r�r�)rSr�
uses_relativer�rr��filter�pop�
IndexError�append�join)�baser�r�r�ZbschemeZbnetlocZbpathZbparamsZbqueryZ	bfragmentr�r��pathr�r�r�Z
base_partsZsegmentsZ
resolved_pathZsegr8r8r9rsf
�
�
�
�
�
��rc	CsV	t|�\}}d|vr t|�\}}}}}}t|||||df�}nd}|}|t||��S)Nr�r)rSrrr)	r�r��sr��p�a�qZfragZdefragr8r8r9r\srZ0123456789ABCDEFabcdefc	Cs�	|s|jdSt|t�r|�d�}|�d�}t|�dkr|S|dg}|j}tdur2dd�tD�a|dd�D]'}z|t|dd��||dd��Wq8ty_|d�||�Yq8wd�	|�S)	N��utf-8rnrNrcSs.i|]}tD]}||��t�||��qqSr8)�_hexdigr@�bytes�fromhex)rGr�r�r8r8r9�
<dictcomp>�s
��z$unquote_to_bytes.<locals>.<dictcomp>r�)
r�rOrPr@r�r��
_hextobyter��KeyErrorr�)�string�bits�resr��itemr8r8r9ros0



��
rz([-]+)r�r�cCs�	t|t�rt|��||�Sd|vr|j|S|durd}|dur#d}t�|�}|dg}|j}tdt|�d�D]}|t||��||��|||d�q8d�	|�S)Nrmr�r�rrNr�r)
rOr�rrEr��_asciirer��ranger�r�)r�rArBr�r�r�r�r8r8r9r�s"
	


rF�&c	CsP	i}t|||||||d�}|D]\}	}
|	|vr ||	�|
�q|
g||	<q|S)N)rArB�max_num_fieldsrs)r
r�)�qs�keep_blank_values�strict_parsingrArBr�rsZ
parsed_resultZpairs�name�valuer8r8r9r	�s�r	cCs"	t|�\}}t|�\}}|rt|ttf�std��|dur-d|�|�}	||	kr-td��g}
|�|�D]Z}|s;|s;q4|�dd�}t|�dkrY|rPtd|f��|rX|�d�nq4t|d�sa|r�|d�	d	d
�}
t
|
||d�}
||
�}
|d�	d	d
�}t
|||d�}||�}|
�|
|f�q4|
S)Nz*Separator must be of type string or bytes.rNzMax number of fields exceeded�=r�zbad query field: %rrr�+� rI)rSrOrPr�rw�countr�r�r�r�r)r�r�r�rArBr�rsr�r��
num_fields�rZ
name_valueZnvr�r�r8r8r9r
�s<�r
cCs	|�dd�}t|||�S)Nr�r�)r�r)r�rArBr8r8r9rsrsBABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-~c@s&eZdZ	dd�Zdd�Zdd�ZdS)�QuotercCs	t�|�|_dSr4)�_ALWAYS_SAFE�union�safe)r[rr8r8r9�__init__/szQuoter.__init__cCsd|jjt|�fS)Nz<%s %r>)�	__class__r^�dictrir8r8r9�__repr__3szQuoter.__repr__cCs(||jvr	t|�nd�|�}|||<|S)Nz%{:02X})r�chr�format)r[r�r�r8r8r9�__missing__7szQuoter.__missing__N)r^r_r`rrrr8r8r8r9r�'s
r�r�cCsd	t|t�r|s
|S|durd}|durd}|�||�}n|dur%td��|dur-td��t||�S)Nr�r<z,quote() doesn't support 'encoding' for bytesz*quote() doesn't support 'errors' for bytes)rOrPr@rQr
)r�rrArBr8r8r9r=s
&
rcCsf	t|t�r
d|vst|t�rd|vrt||||�St|t�r"d}nd}t|||||�}|�dd�S)Nr�� r�)rOrPr�rr�)r�rrArBZspacer8r8r9rss�
rcs�	t|ttf�std��|sdSt|t�r|�dd�}n	tdd�|D��}|�t|�s0|��Szt	|�Wnt
yHt|�jt	|<�Ynwd�
�fdd�|D��S)Nz!quote_from_bytes() expected bytesrr;�ignorecSsg|]}|dkr|�qS)�r8)rGr�r8r8r9�
<listcomp>�sz$quote_from_bytes.<locals>.<listcomp>csg|]}�|��qSr8r8)rG�char�Zquoterr8r9r�s)rOr��	bytearrayrQrPr@�rstrip�_ALWAYS_SAFE_BYTESrEr7r�r��__getitem__r�)Zbsrr8rr9r
�s 
�r
c	Cs�	t|d�r|��}n%zt|�rt|dt�st�Wnty/t��\}}}td��|��wg}	|sm|D]5\}
}t|
t	�rE||
|�}
n	|t
|
�|||�}
t|t	�rY|||�}n	|t
|�|||�}|	�|
d|�q6n�|D]�\}
}t|
t	�r~||
|�}
n	|t
|
�|||�}
t|t	�r�|||�}|	�|
d|�qot|t
�r�|||||�}|	�|
d|�qozt|�}Wnty�|t
|�|||�}|	�|
d|�Yqow|D]}
t|
t	�r�||
|�}
n	|t
|
�|||�}
|	�|
d|
�q�qod�|	�S)N�itemsrz1not a valid non-string sequence or mapping objectr�r�)
�hasattrrr�rOrKrQ�sys�exc_info�with_tracebackr�rPr�r�)r�ZdoseqrrArBZ	quote_viaZtyZva�tb�l�kr�rH�eltr8r8r9r�s^

���

�



�
�
rcC�tjdtdd�t|�S)Nz/urllib.parse.to_bytes() is deprecated as of 3.8r���
stacklevel)�warnings�warn�DeprecationWarning�	_to_bytes�r�r8r8r9�to_bytes�s�r$cCsH	t|t�r"z
|�d���}W|Sty!tdt|�d��w|S)N�ASCIIzURL z contains non-ASCII characters)rOrPr@rE�UnicodeError�reprr#r8r8r9r"�s
���r"cCsb	t|���}|dd�dkr|dd�dkr|dd���}|dd�dkr/|dd���}|S)NrN�<r��>�zURL:)rPr�r#r8r8r9�unwrap�s r+cCr)NzUurllib.parse.splittype() is deprecated as of 3.8, use urllib.parse.urlparse() insteadr�r)rr r!�
_splittyper#r8r8r9�	splittype��r-cCsF	tdurt�dtj�at�|�}|r|��\}}|��|fSd|fS)Nz
([^/:]+):(.*))�	_typeprog�re�compile�DOTALL�match�groupsrq)r�r3r��datar8r8r9r,s
r,cCr)NzUurllib.parse.splithost() is deprecated as of 3.8, use urllib.parse.urlparse() insteadr�r)rr r!�
_splithostr#r8r8r9�	splithost!r.r7cCsZ	tdurt�dtj�at�|�}|r)|��\}}|r%|ddkr%d|}||fSd|fS)Nz//([^/#?]*)(.*)rr�)�	_hostprogr0r1r2r3r4)r�r3Z	host_portr�r8r8r9r6)s
r6cCr)NzUurllib.parse.splituser() is deprecated as of 3.8, use urllib.parse.urlparse() insteadr�r)rr r!�
_splituser��hostr8r8r9�	splituser8r.r<cCs&	|�d�\}}}|r||fSd|fS)Nr��r�)r;�userr�r8r8r9r9?sr9cCr)NzWurllib.parse.splitpasswd() is deprecated as of 3.8, use urllib.parse.urlparse() insteadr�r)rr r!�_splitpasswd)r>r8r8r9�splitpasswdEr.r@cC�$	|�d�\}}}||r|fSdfS�Nr��rp)r>r�Zpasswdr8r8r9r?L�r?cCr)NzUurllib.parse.splitport() is deprecated as of 3.8, use urllib.parse.urlparse() insteadr�r)rr r!�
_splitportr:r8r8r9�	splitportRr.rFcCsF	tdurt�dtj�at�|�}|r|��\}}|r||fS|dfS)Nz
(.*):([0-9]*))�	_portprogr0r1r2�	fullmatchr4)r;r3rxr8r8r9rE[s
rEr�cCstjdtdd�t||�S)NzVurllib.parse.splitnport() is deprecated as of 3.8, use urllib.parse.urlparse() insteadr�r)rr r!�_splitnport)r;�defportr8r8r9�
splitnportis�
rKcCsZ	|�d�\}}}|s|}||fS|r)|��r#|��r#t|�}||fSd}||fS||fSrB)r�rtrurv)r;rJr�rxZnportr8r8r9rIps��rIcCr)NzVurllib.parse.splitquery() is deprecated as of 3.8, use urllib.parse.urlparse() insteadr�r)rr r!�_splitqueryr#r8r8r9�
splitquery�r.rMcC�&	|�d�\}}}|r||fS|dfS)Nr�r=)r�r�r�r�r8r8r9rL��
rLcCr)NzTurllib.parse.splittag() is deprecated as of 3.8, use urllib.parse.urlparse() insteadr�r)rr r!�	_splittagr#r8r8r9�splittag�r.rQcCrNr�r=)r�r�r��tagr8r8r9rP�rOrPcCr)NzUurllib.parse.splitattr() is deprecated as of 3.8, use urllib.parse.urlparse() insteadr�r)rr r!�
_splitattrr#r8r8r9�	splitattr�r.rTcCs 	|�d�}|d|dd�fS)Nr�rrN)r�)r�Zwordsr8r8r9rS�s
rScCr)NzWurllib.parse.splitvalue() is deprecated as of 3.8, use urllib.parse.parse_qsl() insteadr�r)rr r!�_splitvalue)�attrr8r8r9�
splitvalue�r.rWcCrA)Nr�rC)rVr�r�r8r8r9rU�rDrU)rT)r)T)r�r�)FFr�r�Nr�)r�NN)rNN)r�)r�)ir0rr{�collectionsr�__all__r�r�r�Znon_hierarchicalZ
uses_queryZ
uses_fragmentr�r�r�r�r5r:Z_implicit_encodingZ_implicit_errorsr>rCrMrS�objectrUrcrerr�r�Z_DefragResultBaseZ_SplitResultBaseZ_ParseResultBase�__doc__r�r�r�r�r�r�r�Z
ResultBaserrrrrrr�rr�r�r�rrrrrr�r�rr1r�rr	r
r�	frozensetr�r�rr7�defaultdictr�rrr
rr$r"r+r-r/r,r7r8r6r<r9r@r?rFrGrErKrIrMrLrQrPrTrSrWrUr8r8r8r9�<module>s�!
�
�&
��


	
=
E


�*
�
B	

6

�Q