
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
3
ct„je«  ã               @   s˜  d dl Z d dlZd dlZd dlZd dlZdddddddd	d
ddddddddddddgZdddddddddd d!d"d#d$d%d&d'd(d)gZdddddd*dddd!dd d+d"d#d$d,d&d'd%d-d.d/d(d)gZddd0d"dddd d#d$d1d2d!d%d3gZdd0d4d5d*ddd+d1d2g
Z	dddddd d!dd#d$d1d2gZ
ddd0ddd5dddd d+dd"gZd6Zd7Zd8d9d:gZd;Zi Zd<d=„ Zd>Zd?Zd@dA„ ZeefdBdC„ZeefdDdE„ZdFdG„ ZG dHdI„ dIeƒZG dJdK„ dKeƒZG dLdM„ dMeƒZG dNdO„ dOeeƒZG dPdQ„ dQeeƒZd dRlmZ eddSƒZeddTƒZ eddUƒZ!dVe_"dWej#_"dXej$_"dYe _"dZe j%_"d[e j&_"d\e j'_"d]e j(_"d^e j$_"d_e!_"e j%j"e!j%_"e j&j"e!j&_"e j'j"e!j'_"d`e!j)_"e j(j"e!j(_"e j$j"e!j$_"eZ*G dad„ deeƒZ+G dbd„ de eƒZ,G dcd„ de!eƒZ-G ddd„ deeƒZ.G ded„ de eƒZ/G dfd„ de!eƒZ0dgdh„ Z1e1ƒ  [1dªdjd„Z2dkdl„ Z3d«dmdn„Z4dodp„ Z5dqdr„ Z6dsdt„ Z7dudv„ Z8d¬dwd„Z9dxd„ Z:dyd„ Z;d­dzd„Z<d{d„ Z=d|Z>da?d}d„ Z@e jAd~ƒZBd®d�d„ZCd¯dƒd	„ZDG d„d…„ d…eEƒZFd†ZGdaHd°d‡d
„ZId±dˆd„ZJeKd‰ƒZLeMeLƒZNi ZOG dŠd‹„ d‹ejPƒZQd²d�d„ZRd³dŽd„ZSd´d�d„ZTd‚dddeSfd�d„ZUd‘d’„ ZVd“d”„ ZWdaXd•d–„ ZYdaZd—d˜„ Z[d™dš„ Z\d›dœ„ Z]da^d�dž„ Z_d¶d d¡„Z`d¢d£„ Zad¤d¥„ Zbd¦d§„ Zcd¨d©„ ZddS )·é    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Ú ZftpÚhttpZgopherZnntpZimapZwaisÚfileZhttpsZshttpZmmsZprosperoZrtspZrtspuZsftpZsvnzsvn+sshZwsZwssZtelnetZsnewsZrsyncZnfsZgitzgit+sshZhdlZsipZsipsZtelZmailtoZnewszAabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-.z! 	
 ú	úÚ
é   c               C   s   t jƒ  tjƒ  d S )N)Ú_parse_cacheÚclearÚ_safe_quoters© r!   r!   ú$/usr/lib64/python3.6/urllib/parse.pyÚclear_cache`   s    r#   ÚasciiÚstrictc             C   s   | S )Nr!   )Úobjr!   r!   r"   Ú_noopo   s    r'   c             C   s   | j ||ƒS )N)Úencode)r&   ÚencodingÚerrorsr!   r!   r"   Ú_encode_resultr   s    r+   c                s   t ‡ ‡fdd„| D ƒƒS )Nc             3   s"   | ]}|r|j ˆ ˆƒnd V  qdS )r   N)Údecode)Ú.0Úx)r)   r*   r!   r"   ú	<genexpr>x   s    z_decode_args.<locals>.<genexpr>)Útuple)Úargsr)   r*   r!   )r)   r*   r"   Ú_decode_argsv   s    r2   c              G   sZ   t | d tƒ}x.| dd … D ]}|rt |tƒ|krtdƒ‚qW |rL| tf S t| ƒtf S )Nr   é   z$Cannot mix str and non-str arguments)Ú
isinstanceÚstrÚ	TypeErrorr'   r2   r+   )r1   Z	str_inputÚargr!   r!   r"   Ú_coerce_argsz   s    
r8   c               @   s   e Zd Zf Zddd„ZdS )Ú_ResultMixinStrr$   r%   c                s   | j ‡ ‡fdd„| D ƒŽ S )Nc             3   s   | ]}|j ˆ ˆƒV  qd S )N)r(   )r-   r.   )r)   r*   r!   r"   r/   �   s    z)_ResultMixinStr.encode.<locals>.<genexpr>)Ú_encoded_counterpart)Úselfr)   r*   r!   )r)   r*   r"   r(   �   s    z_ResultMixinStr.encodeN)r$   r%   )Ú__name__Ú
__module__Ú__qualname__Ú	__slots__r(   r!   r!   r!   r"   r9   ‹   s   r9   c               @   s   e Zd Zf Zddd„ZdS )Ú_ResultMixinBytesr$   r%   c                s   | j ‡ ‡fdd„| D ƒŽ S )Nc             3   s   | ]}|j ˆ ˆƒV  qd S )N)r,   )r-   r.   )r)   r*   r!   r"   r/   ˜   s    z+_ResultMixinBytes.decode.<locals>.<genexpr>)Ú_decoded_counterpart)r;   r)   r*   r!   )r)   r*   r"   r,   —   s    z_ResultMixinBytes.decodeN)r$   r%   )r<   r=   r>   r?   r,   r!   r!   r!   r"   r@   “   s   r@   c               @   s@   e Zd Zf Zedd„ ƒZedd„ ƒZedd„ ƒZedd„ ƒZd	S )
Ú_NetlocResultMixinBasec             C   s
   | j d S )Nr   )Ú	_userinfo)r;   r!   r!   r"   ÚusernameŸ   s    z_NetlocResultMixinBase.usernamec             C   s
   | j d S )Nr3   )rC   )r;   r!   r!   r"   Úpassword£   s    z_NetlocResultMixinBase.passwordc             C   sD   | j d }|sd S t|tƒr dnd}|j|ƒ\}}}|jƒ | | S )Nr   ú%ó   %)Ú	_hostinfor4   r5   Ú	partitionÚlower)r;   ÚhostnameÚ	separatorZpercentZzoner!   r!   r"   rK   §   s    
