Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pyc

ó
“tĘ_c@s¬ddlmZddlZddlZddlZddlZddlmZdZdZ	ej
dƒZejdd	kre
ZeZnd
efd„ƒYZdefd
„ƒYZdefd„ƒYZdefd„ƒYZd„Zd„Zd„Zd„Zd„Zd„Zed„Zd„Zd„Zd„Z d„Z!ed„Z"d„Z#d„Z$d „Z%e&ed!„Z'eeeed"„Z(eeed#„Z)dS($i(tidnadatai’’’’N(tintranges_containi	sxn--u[.ć€‚ļ¼Žļ½”]iit	IDNAErrorcBseZdZRS(s7 Base exception for all IDNA-encoding related problems (t__name__t
__module__t__doc__(((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pyRst
IDNABidiErrorcBseZdZRS(s= Exception when bidirectional requirements are not satisfied (RRR(((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pyRstInvalidCodepointcBseZdZRS(s> Exception when a disallowed or unallocated codepoint is used (RRR(((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pyRstInvalidCodepointContextcBseZdZRS(sE Exception when the codepoint is not valid in the context it is used (RRR(((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pyRscCsLtjt|ƒƒ}|dkrHtjt|ƒƒsHtdƒ‚qHn|S(Nis Unknown character in unicodedata(tunicodedatat	combiningtunichrtnamet
ValueError(tcptv((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pyt_combining_class$s
cCstt|ƒtj|ƒS(N(RtordRtscripts(Rtscript((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pyt
_is_script+scCs
|jdƒS(Ntpunycode(tencode(ts((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pyt	_punycode.scCs
dj|ƒS(Ns	U+{0:04X}(tformat(R((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pyt_unot1scCst|ƒdkrtStS(Ni?(tlentFalsetTrue(tlabel((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pytvalid_label_length5scCs&t|ƒ|rdndkr"tStS(Nižiż(RRR(Rttrailing_dot((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pytvalid_string_length<sc	
Cst}xnt|dƒD]]\}}tj|ƒ}|dkr^tdjt|ƒ|ƒƒ‚n|dkrt}qqW|r‰|r‰tStj|dƒ}|dkr±t}n0|dkrĘt}ntd	jt|ƒƒƒ‚t}t}x
t|dƒD]ł\}}tj|ƒ}|rØ|dkrBtdj|ƒƒ‚n|dkrWt}n|dkrlt}n|dkrö|s‡|}q„||kr„tdƒ‚q„qöqż|dkrĢtdj|ƒƒ‚n|dkrįt}qż|dkrżt}qżqżW|stdƒ‚ntS(Nits3Unknown directionality in label {0} at position {1}tRtALtANitLs>First codepoint in label {0} must be directionality L, R or ALtENtEStCStETtONtBNtNSMsHInvalid direction for codepoint at position {0} in a right-to-left labels2Can not mix numeral types in a right-to-left labelsHInvalid direction for codepoint at position {0} in a left-to-right labels0Label ends with illegal codepoint directionality(R#R$R%(R#R$(
R#R$R%R'R(R)R*R+R,R-(R#R$R'R%(R%R'(R&R'R(R)R*R+R,R-(R&R'(Rt	enumerateR	t
bidirectionalRRtreprR(	Rt	check_ltrt
bidi_labeltidxRt	directiontrtltvalid_endingtnumber_type((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pyt
check_bidiCsP!
						
cCs0tj|dƒddkr,tdƒ‚ntS(NitMs0Label begins with an illegal combining character(R	tcategoryRR(R((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pytcheck_initial_combinerscCsU|dd!dkr"tdƒ‚n|ddksB|ddkrQtdƒ‚ntS(	Niis--s4Label has disallowed hyphens in 3rd and 4th positionit-i’’’’s)Label must not start or end with a hyphen(RR(R((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pytcheck_hyphen_ok†s
 cCs+tjd|ƒ|kr'tdƒ‚ndS(NtNFCs%Label must be in Normalization Form C(R	t	normalizeR(R((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pyt	check_nfcscCs±t||ƒ}|dkrf|dkrOtt||dƒƒtkrOtSnt}xzt|dddƒD]b}tjjt||ƒƒ}|tdƒkr¦qln|tdƒtdƒgkrlt}PqlqlW|sÜtSt}x}t|dt	|ƒƒD]b}tjjt||ƒƒ}|tdƒkr6qün|tdƒtdƒgkrüt}PqüqüW|S|d	kr©|dkr„tt||dƒƒtkr„tSntStSdS(
Ni iii’’’’tTR&tDR#i
 (
RRt_virama_combining_classRRtrangeRt
joining_typestgetR(Rtpostcp_valuetoktitjoining_type((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pytvalid_contextj•s<   cCs!t||ƒ}|dkrd|ko=t|ƒdknr}t||dƒdkr}t||dƒdkr}tSntS|dkrĪ|t|ƒdkrŹt|ƒdkrŹt||ddƒStS|dksę|dkr|dkrt||dd	ƒStS|d
kroxQ|D]I}|dkr6qnt|dƒsct|d
ƒsct|dƒrtSqWtSd|ko†dknrĘx4|D],}dt|ƒkoµdknr’tSq’WtSd|koŻdknrx4|D],}dt|ƒkodknrétSqéWtSdS(Ni·iiiliutGreekióiōtHebrewiū0u惻tHiraganatKatakanatHani`iiišił(RRRRR(RRGt	exceptionRHR((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pytvalid_contextoĮs>&4(
-
"
"cCsÓt|ttfƒr'|jdƒ}nt|ƒdkrHtdƒ‚nt|ƒt|ƒt|ƒx\t	|ƒD]N\}}t
|ƒ}t|tj
dƒr§qsqst|tj
dƒr@yAt||ƒsżtdjt|ƒ|dt|ƒƒƒ‚nWqĮtk
r<tdjt|ƒ|dt|ƒƒƒ‚qĮXqst|tj
d	ƒr–t||ƒsĮtd
jt|ƒ|dt|ƒƒƒ‚qĮqstdjt|ƒ|dt|ƒƒƒ‚qsWt|ƒdS(Nsutf-8isEmpty LabeltPVALIDtCONTEXTJs-Joiner {0} not allowed at position {1} in {2}is?Unknown codepoint adjacent to joiner {0} at position {1} in {2}tCONTEXTOs0Codepoint {0} not allowed at position {1} in {2}s0Codepoint {0} at position {1} of {2} not allowed(t
isinstancetbytest	bytearraytdecodeRRR@R=R;R.RRRtcodepoint_classesRLRRRR0R
RSRR8(RRGRRH((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pytcheck_labelźs0


	)
	)1/cCs°y<|jdƒ}t|ƒt|ƒs7tdƒ‚n|SWntk
rOnX|setdƒ‚nt|ƒ}t|ƒt|ƒ}t|}t|ƒs¬tdƒ‚n|S(NtasciisLabel too longsNo Input(	RtulabelRRtUnicodeEncodeErrortunicodeR\Rt_alabel_prefix(R((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pytalabel
s"



cCsét|ttfƒsJy|jdƒ}WqJtk
rFt|ƒ|SXn|jƒ}|jtƒrµ|t	tƒ}|sŠt
dƒ‚n|jdƒddkrĢt
dƒ‚qĢnt|ƒ|jdƒS|jdƒ}t|ƒ|S(NR]s5Malformed A-label, no Punycode eligible content foundi’’’’R<s"A-label must not end with a hyphenR(RWRXRYRR_R\tlowert
startswithRaRRRZ(R((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pyR^#s$




c
Cs”ddlm}d}yHx1t|ƒD]#\}}t|ƒ}||dkrS|ntj||dfƒd}|d}	t|ƒdkr–|dnd}
|	dksŚ|	d	kr»|sŚ|	d
krē|rē|
dkrē||7}q&|
dk	r1|	dks$|	d
kr|s$|	d	kr1|r1||
7}q&|	dkr&tƒ‚q&q&Wtj	d
|ƒSWn<tk
rœt
djt|ƒ|dt
|ƒƒƒ‚nXdS(sBRe-map the characters in the string according to UTS46 processing.i(t	uts46datauitZiitVRBt3R9tIR>s0Codepoint {0} not allowed at position {1} in {2}N(ReR.Rtbisecttbisect_leftRtNonet
IndexErrorR	R?RRRR0(tdomaint
std3_rulesttransitionalRetoutputRGtchart
code_pointtuts46rowtstatustreplacement((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pytuts46_remap<s0
"


c	Cs@t|ttfƒr'|jdƒ}n|rBt|||ƒ}nt}g}|rf|jdƒ}ntj|ƒ}|s‹|dgkrštdƒ‚n|ddkrŗ|d=t	}nx<|D]4}t
|ƒ}|ré|j|ƒqĮtdƒ‚qĮW|r|jdƒndj|ƒ}t
||ƒs<tdƒ‚n|S(NR]t.R"sEmpty domaini’’’’sEmpty labelsDomain too long(RWRXRYRZRwRtsplitt_unicode_dots_reRRRbtappendtjoinR!(	Rtstricttuts46RoRpR tresulttlabelsR((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pyRXs2	
cCst|ttfƒr'|jdƒ}n|rBt||tƒ}nt}g}|sftj|ƒ}n|jdƒ}|s‹|dgkrštdƒ‚n|ds“|d=t	}nx<|D]4}t
|ƒ}|rć|j|ƒq»tdƒ‚q»W|r	|jdƒndj|ƒS(NR]u.R"sEmpty domaini’’’’sEmpty labelu(
RWRXRYRZRwRRzRyRRR^R{R|(RR}R~RoR RR€R((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pyRZws,
	
(*R"RRjR	tretsyst	intrangesRRCRatcompileRztversion_infotstrR`tchrRtUnicodeErrorRRRRRRRRRR!RR8R;R=R@RLRSR\RbR^RRwRRZ(((sF/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/idna/core.pyt<module>sB							<					,)	 		
Back to Directory File Manager