1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
U
H=®dã ã@s ddlmZmZmZmZmZddlZddlZe d¡Z    Gdd„dej
ƒZ
Gdd„dej ƒZ Gd    d
„d
ej ƒZGd d „d e
ejƒZGd d„de
ejƒZdd„ZdS)é)ÚencodeÚdecodeÚalabelÚulabelÚ    IDNAErroréNu [.。.。]c@s eZdZddd„Zddd„ZdS)    ÚCodecÚstrictcCs.|dkrtd |¡ƒ‚|sdSt|ƒt|ƒfS©Nr    ú Unsupported error handling "{0}"©Úr)rÚformatrÚlen©ÚselfÚdataÚerrors©rúMD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\pip/_vendor/idna/codec.pyr    s
z Codec.encodecCs.|dkrtd |¡ƒ‚|sdSt|ƒt|ƒfSr
)rrrrrrrrrs
z Codec.decodeN)r    )r    )Ú__name__Ú
__module__Ú __qualname__rrrrrrrs
 
rc@seZdZdd„ZdS)ÚIncrementalEncoderc    Cs°|dkrtd |¡ƒ‚|sdSt |¡}d}|rV|dsDd}|d=n|sV|d=|rVd}g}d}|D]*}| t|ƒ¡|r€|d7}|t|ƒ7}qbd |¡|}|t|ƒ7}||fS)    Nr    r r r éÿÿÿÿÚ.rr)rrÚ_unicode_dots_reÚsplitÚappendrrÚjoin©    rrrÚfinalÚlabelsÚ trailing_dotÚresultÚsizeÚlabelrrrÚ_buffer_encodes0
 z!IncrementalEncoder._buffer_encodeN)rrrr'rrrrrsrc@seZdZdd„ZdS)ÚIncrementalDecoderc    CsØ|dkrtd |¡ƒ‚|sdSt|tƒr4t |¡}nt|ƒ}t|dƒ| d¡}d}|r~|dsld}|d=n|s~|d=|r~d}g}d}|D]*}| t|ƒ¡|r¨|d    7}|t    |ƒ7}qŠd 
|¡|}|t    |ƒ7}||fS)
Nr    r r Úasciirr rrr) rrÚ
isinstanceÚunicoderrÚstrrrrrr rrrÚ_buffer_decode?s8
 
 
 z!IncrementalDecoder._buffer_decodeN)rrrr-rrrrr(>sr(c@s eZdZdS)Ú StreamWriterN©rrrrrrrr.gsr.c@s eZdZdS)Ú StreamReaderNr/rrrrr0jsr0c    Cs tjdtƒjtƒjttttdS)NÚidna)ÚnamerrÚincrementalencoderÚincrementaldecoderÚ streamwriterÚ streamreader)    ÚcodecsÚ    CodecInforrrrr(r.r0rrrrÚ getregentrymsùr9)Úcorerrrrrr7ÚreÚcompilerrÚBufferedIncrementalEncoderrÚBufferedIncrementalDecoderr(r.r0r9rrrrÚ<module>s
!)