z_NetlocResultMixinBase.hostnamec             C   s@   | j d }|d k	r<t|dƒ}d|  ko.dkn  s<tdƒ‚|S )Nr3   é
   r   iÿÿ  zPort out of range 0-65535)rH   ÚintÚ
ValueError)r;   Úportr!   r!   r"   rP   ²   s    

z_NetlocResultMixinBase.portN)	r<   r=   r>   r?   ÚpropertyrD   rE   rK   rP   r!   r!   r!   r"   rB   ›   s
   rB   c               @   s(   e Zd Zf Zedd„ ƒZedd„ ƒZdS )Ú_NetlocResultMixinStrc             C   sD   | j }|jdƒ\}}}|r4|jdƒ\}}}|s<d }nd  }}||fS )Nú@ú:)ÚnetlocÚ
rpartitionrI   )r;   rU   ÚuserinfoÚ	have_infoÚhostinforD   Úhave_passwordrE   r!   r!   r"   rC   ¿   s    z_NetlocResultMixinStr._userinfoc             C   sl   | j }|jdƒ\}}}|jdƒ\}}}|rL|jdƒ\}}}|jdƒ\}}}n|jdƒ\}}}|sdd }||fS )NrS   ú[ú]rT   )rU   rV   rI   )r;   rU   Ú_rY   Úhave_open_brÚ	bracketedrK   rP   r!   r!   r"   rH   Ë   s    z_NetlocResultMixinStr._hostinfoN)r<   r=   r>   r?   rQ   rC   rH   r!   r!   r!   r"   rR   ¼   s   rR   c               @   s(   e Zd Zf Zedd„ ƒZedd„ ƒZdS )Ú_NetlocResultMixinBytesc             C   sD   | j }|jdƒ\}}}|r4|jdƒ\}}}|s<d }nd  }}||fS )Nó   @ó   :)rU   rV   rI   )r;   rU   rW   rX   rY   rD   rZ   rE   r!   r!   r"   rC   Ý   s    z!_NetlocResultMixinBytes._userinfoc             C   sl   | j }|jdƒ\}}}|jdƒ\}}}|rL|jdƒ\}}}|jdƒ\}}}n|jdƒ\}}}|sdd }||fS )Nra   ó   [ó   ]rb   )rU   rV   rI   )r;   rU   r]   rY   r^   r_   rK   rP   r!   r!   r"   rH   é   s    z!_NetlocResultMixinBytes._hostinfoN)r<   r=   r>   r?   rQ   rC   rH   r!   r!   r!   r"   r`   Ú   s   r`   )Ú
namedtuplezurl fragmentz!scheme netloc path query fragmentz(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.
zr
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               @   s   e Zd Zf Zdd„ ZdS )r   c             C   s    | j r| jd | j  S | jS d S )Nú#)ÚfragmentÚurl)r;   r!   r!   r"   ÚgeturlE  s    zDefragResult.geturlN)r<   r=   r>   r?   ri   r!   r!   r!   r"   r   C  s   c               @   s   e Zd Zf Zdd„ ZdS )r   c             C   s   t | ƒS )N)r   )r;   r!   r!   r"   ri   M  s    zSplitResult.geturlN)r<   r=   r>   r?   ri   r!   r!   r!   r"   r   K  s   c               @   s   e Zd Zf Zdd„ ZdS )r   c             C   s   t | ƒS )N)r   )r;   r!   r!   r"   ri   R  s    zParseResult.geturlN)r<   r=   r>   r?   ri   r!   r!   r!   r"   r   P  s   c               @   s   e Zd Zf Zdd„ ZdS )r   c             C   s    | j r| jd | j  S | jS d S )Nó   #)rg   rh   )r;   r!   r!   r"   ri   X  s    zDefragResultBytes.geturlN)r<   r=   r>   r?   ri   r!   r!   r!   r"   r   V  s   c               @   s   e Zd Zf Zdd„ ZdS )r   c             C   s   t | ƒS )N)r   )r;   r!   r!   r"   ri   `  s    zSplitResultBytes.geturlN)r<   r=   r>   r?   ri   r!   r!   r!   r"   r   ^  s   c               @   s   e Zd Zf Zdd„ ZdS )r   c             C   s   t | ƒS )N)r   )r;   r!   r!   r"   ri   e  s    zParseResultBytes.geturlN)r<   r=   r>   r?   ri   r!   r!   r!   r"   r   c  s   c              C   s8   t tfttfttff} x| D ]\}}||_||_qW d S )N)r   r   r   r   r   r   r:   rA   )Z_result_pairsZ_decodedZ_encodedr!   r!   r"   Ú_fix_result_transcodingi  s    
rk   Tc       
      C   sf   t | |ƒ\} }}t| ||ƒ}|\}}} }}|tkrHd| krHt| ƒ\} }nd}t||| |||ƒ}	||	ƒS )Nú;r   )r8   r   Úuses_paramsÚ_splitparamsr   )
