Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/encodings/
Upload File :
Current File : //usr/lib/python2.7/encodings/idna.pyc


|_c@sddlZddlZddlZddlmZejdZdZeedZ	dZ
dZdZd	ej
fd
YZ
dejfdYZd
ejfdYZde
ejfdYZde
ejfdYZdZdS(iN(t	ucd_3_2_0u[.。.。]sxn--tasciicCsg}x9|D]1}tj|r(q
n|jtj|q
Wdj|}tjd|}x|D]}tj|stj|stj	|stj
|stj|stj|stj
|stj|stj|rjtd|qjqjWttj|}x]|D]U}|r'ttj|rTtdn|dsj|dr|tdq|q'q'W|S(NutNFKCsInvalid character %rsViolation of BIDI requirement 2iisViolation of BIDI requirement 3(t
stringpreptin_table_b1tappendtmap_table_b2tjointunicodedatat	normalizetin_table_c12tin_table_c22tin_table_c3tin_table_c4tin_table_c5tin_table_c6tin_table_c7tin_table_c8tin_table_c9tUnicodeErrortmaptin_table_d1tfiltertin_table_d2(tlabeltnewlabeltctRandAL((s$/usr/lib/python2.7/encodings/idna.pytnamepreps4


cCs+y|jd}Wntk
r&n3Xdt|koDdknrM|Stdt|}y|jd}Wntk
rn3Xdt|kodknr|Std|jtrtdn|jd}t|}dt|kodknr|StddS(NRii@slabel empty or too longsLabel starts with ACE prefixtpunycode(tencodeRtlenRt
startswithtuace_prefixt
ace_prefix(R((s$/usr/lib/python2.7/encodings/idna.pytToASCII>s,
"
"
"cCst|trt}n3y|jd}t}Wntk
rJt}nX|st|}y|jd}Wqtk
rtdqXn|jtst	|dS|t
t}|jd}t|}|j
|krtd||n|S(NRsInvalid character in IDN labelRsIDNA does not round-trip(t
isinstancetstrtTrueRRtFalseRR R"tunicodeRtdecodeR#tlower(Rt
pure_asciitlabel1tresulttlabel2((s$/usr/lib/python2.7/encodings/idna.pyt	ToUnicodeis*	




tCodeccBs eZddZddZRS(tstrictcCs|dkrtd|n|s)dSg}tj|}|rjt|ddkrjd}|d=nd}x!|D]}|jt|qwWdj||t|fS(NR1sunsupported error handling tiit.(R2i(RtdotstsplitRRR#R(tselftinputterrorsR-tlabelsttrailing_dotR((s$/usr/lib/python2.7/encodings/idna.pyRs

cCs|dkrtd|n|s)d	St|trJtj|}n(t|}t|d|jd}|rt|ddkrd}|d=nd}g}x!|D]}|jt|qWdj	||t|fS(
NR1sUnsupported error handling uiRR3iu.(ui(
RR$R(R4R5R%RRR/R(R6R7R8R9R:R-R((s$/usr/lib/python2.7/encodings/idna.pyR)s"


(t__name__t
__module__RR)(((s$/usr/lib/python2.7/encodings/idna.pyR0stIncrementalEncodercBseZdZRS(c	Cs|dkrtd|n|s)d	Stj|}d}|r|ds^d}|d=q|s|d=|r}d}q}qng}d}xD|D]<}|jt||r|d7}n|t|7}qWdj||}|t|7}||fS(
NR1sunsupported error handling R2iuiR3i(R2i(RR4R5RR#RR(	R6R7R8tfinalR9R:R-tsizeR((s$/usr/lib/python2.7/encodings/idna.pyt_buffer_encodes0



(R;R<R@(((s$/usr/lib/python2.7/encodings/idna.pyR=stIncrementalDecodercBseZdZRS(c	Cs:|dkrtd|n|s)d
St|trJtj|}n(t|}t|d|jd}d}|r|dsd}|d=q|s|d=|rd}qqng}d}xD|D]<}|jt||r|d	7}n|t|7}qWdj	||}|t|7}||fS(NR1sUnsupported error handling uiRR3iu.i(ui(
RR$R(R4R5R%RR/RR(	R6R7R8R>R9R:R-R?R((s$/usr/lib/python2.7/encodings/idna.pyt_buffer_decodes8




(R;R<RB(((s$/usr/lib/python2.7/encodings/idna.pyRAstStreamWritercBseZRS((R;R<(((s$/usr/lib/python2.7/encodings/idna.pyRCstStreamReadercBseZRS((R;R<(((s$/usr/lib/python2.7/encodings/idna.pyRDscCs@tjdddtjdtjdtdtdtdtS(	NtnametidnaRR)tincrementalencodertincrementaldecodertstreamwritertstreamreader(	tcodecst	CodecInfoR0RR)R=RARCRD(((s$/usr/lib/python2.7/encodings/idna.pytgetregentrys	(RtreRKRRtcompileR4R"R(R!RR#R/R0tBufferedIncrementalEncoderR=tBufferedIncrementalDecoderRARCRDRM(((s$/usr/lib/python2.7/encodings/idna.pyt<module>s$	0	+	)3"(