Mini Shell

Direktori : /lib64/python3.9/encodings/__pycache__/
Upload File :
Current File : //lib64/python3.9/encodings/__pycache__/idna.cpython-39.pyc

a

�DOg�#�@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.9/encodings/idna.py�
<listcomp>)�znameprep.<locals>.<listcomp>css|]}t�|�VqdS)N)rZin_table_d2rrrr
�	<genexpr>1rznameprep.<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�}Wnty Yn*0dt|�kr:dkrBnn|Std��t|�}z|�d�}WntyrYn*0dt|�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}Wnty8d}Yn0|spt|�}z|�d�}Wntyntd��Yn0|�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�}Wnty<Ynd0|�d�}|dd�D]&}dt|�krpdksTntd	��qTt|d�dkr�td
��|t|�fSt�}t�|�}|r�|ds�d}|d=nd}|D] }|r�|�d�|�t|��q�t	||�t|�fS)Nr*�unsupported error handling �rrr�.rrrrzlabel 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|vr^z|�d�t|�fWSty\Yn0|�d�}|r�t|d�dkr�d}|d=nd	}g}|D]}|�t	|��q�d�
|�|t|�fS)
Nr*�Unsupported error handling �rrrr-rr�.r)rr"r#r r%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rr-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:rrrr@)	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�compiler1r rrr!r(r)�BufferedIncrementalEncoderr?�BufferedIncrementalDecoderrErGrIrQrrrr
�<module>s
.+)H#'

Zerion Mini Shell 1.0