rh   ÚschemeÚallow_fragmentsÚ_coerce_resultZsplitresultrU   Úqueryrg   ÚparamsÚresultr!   r!   r"   r   v  s    c             C   sR   d| kr,| j d| jdƒƒ}|dk r6| dfS n
| j dƒ}| d |… | |d d … fS )Nú/rl   r   r   r3   )ÚfindÚrfind)rh   Úir!   r!   r"   rn   †  s    

rn   c             C   sL   t | ƒ}x*dD ]"}| j||ƒ}|dkrt||ƒ}qW | ||… | |d … fS )Nz/?#r   )Úlenrv   Úmin)rh   ÚstartÚdelimÚcZwdelimr!   r!   r"   Ú_splitnetloc�  s    
r~   c             C   sœ   |  st dd„ | D ƒƒ rd S dd l}| jddƒ}|jddƒ}|jddƒ}|jddƒ}|jd	|ƒ}||krnd S x(d
D ] }||krttd|  d d ƒ‚qtW d S )Nc             s   s   | ]}t |ƒd kV  qdS )é   N)Úord)r-   r}   r!   r!   r"   r/   ˜  s    z_checknetloc.<locals>.<genexpr>r   rS   r   rT   rf   ú?ÚNFKCz/?#@:znetloc 'z' contains invalid z#characters under NFKC normalization)ÚanyÚunicodedataÚreplaceÚ	normalizerO   )rU   r„   ÚnZnetloc2r}   r!   r!   r"   Ú_checknetloc—  s    
rˆ   c             C   s   xt D ]}| j|dƒ} qW | S )Nr   )Ú_UNSAFE_URL_BYTES_TO_REMOVEr…   )rh   Úbr!   r!   r"   Ú_remove_unsafe_bytes_from_url©  s    
r‹   c             C   st   | j dƒd }|jdƒ\}}}|rX|r.tdƒ‚|jdƒ\}}}|rh|jdƒ rhtdƒ‚n|jdƒ\}}}t|ƒ d S )NrS   é   r[   zInvalid IPv6 URLr\   rT   )rV   rI   rO   Ú
startswithÚ_check_bracketed_host)rU   Zhostname_and_portZbefore_bracketr^   r_   rK   r]   rP   r!   r!   r"   Ú_check_bracketed_netloc®  s    
r�   c             C   sB   | j dƒr tjd| ƒs>tdƒ‚ntj| ƒ}t|tjƒr>tdƒ‚d S )NÚvz\Av[a-fA-F0-9]+\..+\ZzIPvFuture address is invalidz%An IPv4 address cannot be in brackets)r�   ÚreÚmatchrO   Ú	ipaddressZ
ip_addressr4   ZIPv4Address)rK   Zipr!   r!   r"   rŽ   Á  s    


