ok

Mini Shell

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

B

�x�c�#�@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��NFKCzInvalid 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�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	�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�.rrrzlabel empty or too longzlabel too longr()
rr�UnicodeEncodeError�splitr�	bytearray�dots�extendrr )�self�input�errorsr$�labelsr�trailing_dotrrr	r�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)rr�.r)rrr rr"r�UnicodeDecodeErrorr+r
r%r)r/r0r1r2r3r$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}x<|D]4}|r~|�d�|d7}|�t|��|t|�7}qdW||7}|t|�7}t|�|fS)	Nr'zunsupported error handling )r(rr(rr)r�)rr-r+r,r.rrr )	r/r0r1�finalr2r3r$�sizerrrr	�_buffer_encode�s2


z!IncrementalEncoder._buffer_encodeN)r6r7r8r=rrrr	r9�sr9c@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 )rrrr4rrrr:)	rrr!r-r+r
r%rr)	r/r0r1r;r2r3r$r<rrrr	�_buffer_decode�s6



z!IncrementalDecoder._buffer_decodeN)r6r7r8r?rrrr	r>�sr>c@seZdZdS)�StreamWriterN)r6r7r8rrrr	r@"sr@c@seZdZdS)�StreamReaderN)r6r7r8rrrr	rA%srAc	Cs tjdt�jt�jttttd�S)NZidna)�namerr"�incrementalencoder�incrementaldecoder�streamwriter�streamreader)	�codecs�	CodecInfor&rr"r9r>r@rArrrr	�getregentry*srI)r�rerGrr�compiler-rrrrr%r&�BufferedIncrementalEncoderr9�BufferedIncrementalDecoderr>r@rArIrrrr	�<module>s
.+)H#'

Zerion Mini Shell 1.0