ok

Mini Shell

Direktori : /proc/thread-self/root/opt/alt/python37/lib64/python3.7/encodings/__pycache__/
Upload File :
Current File : //proc/thread-self/root/opt/alt/python37/lib64/python3.7/encodings/__pycache__/idna.cpython-37.pyc

B

� f�#�@s�ddlZddlZddlZddlmZe�d�ZdZdZdd�Z	dd	�Z
d
d�ZGdd
�d
ej�ZGdd�dej
�ZGdd�dej�ZGdd�deej�ZGdd�deej�Zdd�ZdS)�N)�	ucd_3_2_0u[.。.。]sxn--zxn--cCsg}x(|D] }t�|�rq
|�t�|��q
Wd�|�}t�d|�}xr|D]j}t�|�s�t�|�s�t�	|�s�t�
|�s�t�|�s�t�|�s�t�
|�s�t�|�s�t�|�rJtd|��qJWdd�|D�}t|��rtdd�|D��r�td��|d	r�|d
�std��|S)N�ZNFKCzInvalid character %rcSsg|]}t�|��qS�)�
stringprepZin_table_d1)�.0�xrr�3/opt/alt/python37/lib64/python3.7/encodings/idna.py�
<listcomp>)sznameprep.<locals>.<listcomp>css|]}t�|�VqdS)N)rZin_table_d2)rrrrr�	<genexpr>1sznameprep.<locals>.<genexpr>zViolation of BIDI requirement 2r���zViolation of BIDI requirement 3)rZin_table_b1�appendZmap_table_b2�join�unicodedataZ	normalizeZin_table_c12Zin_table_c22Zin_table_c3Zin_table_c4Zin_table_c5Zin_table_c6Zin_table_c7Zin_table_c8Zin_table_c9�UnicodeError�any)�labelZnewlabel�cZRandALrrr�namepreps2













rcCs�y|�d�}Wntk
r"Yn*Xdt|�kr<dkrDnn|Std��t|�}y|�d�}Wntk
rvYn*Xdt|�kr�dkr�nn|Std��|�t�r�td��|�d�}t|}dt|�kr�dkr�nn|Std��dS)N�asciir�@zlabel empty or too longzLabel starts with ACE prefix�punycode)�encoder�lenr�
startswith�sace_prefix�
ace_prefix)rrrr�ToASCII<s,

rcCs�t|t�rd}n,y|�d�}d}Wntk
r:d}YnX|stt|�}y|�d�}Wntk
rrtd��YnX|�t�s�t|d�S|tt�d�}|�	d�}t
|�}t|d���t|d�kr�td||��|S)NTrFzInvalid character in IDN labelrzIDNA does not round-trip)�
isinstance�bytesrrrrr�strr�decoder�lower)rZ
pure_asciiZlabel1�resultZlabel2rrr�	ToUnicodegs*





r#c@s eZdZddd�Zddd�ZdS)	�Codec�strictcCs|dkrtd|��|sdSy|�d�}Wntk
r>YnhX|�d�}x6|dd�D]&}dt|�krtdksXntd	��qXWt|d�dkr�td
��|t|�fSt�}t�|�}|r�|ds�d}|d=nd}x(|D] }|r�|�d�|�t|��q�Wt	||�t|�fS)Nr%zunsupported error handling )�rr�.rrrzlabel empty or too longzlabel too longr&)
rr�UnicodeEncodeError�splitr�	bytearray�dots�extendrr)�self�input�errorsr"�labelsr�trailing_dotrrrr�s4



zCodec.encodecCs�|dkrtd|��|sdSt|t�s.t|�}t|kr^y|�d�t|�fStk
r\YnX|�d�}|r�t|d�dkr�d}|d=nd	}g}x|D]}|�t	|��q�Wd�
|�|t|�fS)
Nr%zUnsupported error handling )rrrr'rr�.r)rrrrr r�UnicodeDecodeErrorr)rr#r
)r-r.r/r0r1r"rrrrr �s(


zCodec.decodeN)r%)r%)�__name__�
__module__�__qualname__rr rrrrr$�s
%r$c@seZdZdd�ZdS)�IncrementalEncoderc	Cs�|dkrtd|��|sdSt�|�}d}|rT|dsBd}|d=n|sT|d=|rTd}t�}d}x<|D]4}|r~|�d�|d7}|�t|��|t|�7}qdW||7}|t|�7}t|�|fS)	Nr%zunsupported error handling )r&rr&rr'r�)rr+r)r*r,rrr)	r-r.r/�finalr0r1r"�sizerrrr�_buffer_encode�s2


z!IncrementalEncoder._buffer_encodeN)r4r5r6r;rrrrr7�sr7c@seZdZdd�ZdS)�IncrementalDecoderc	Cs�|dkrtd|��|sdSt|t�r2t�|�}nt|d�}|�d�}d}|rt|dsbd}|d=n|st|d=|rtd}g}d}x2|D]*}|�t|��|r�|d	7}|t|�7}q�Wd�|�|}|t|�7}||fS)
Nr%zUnsupported error handling )rrrr2rrrr8)	rrrr+r)rr#rr
)	r-r.r/r9r0r1r"r:rrrr�_buffer_decode�s6



z!IncrementalDecoder._buffer_decodeN)r4r5r6r=rrrrr<�sr<c@seZdZdS)�StreamWriterN)r4r5r6rrrrr>"sr>c@seZdZdS)�StreamReaderN)r4r5r6rrrrr?%sr?c	Cs tjdt�jt�jttttd�S)NZidna)�namerr �incrementalencoder�incrementaldecoder�streamwriter�streamreader)	�codecs�	CodecInfor$rr r7r<r>r?rrrr�getregentry*srG)r�rerErr�compiler+rrrrr#r$�BufferedIncrementalEncoderr7�BufferedIncrementalDecoderr<r>r?rGrrrr�<module>s
.+)H#'

Zerion Mini Shell 1.0