rŽ   c             C   s²  t | |ƒ\} }}t| ƒ} t|ƒ}| jtƒ} |jtƒ}t|ƒ}| ||t| ƒt|ƒf}tj|d ƒ}|rj||ƒS t	tƒt
kr|tƒ  d } }}| jdƒ}	|	dk�rä| d |	… dk�r~| d |	… jƒ }| |	d d … } | d d… dk�rt| dƒ\}} d|koüd	|k�sd	|k�rd|k�rtd
ƒ‚|�r<d| k�r<| jddƒ\} }d| k�rV| jddƒ\} }t|ƒ t||| ||ƒ}
|
t|< ||
ƒS xd| d |	… D ]}|tk�rŒP �qŒW | |	d d … }| �sÎtdd„ |D ƒƒ�rä| d |	… jƒ | }} | d d… dk�rPt| dƒ\}} d|k�rd	|k�s,d	|k�r4d|k�r4td
ƒ‚d|k�rPd	|k�rPt|ƒ |�rpd| k�rp| jddƒ\} }d| k�rŠ| jddƒ\} }t|ƒ t||| ||ƒ}
|
t|< ||
ƒS )Nr   rT   r   r   r3   rŒ   z//r[   r\   zInvalid IPv6 URLrf   r�   c             s   s   | ]}|d kV  qdS )Ú
0123456789Nr!   )r-   r}   r!   r!   r"   r/   ø  s    zurlsplit.<locals>.<genexpr>)r8   r‹   ÚlstripÚ_WHATWG_C0_CONTROL_OR_SPACEÚstripÚboolÚtyper   Úgetry   ÚMAX_CACHE_SIZEr#   rv   rJ   r~   rO   Úsplitrˆ   r   Úscheme_charsrƒ   r�   )rh   ro   rp   rq   ÚkeyÚcachedrU   rr   rg   rx   r�   r}   Úrestr!   r!   r"   r   Ê  sh    






