Hacked By AnonymousFox

Current Path : /lib64/python3.8/encodings/__pycache__/
Upload File :
Current File : //lib64/python3.8/encodings/__pycache__/idna.cpython-38.pyc

U

e5d�#�@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--cCs�g}|D] }t�|�rq|�t�|��qd�|�}t�d|�}|D]j}t�|�s�t�|�s�t�	|�s�t�
|�s�t�|�s�t�|�s�t�
|�s�t�|�s�t�|�rDtd|��qDdd�|D�}t|�r�tdd�|D��r�td��|d	r�|d
s�td��|S)N��NFKCzInvalid character %rcSsg|]}t�|��qS�)�
stringprepZin_table_d1��.0�xrr�&/usr/lib64/python3.8/encodings/idna.py�
<listcomp>)sznameprep.<locals>.<listcomp>css|]}t�|�VqdS)N)rZin_table_d2rrrr
�	<genexpr>1sznameprep.<locals>.<genexpr>zViolation of BIDI requirement 2r���zViolation of BIDI requirement 3)rZin_table_b1�appendZmap_table_b2�join�unicodedata�	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
�nameprepsB

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

r cCs�t|t�rd}n,z|�d�}d}Wntk
r:d}YnX|stt|�}z|�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|��|sdSz|�d�}Wntk
r>YndX|�d�}|dd�D]&}dt|�krrdksVntd	��qVt|d�dkr�td
��|t|�fSt�}t�|�}|r�|ds�d}|d=nd}|D] }|r�|�d�|�t|��q�t	||�t|�fS)Nr)�unsupported error handling ��rr�.r
rrrzlabel too longr,)
rr�UnicodeEncodeError�splitr�	bytearray�dots�extendr r")�self�input�errorsr&�labelsr�trailing_dotrrr
r�s4



zCodec.encodecCs�|dkrtd|��|sdSt|t�s.t|�}t|kr`z|�d�t|�fWStk
r^YnX|�d�}|r�t|d�dkr�d}|d=nd	}g}|D]}|�t	|��q�d�
|�|t|�fS)
Nr)�Unsupported error handling �rrrr-r
r�.r)rr!r"rr$r�UnicodeDecodeErrorr/rr'r)r3r4r5r6r7r&rrrr
r$�s(

zCodec.decodeN)r))r))�__name__�
__module__�__qualname__rr$rrrr
r(�s
%r(c@seZdZdd�ZdS)�IncrementalEncoderc	Cs�|dkrtd|��|sdSt�|�}d}|rT|dsBd}|d=n|sT|d=|rTd}t�}d}|D]4}|r||�d�|d7}|�t|��|t|�7}qb||7}|t|�7}t|�|fS)	Nr)r*r+r,r
r-r�)rr1r/r0r2r rr"�	r3r4r5�finalr6r7r&�sizerrrr
�_buffer_encode�s2

z!IncrementalEncoder._buffer_encodeN)r<r=r>rDrrrr
r?�sr?c@seZdZdd�ZdS)�IncrementalDecoderc	Cs�|dkrtd|��|sdSt|t�r2t�|�}nt|d�}|�d�}d}|rt|dsbd}|d=n|st|d=|rtd}g}d}|D]*}|�t|��|r�|d	7}|t|�7}q�d�|�|}|t|�7}||fS)
Nr)r8r9rr:rr
rr@)	rr!r#r1r/rr'rrrArrr
�_buffer_decode�s6


z!IncrementalDecoder._buffer_decodeN)r<r=r>rFrrrr
rE�srEc@seZdZdS)�StreamWriterN�r<r=r>rrrr
rG"srGc@seZdZdS)�StreamReaderNrHrrrr
rI%srIc	Cs tjdt�jt�jttttd�S)NZidna)�namerr$�incrementalencoder�incrementaldecoder�streamwriter�streamreader)	�codecs�	CodecInfor(rr$r?rErGrIrrrr
�getregentry*s�rQ)r�rerOrr�compiler1rrrr r'r(�BufferedIncrementalEncoderr?�BufferedIncrementalDecoderrErGrIrQrrrr
�<module>s
.+)H#'

Hacked By AnonymousFox1.0, Coded By AnonymousFox