c             C   s<   t | Ž \}}}}}}}|r&d||f }|t|||||fƒƒS )Nz%s;%s)r8   r   )Ú
componentsro   rU   rh   rs   rr   rg   rq   r!   r!   r"   r     s    c             C   s˜   t | Ž \}}}}}}|s4|r`|tkr`|d d… dkr`|rP|d d… dkrPd| }d|pXd | }|rp|d | }|r€|d | }|r�|d | }||ƒS )	NrŒ   z//r3   ru   r   rT   r�   rf   )r8   Úuses_netloc)r¡   ro   rU   rh   rr   rg   rq   r!   r!   r"   r     s      c             C   sÀ  | s|S |s| S t | |ƒ\} }}t| d|ƒ\}}}}}}	t|||ƒ\}
}}}}}|
|ks`|
tkrh||ƒS |
tkr�|rŒ|t|
|||||fƒƒS |}| rÄ| rÄ|}|}|s¬|}|t|
|||||fƒƒS |jdƒ}|d dkrà|d= |d d… dk� rþ|jdƒ}n(||jdƒ }td |dd… ƒ|dd	…< g }xX|D ]P}|dk�rdy|jƒ  W n tk
�r`   Y nX n|dk�rt�q0n
|j	|ƒ �q0W |d
 dk�rœ|j	dƒ |t|
|dj
|ƒ�p²d|||fƒƒS )Nr   ru   r3   ú..Ú.éÿÿÿÿr¥   r¥   r¥   r¥   )r¤   r£   )r8   r   Úuses_relativer¢   r   rœ   ÚfilterÚpopÚ
IndexErrorÚappendÚjoin)Úbaserh   rp   rq   ZbschemeZbnetlocZbpathZbparamsZbqueryZ	bfragmentro   rU   Úpathrs   rr   rg   Z
base_partsZsegmentsZresolved_pathZsegr!   r!   r"   r   *  sT    






c       	      C   sT   t | ƒ\} }d| kr>t| ƒ\}}}}}}t|||||dfƒ}nd}| }|t||ƒƒS )Nrf   r   )r8   r   r   r   )	rh   rq   Úsr‡   ÚpÚaÚqZfragZdefragr!   r!   r"   r   o  s    Z0123456789ABCDEFabcdefc             C   sÐ   | s| j  dS t| tƒr"| jdƒ} | j dƒ}t|ƒdkr<| S |d g}|j}td krbdd„ tD ƒaxb|dd … D ]R}y(|t|d d…  ƒ ||dd … ƒ W qp tk
rÀ   |dƒ ||ƒ Y qpX qpW dj	|ƒS )	Nó    zutf-8rG   r3   r   c             S   s4   i | ],}t D ]"}tt|| d ƒgƒ|| jƒ “qqS )é   )Ú_hexdigÚbytesrN   r(   )r-   r°   rŠ   r!   r!   r"   ú
<dictcomp>•  s   z$unquote_to_bytes.<locals>.<dictcomp>rŒ   )
rœ   r4   r5   r(   ry   rª   Ú
_hextobyter´   ÚKeyErrorr«   )ÚstringÚbitsÚresrª   Úitemr!   r!   r"   r   ‚  s*    



z([ -]+)úutf-8r…   c             C   s�   d| kr| j  | S |d krd}|d kr*d}tj | ƒ}|d g}|j}x@tdt|ƒdƒD ],}|t|| ƒj||ƒƒ |||d  ƒ qVW dj|ƒS )NrF   zutf-8r…   r   r3   rŒ   r   )rœ   Ú_asciirerª   Úrangery   r   r,   r«   )r¹   r)   r*   rº   r»   rª   rx   r!   r!   r"   r   ¢  s    


Fc          	   C   sR   i }t | ||||||d�}x2|D ]*\}	}
|	|kr@||	 j|
ƒ q |
g||	< q W |S )N)r)   r*   Úmax_num_fieldsrL   )r
   rª   )ÚqsÚkeep_blank_valuesÚstrict_parsingr)   r*   rÀ   rL   Zparsed_resultÚpairsÚnameÚvaluer!   r!   r"   r	   ¼  s    c               @   s   e Zd ZdS )Ú_QueryStringSeparatorWarningN)r<   r=   r>   r!   r!   r!   r"   rÇ   ä  s   rÇ   z/etc/python/urllib.cfgc             C   s¶  t | ƒ\} }t|tƒr |jdƒ}| s6t|ttfƒ rF|d k	rFtdƒ‚tƒ }|d k�rVt}d}	|d krvtj	j
|	ƒ}d}
|d krèyttƒ}W n tk
rž   Y nJX |�: dd l}|jd d&d�}|j|ƒ |j
d|	d d	�}|aW d Q R X t}
|d k�rd
| k�rddlm} |d,tdd� d}n:|dk�r,|}n*t|ƒdk�rVt|	› d|
› d�d d ƒ‚|d k	�r¤||k�r„d| jdƒ | jd
ƒ }nd| j|ƒ }||k �r¤tdƒ‚||k�rÄdd„ | jdƒD ƒ}ndd„ | j|ƒD ƒ}g }xÔ|D ]Ì}| �rú| �rú�qâ|jd dƒ}t|ƒdk�r>|�r(td!|f ƒ‚|�râ|jd"ƒ n�qât|d ƒ�sR|�râ|d jd#d$ƒ}t|||d%�}||ƒ}|d jd#d$ƒ}t|||d%�}||ƒ}|j||fƒ �qâW |S )-Nr$   z*Separator must be of type string or bytes.ZPYTHON_URLLIB_QS_SEPARATORzenvironment variabler   rf   )ZinterpolationZcomment_prefixesr	   )Zfallbackrl   )Úwarnz4The default separator of urllib.parse.parse_qsl and z1parse_qs was changed to '&' to avoid a web cache z"poisoning issue (CVE-2021-23336). z4By default, semicolons no longer act as query field zseparators. z3See https://access.redhat.com/articles/5860431 for zmore details.rŒ   )Ú
stacklevelú&Zlegacyr3   z (from z) must contain z1 character, or "legacy". See z<https://access.redhat.com/articles/5860431 for more details.zMax number of fields exceededc             S   s    g | ]}|j d ƒD ]}|‘qqS )rl   )rœ   )r-   Ús1Ús2r!   r!   r"   ú
<listcomp>L  s    zparse_qsl.<locals>.<listcomp>c             S   s   g | ]}|‘qS r!   r!   )r-   rË   r!   r!   r"   rÍ   N  s    ú=zbad query field: %rr   ú+ú )r)   r*   )rf   zeThe default separator of urllib.parse.parse_qsl and parse_qs was changed to '&' to avoid a web cache z‡The default separator of urllib.parse.parse_qsl and parse_qs was changed to '&' to avoid a web cache poisoning issue (CVE-2021-23336). z»The default separator of urllib.parse.parse_qsl and parse_qs was changed to '&' to avoid a web cache poisoning issue (CVE-2021-23336). By default, semicolons no longer act as query field zÇThe default separator of urllib.parse.parse_qsl and parse_qs was changed to '&' to avoid a web cache poisoning issue (CVE-2021-23336). By default, semicolons no longer act as query field separators. zúThe default separator of urllib.parse.parse_qsl and parse_qs was changed to '&' to avoid a web cache poisoning issue (CVE-2021-23336). By default, semicolons no longer act as query field separators. See https://access.redhat.com/articles/5860431 for a  The default separator of urllib.parse.parse_qsl and parse_qs was changed to '&' to avoid a web cache poisoning issue (CVE-2021-23336). By default, semicolons no longer act as query field separators. See https://access.redhat.com/articles/5860431 for more details.)r8   r4   rµ   r,   r5   rO   ÚobjectÚ_default_qs_separatorÚosÚenvironrš   ÚopenÚ_QS_SEPARATOR_CONFIG_FILENAMEÚFileNotFoundErrorÚconfigparserZConfigParserZ	read_fileÚwarningsrÈ   rÇ   ry   Úcountrœ   rª   r…   r   )rÁ   rÂ   rÃ   r)   r*   rÀ   rL   rq   Z_legacyZenvvar_nameZconfig_sourcer   rØ   ÚconfigrÈ   Ú
num_fieldsrÄ   ÚrZ
name_valueZnvrÅ   rÆ   r!   r!   r"   r
   ì  s†    












c             C   s   | j ddƒ} t| ||ƒS )NrÏ   rÐ   )r…   r   )r¹   r)   r*   r!   r!   r"   r   f  s    sA   ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-c               @   s$   e Zd Zdd„ Zdd„ Zdd„ ZdS )ÚQuoterc             C   s   t j|ƒ| _d S )N)Ú_ALWAYS_SAFEÚunionÚsafe)r;   rá   r!   r!   r"   Ú__init__~  s    zQuoter.__init__c             C   s   d| j jt| ƒf S )Nz<%s %r>)Ú	__class__r<   Údict)r;   r!   r!   r"   Ú__repr__‚  s    zQuoter.__repr__c             C   s(   || j krt|ƒndj|ƒ}|| |< |S )Nz%{:02X})rá   ÚchrÚformat)r;   rŠ   r»   r!   r!   r"   Ú__missing__†  s    zQuoter.__missing__N)r<   r=   r>   râ   rå   rè   r!   r!   r!   r"   rÞ   v  s   rÞ   ru   c             C   sb   t | tƒr8| s| S |d krd}|d kr*d}| j||ƒ} n |d k	rHtdƒ‚|d k	rXtdƒ‚t| |ƒS )Nzutf-8r%   z,quote() doesn't support 'encoding' for bytesz*quote() doesn't support 'errors' for bytes)r4   r5   r(   r6   r   )r¹   rá   r)   r*   r!   r!   r"   r   Œ  s    
c             C   sd   t | tƒrd| ks$t | tƒr2d| kr2t| |||ƒS t |tƒrBd}nd}t| || ||ƒ} | jddƒS )NrÐ   ó    rÏ   )r4   r5   rµ   r   r…   )r¹   rá   r)   r*   Zspacer!   r!   r"   r   ¸  s    
c                sª   t | ttfƒstdƒ‚| sdS t |tƒr6|jddƒ}ntdd„ |D ƒƒ}| jt| ƒs^| jƒ S yt	| ‰ W n& t
k
r�   t|ƒj t	|< ‰ Y nX dj‡ fdd„| D ƒƒS )Nz!quote_from_bytes() expected bytesr   r$   Úignorec             S   s   g | ]}|d k r|‘qS )é€   r!   )r-   r}   r!   r!   r"   rÍ   Ö  s    z$quote_from_bytes.<locals>.<listcomp>c                s   g | ]}ˆ |ƒ‘qS r!   r!   )r-   Úchar)Úquoterr!   r"   rÍ   Ý  s    )r4   rµ   Ú	bytearrayr6   r5   r(   ÚrstripÚ_ALWAYS_SAFE_BYTESr,   r    r¸   rÞ   Ú__getitem__r«   )Zbsrá   r!   )rí   r"   r   É  s    
c             C   s  t | dƒr| jƒ } nRy t| ƒr2t| d tƒ r2t‚W n0 tk
rd   tjƒ \}}}tdƒj|ƒ‚Y nX g }	|sæxr| D ]j\}
}t|
t	ƒr’||
|ƒ}
n|t
|
ƒ|||ƒ}
t|t	ƒrº|||ƒ}n|t
|ƒ|||ƒ}|	j|
d | ƒ qtW �n,�x(| D �]\}
}t|
t	ƒ�r||
|ƒ}
n|t
|
ƒ|||ƒ}
t|t	ƒ�rL|||ƒ}|	j|
d | ƒ qît|t
ƒ�rz|||||ƒ}|	j|
d | ƒ qîyt|ƒ}W n: tk
�rÀ   |t
|ƒ|||ƒ}|	j|
d | ƒ Y qîX xJ|D ]B}t|t	ƒ�rä|||ƒ}n|t
|ƒ|||ƒ}|	j|
d | ƒ �qÈW qîW dj|	ƒS )NÚitemsr   z1not a valid non-string sequence or mapping objectrÎ   rÊ   )Úhasattrrò   ry   r4   r0   r6   ÚsysÚexc_infoÚwith_tracebackrµ   r5   rª   r«   )rr   Zdoseqrá   r)   r*   Z	quote_viaZtyZvaÚtbÚlÚkr�   r.   Zeltr!   r!   r"   r   ß  sP    





c             C   sJ   t | tƒrFy| jdƒjƒ } W n( tk
rD   tdt| ƒ d ƒ‚Y nX | S )NÚASCIIzURL z contains non-ASCII characters)r4   r5   r(   r,   ÚUnicodeErrorÚrepr)rh   r!   r!   r"   Úto_bytes/  s    
rý   c             C   s`   t | ƒjƒ } | d d… dkr<| dd … dkr<| dd… jƒ } | d d… dkr\| dd … jƒ } | S )Nr3   ú<ú>é   zURL:r¥   r¥   )r5   r—   )rh   r!   r!   r"   Úunwrap<  s      r  c             C   sD   t d krtjdtjƒa t j| ƒ}|r<|jƒ \}}|jƒ |fS d | fS )Nz([^/:]+):(.*))Ú	_typeprogr‘   ÚcompileÚDOTALLr’   ÚgroupsrJ   )rh   r’   ro   Údatar!   r!   r"   Ú	splittypeE  s    
r  c             C   sX   t d krtjdtjƒa t j| ƒ}|rP|jƒ \}}|rH|d dkrHd| }||fS d | fS )Nz//([^/#?]*)(.*)r   ru   )Ú	_hostprogr‘   r  r  r’   r  )rh   r’   Z	host_portr­   r!   r!   r"   Ú	splithostR  s    
r	  c             C   s    | j dƒ\}}} |r|nd | fS )NrS   )rV   )ÚhostÚuserr|   r!   r!   r"   Ú	splituser`  s    r  c             C   s    | j dƒ\} }}| |r|nd fS )NrT   )rI   )r  r|   Zpasswdr!   r!   r"   Úsplitpasswde  s    r  c             C   sD   t d krtjdtjƒa t j| ƒ}|r<|jƒ \} }|r<| |fS | d fS )Nz(.*):([0-9]*)$)Ú	_portprogr‘   r  r  r’   r  )r
  r’   rP   r!   r!   r"   Ú	splitportl  s    
r  r3   c             C   sT   | j dƒ\} }}|s|} n2|rLyt|ƒ}W n tk
rB   d }Y nX | |fS | |fS )NrT   )rV   rN   rO   )r
  Zdefportr|   rP   Znportr!   r!   r"   Ú
splitnporty  s    
r  c             C   s$   | j dƒ\}}}|r||fS | d fS )Nr�   )rV   )rh   r­   r|   rr   r!   r!   r"   Ú
splitquery‰  s    r  c             C   s$   | j dƒ\}}}|r||fS | d fS )Nrf   )rV   )rh   r­   r|   Útagr!   r!   r"   Úsplittag�  s    r  c             C   s   | j dƒ}|d |dd … fS )Nrl   r   r3   )rœ   )rh   Zwordsr!   r!   r"   Ú	splitattr—  s    
r  c             C   s    | j dƒ\} }}| |r|nd fS )NrÎ   )rI   )Úattrr|   rÆ   r!   r!   r"   Ú
splitvalue�  s    r  )r   T)r   )r   T)T)r½   r…   )FFr½   r…   NN)FFr½   r…   NN)r½   r…   )ru   NN)r   NN)ru   r¥   )r¥   )er‘   rÓ   rô   Úcollectionsr“   Ú__all__r¦   r¢   rm   Znon_hierarchicalZ
uses_queryZuses_fragmentr�   r–   r‰   r›   r   r#   Z_implicit_encodingZ_implicit_errorsr'   r+   r2   r8   rÑ   r9   r@   rB   rR   r`   re   Z_DefragResultBaseZ_SplitResultBaseZ_ParseResultBaseÚ__doc__rh   rg   ro   rU   r­   rr   rs   Z
ResultBaser   r   r   r   r   r   rk   r   rn   r~   rˆ   r‹   r�   rŽ   r   r   r   r   r   r´   r·   r   r  r¾   r   r	   ÚRuntimeWarningrÇ   rÖ   rÒ   r
   r   Ú	frozensetrß   rµ   rð   r    ÚdefaultdictrÞ   r   r   r   r   rý   r  r  r  r  r	  r  r  r  r  r  r  r  r  r  r!   r!   r!   r"   Ú<module>"   s  





!


	
	
B
E

  
& 
y
	
,

O
