+
    m4i?Õ  ã                   óp  € ^ RI Ht ^ RIt^ RIt^ RIHtHtHtHtH	t	H
t
 ^RIHt ^RIHtHt ^RIHtHt ]P&                  ^ ,          ^8H  t]! R4      tRtR	t. RNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NR0NR1NR2NR3NtR4t ! R
 R]4      tR# )5é    )Úunicode_literalsN)ÚAnyÚIterableÚOptionalÚTextÚTupleÚcast)ÚHyperlinkTestCase)ÚURLÚURLParseError)Ú	inet_ptonÚSCHEME_PORT_MAPÚ ú*http://www.foo.com/a/nice/path/?zot=23&zutúhttp://a/b/c/d;p?qc                   óê  a € ] tR t^‘t o RtR tROR ltR tR tR t	R t
R tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!R t"R  t#R! t$R" t%R# t&R$ t'R% t(R& t)R' t*R( t+R) t,R* t-R+ t.R, t/R- t0R. t1R/ t2R0 t3R1 t4R2 t5R3 t6R4 t7R5 t8R6 t9R7 t:R8 t;R9 t<R: t=R; t>R< t?R= t@R> tAR? tBR@ tCRA tDRB tERC tFRD tGRE tHRF tIRG tJRH tKRI tLRJ tMRK tNRL tORMtPV tQRN# )PÚTestURLz
Tests for L{URL}.
c                óî  € T P                  \        VP                  \        4      ;'       g    VP                  RJ \	        V4      4       T P                  \        VP
                  \        4      ;'       g    VP
                  RJ \	        V4      4       VP                   F,  pV P                  \        V4      \        \	        V4      4       K.  	  VP                   Fc  w  r4V P                  \        X4      \        \	        V4      4       T P                  VRJ ;'       g    \        V\        4      \	        V4      4       Ke  	  V P                  \        VP                  4      \        \	        V4      4       R# )zT
The given L{URL}'s components should be L{unicode}.

@param u: The L{URL} to test.
N)Ú
assertTrueÚ
isinstanceÚschemeÚunicodeÚreprÚhostÚpathÚassertEqualÚtypeÚqueryÚfragment)ÚselfÚuÚsegÚ_kÚvs   &&   Ú9/usr/lib/python3/dist-packages/hyperlink/test/test_url.pyÚassertUnicodedÚTestURL.assertUnicoded–   sü   € ð 	�‰Ü�q—x‘x¤Ó)×=Ð=¨Q¯X©X¸Ð-=¼tÀA»wô	
ð 	�‰œ
 1§6¡6¬7Ó3×EÐE°q·v±vÀ°~ÄtÈAÃwÔOØ—6”6ˆCØ×ÑœT #›Y¬´°a³Ö9ñ à—w”w‰GˆRØ×ÑœT #›Y¬´°a³Ô9Ø�O‰O˜A ˜I×?Ð?¬°A´wÓ)?ÄÀaÃÖIñ ð 	×Ñœ˜aŸj™jÓ)¬7´D¸³GÖ<ó    c	                ó  € VP                   VP                  VP                  VP                  VP                  VP
                  VP                  3p	VV\        V4      \        V4      VVVP                  3p
V P                  Wš4       R# )aZ  
The given L{URL} should have the given components.

@param u: The actual L{URL} to examine.

@param scheme: The expected scheme.

@param host: The expected host.

@param path: The expected path.

@param query: The expected query.

@param fragment: The expected fragment.

@param port: The expected port.

@param userinfo: The expected userinfo.
N)	r   r   r   r   r   ÚportÚuserinfoÚtupler   )r    r!   r   r   r   r   r   r*   r+   ÚactualÚexpecteds   &&&&&&&&&  r%   Ú	assertURLÚTestURL.assertURL¨   sw   € ð@ �H‰HØ�F‰FØ�F‰FØ�G‰GØ�J‰JØ�F‰FØ�J‰Jð
ˆð ØÜ�$‹KÜ�%‹LØØØ�J‰Jð
ˆð 	×Ñ˜Ö*r(   c           	     óŠ   a € V 3R lpV! \        RR4      4       V! \        RR. . 4      4       V! \        RR. . R4      4       R# )z0
L{URL} should have appropriate default values.
c           
      óZ   <€ SP                  V 4       SP                  V R R. . R^PR4       R# )Úhttpr   N)r&   r/   )r!   r    s   &€r%   ÚcheckÚ(TestURL.test_initDefaults.<locals>.checká   s+   ø€ à×Ñ Ô"Ø�N‰N˜1˜f b¨"¨b°"°b¸"Ö=r(   r3   r   N)r   )r    r4   s   f r%   Útest_initDefaultsÚTestURL.test_initDefaultsÛ   s@   ø€ õ	>ñ
 	Œc�&˜"‹oÔÙŒc�&˜"˜b "Ó%Ô&ÙŒc�&˜"˜b " bÓ)Ö*r(   c           	     óÐ   € \        RRR.R
R.R4      pV P                  V4       V P                  VRRR.R
R.RR4       V P                  \        RRR.R.R	4      RRR.R.R	^P4       R# )z-
L{URL} should accept L{unicode} parameters.
ÚsÚhÚpNÚfr3   ô   Ã ô   Ã©u   âŠ¥©Úkr$   )r@   N)u   Î»u   Ï€©r   r&   r/   ©r    r!   s   & r%   Ú	test_initÚTestURL.test_initê   sƒ   € ô
 ��S˜3˜% *¨kÐ!:¸CÓ@ˆØ×Ñ˜AÔØ�‰�q˜#˜s S E¨J¸Ð+DÀcÈ4ÔPà�‰Ü�˜  Ð+?Ð*@À(ÓKØØØˆHØ!Ð"ØØö	
r(   c           	     ó€   € \        RRR.RR.R4      pV P                  V4       V P                  VRRR.RR.RR4       R# )z>
L{URL} should accept (and not interpret) percent characters.
r9   z%68z%70Nz%66)ú%6Bz%76)rF   NrA   rB   s   & r%   Útest_initPercentÚTestURL.test_initPercentý   sM   € ô
 ��U˜U˜G n°mÐ%DÀeÓLˆØ×Ñ˜AÔØ�‰Øˆs�E˜E˜7 ^°]Ð$CÀUÈDö	
r(   c                óz   € V P                  \        \        RRR.R
R.RR7      4      R\        R4      : R	24       R# )zš
L{URL.__repr__} will display the canonical form of the URL, wrapped in
a L{URL.from_text} invocation, so that it is C{eval}-able but still
easy to read.
r3   ÚfooÚbarNÚfrob©r   r   r   r   r   zURL.from_text(zhttp://foo/bar?baz&k=v#frobÚ))ÚbazNr?   )r   r   r   ©r    s   &r%   Ú	test_reprÚTestURL.test_repr  sF   € ð 	×ÑÜÜØ!ØØ˜Ø(¨*Ð5Ø#ôôô $(Ð(EÖ#FÐHö	
r(   c                ó‚   € \         P                  ! \        4      pV P                  \        VP	                  4       4       R# )zK
Round-tripping L{URL.from_text} with C{str} results in an equivalent
URL.
N)r   Ú	from_textÚ	BASIC_URLr   Úto_text©r    Úurlpaths   & r%   Útest_from_textÚTestURL.test_from_text  s)   € ô —-’-¤	Ó*ˆØ×Ñœ G§O¡OÓ$5Ö6r(   c                óŽ   € \          F:  p\        P                  ! V4      P                  RR7      pV P	                  W4       K<  	  R# )z0
L{URL.to_text} should invert L{URL.from_text}.
T©Úwith_passwordN)ÚROUNDTRIP_TESTSr   rT   rV   r   )r    ÚtestÚresults   &  r%   Útest_roundtripÚTestURL.test_roundtrip%  s8   € ÷
 $ˆDÜ—]’] 4Ó(×0Ñ0¸tÐ0ÓDˆFØ×Ñ˜TÖ*ó $r(   c                óô   € \          Fm  p\        P                  ! V4      pVP                  4       pVP                  4       pW48X  g   Q hVP	                  R R7      pVP	                  R R7      pWV8X  d   Km  Q h	  R# )Tr\   N)r^   r   rT   Úto_irirV   )r    r_   ÚurlÚiriÚ
double_iriÚiri_textÚdouble_iri_texts   &      r%   Útest_roundtrip_double_iriÚ!TestURL.test_roundtrip_double_iri.  sp   € ç#ˆDÜ—-’- Ó%ˆCØ—*‘*“,ˆCØŸ™›ˆJØÔ$Ð$Ð$à—{‘{°�{Ó6ˆHØ(×0Ñ0¸tÐ0ÓDˆOØÖ.Ð.Ð.ñ $ñ 	r(   c                óÚ   € \         P                  ! \        4      pV P                  V\         P                  ! \        4      4       V P	                  V\         P                  ! R4      4       R# )z—
Two URLs decoded using L{URL.from_text} will be equal (C{==}) if they
decoded same URL string, and unequal (C{!=}) if they decoded different
strings.
z:ftp://www.anotherinvaliddomain.com/foo/bar/baz/?zot=21&zutN)r   rT   rU   r   ÚassertNotEqualrW   s   & r%   Útest_equalityÚTestURL.test_equality;  sK   € ô —-’-¤	Ó*ˆØ×Ñ˜¤#§-¢-´	Ó":Ô;Ø×ÑØÜ�MŠMØOóö	
r(   c                óÂ   € V P                  \        RR7      \        4       4       V P                  \        P                  ! R4      \        P                  ! R4      4       R# )zt
An URL created with the empty string for a fragment compares equal
to an URL created with an unspecified fragment.
r   )r   zhttp://localhost/#úhttp://localhost/N)r   r   rT   rP   s   &r%   Útest_fragmentEqualityÚTestURL.test_fragmentEqualityK  sC   € ð 	×Ñœ bÔ)¬3«5Ô1Ø×ÑÜ�MŠMÐ.Ó/Ü�MŠMÐ-Ó.ö	
r(   c                ó²  € \         P                  ! \        4      pV P                  RVP	                  R4      P                  4       4       V P                  RVP	                  R4      P                  4       4       V P                  RVP	                  R4      P                  4       4       V P                  RVP	                  R4      P                  4       4       R	# )
zU
L{URL.child} appends a new path segment, but does not affect the query
or fragment.
z.http://www.foo.com/a/nice/path/gong?zot=23&zutÚgongz1http://www.foo.com/a/nice/path/gong%2F?zot=23&zutzgong/z7http://www.foo.com/a/nice/path/gong%2Fdouble?zot=23&zutzgong/doublez:http://www.foo.com/a/nice/path/gong%2Fdouble%2F?zot=23&zutzgong/double/N)r   rT   rU   r   ÚchildrV   rW   s   & r%   Ú
test_childÚTestURL.test_childW  s°   € ô —-’-¤	Ó*ˆØ×ÑØ<Ø�M‰M˜&Ó!×)Ñ)Ó+ô	
ð 	×ÑØ?Ø�M‰M˜'Ó"×*Ñ*Ó,ô	
ð 	×ÑØEØ�M‰M˜-Ó(×0Ñ0Ó2ô	
ð 	×ÑØHØ�M‰M˜.Ó)×1Ñ1Ó3ö	
r(   c                ó”   € \         P                  ! R4      pV P                  VP                  RRR4      P	                  4       R4       R# )zO
L{URL.child} receives multiple segments as C{*args} and appends each in
turn.
zhttp://example.com/a/bÚcÚdÚezhttp://example.com/a/b/c/d/eN)r   rT   r   rv   rV   ©r    re   s   & r%   Útest_multiChildÚTestURL.test_multiChildo  s=   € ô �mŠmÐ4Ó5ˆØ×ÑØ�I‰I�c˜3 Ó$×,Ñ,Ó.Ð0Nö	
r(   c                ó²   € \        RR7      P                  R4      pV P                  VP                  4       V P	                  RVP                  4       4       R# )zW
L{URL.child} of a L{URL} without a path produces a L{URL} with a single
path segment.
úwww.foo.com©r   rz   zhttp://www.foo.com/cN)r   rv   r   Úrootedr   rV   )r    ÚchildURLs   & r%   Útest_childInitRootÚTestURL.test_childInitRootz  sC   € ô ˜MÔ*×0Ñ0°Ó5ˆØ�‰˜Ÿ™Ô(Ø×ÑÐ/°×1AÑ1AÓ1CÖDr(   c                ó^   € \        RR7      pV P                  VP                  4       V4       R# )zD
L{URL.child} without any new segments returns the original L{URL}.
r�   r‚   N)r   r   rv   r}   s   & r%   Útest_emptyChildÚTestURL.test_emptyChild„  s$   € ô
 �}Ô%ˆØ×Ñ˜Ÿ™› cÖ*r(   c                ó&  € \         P                  ! \        4      pV P                  RVP	                  R4      P                  4       4       Rp\         P                  ! V4      pV P                  RVP	                  R4      P                  4       4       R# )zg
L{URL.sibling} of a L{URL} replaces the last path segment, but does not
affect the query or fragment.
z0http://www.foo.com/a/nice/path/sister?zot=23&zutÚsisterz)http://www.foo.com/a/nice/path?zot=23&zutz+http://www.foo.com/a/nice/sister?zot=23&zutN)r   rT   rU   r   ÚsiblingrV   )r    rX   Úurl_texts   &  r%   Útest_siblingÚTestURL.test_siblingŒ  ss   € ô —-’-¤	Ó*ˆØ×ÑØ>Ø�O‰O˜HÓ%×-Ñ-Ó/ô	
ð
 ?ˆÜ—-’- Ó)ˆØ×ÑØ9Ø�O‰O˜HÓ%×-Ñ-Ó/ö	
r(   c                óÌ  € \         P                  ! \        4      pV P                  RVP	                  R4      P                  4       4       V P                  RVP	                  R4      P                  4       4       V P                  RVP	                  R4      P                  4       4       V P                  RVP	                  R4      P                  4       4       V P                  R	VP	                  R
4      P                  4       9  4       \         P                  ! R4      pV P                  RVP	                  R4      P                  4       4       \         P                  ! R4      pV P                  VP	                  R4      P                  4       R4       \         P                  ! R4      pRpV P                  VP	                  R4      P                  4       V4       V P                  VP	                  4       P                  4       V4       \         P                  ! R4      p\         P                  ! R4      pVP	                  V4      pV P                  VP                  4       R4       R# )zŽ
L{URL.click} interprets the given string as a relative URI-reference
and returns a new L{URL} interpreting C{self} as the base absolute URI.
r   r   z$http://www.foo.com/a/nice/path/clickÚclickzhttp://www.foo.com/clickz/clickz$http://www.foo.com/a/nice/path/?burpz?burpz//foobarzhttp://www.foo.com/foobarzhttp://www.foo.com/me/noqueryz!http://www.foo.com/me/17?spam=158z/me/17?spam=158zhttp://localhost/foo?abc=defzhttp://www.python.orgz$http://hatnote.com/a/b/../c/./d/e/..zhttp://hatnote.com/a/c/d/zhttp://localhost/foo/?abc=defrK   zhttp://localhost/foo/barN)r   rT   rU   r   r‘   rV   r   ÚfromText)r    rX   r!   ÚresÚu2Úu3s   &     r%   Ú
test_clickÚTestURL.test_clickŸ  sç  € ô —-’-¤	Ó*ˆà×ÑØ8Ø�M‰M˜"Ó×%Ñ%Ó'ô	
ð
 	×ÑØ2Ø�M‰M˜'Ó"×*Ñ*Ó,ô	
ð
 	×ÑØ&¨¯©°hÓ(?×(GÑ(GÓ(Iô	
ð 	×ÑØ2Ø�M‰M˜'Ó"×*Ñ*Ó,ô	
ð 	�‰ØØ—=‘=Ð!<Ó=×EÑEÓGñHô	
ô �MŠMÐ9Ó:ˆØ×ÑØ/Ø�G‰GÐ%Ó&×.Ñ.Ó0ô	
ô �MŠMÐ8Ó9ˆØ×ÑØ�G‰GÐ+Ó,×4Ñ4Ó6Ð8Oô	
ô
 �MŠMÐ@ÓAˆØ)ˆØ×Ñ˜Ÿ™ ›×,Ñ,Ó.°Ô4ð 	×Ñ˜Ÿ™›×*Ñ*Ó,¨cÔ2ô �LŠLÐ8Ó9ˆÜ�]Š]˜5Ó!ˆØ�W‰W�R‹[ˆØ×Ñ˜Ÿ™›Ð'AÖBr(   c                ó¶   € \         P                  ! \        4      p\         F4  w  r#V P	                  VP                  V4      P                  4       V4       K6  	  R# )zA
L{URL.click} should correctly resolve the examples in RFC 3986.
N)r   rT   ÚrelativeLinkBaseForRFC3986ÚrelativeLinkTestsForRFC3986r   r‘   rV   )r    ÚbaseÚrefr.   s   &   r%   Útest_clickRFC3986ÚTestURL.test_clickRFC3986Ý  s@   € ô
 �}Š}Ô7Ó8ˆß:‰OˆSØ×Ñ˜TŸZ™Z¨›_×4Ñ4Ó6¸ÖAó  ;r(   c                ó¾   € \         P                  ! \        4      pV P                  \        VP
                  R4       V P                  \        VP
                  R4       R# )z=
L{URL.click} should not accept schemes with relative paths.
zg:hzhttp:hN)r   rT   r™   ÚassertRaisesÚNotImplementedErrorr‘   )r    r›   s   & r%   Útest_clickSchemeRelPathÚTestURL.test_clickSchemeRelPathæ  sA   € ô
 �}Š}Ô7Ó8ˆØ×ÑÔ-¨t¯z©z¸5ÔAØ×ÑÔ-¨t¯z©z¸8ÖDr(   c           
     ó6  € \         P                  ! R4      pV P                  VP                  VP                  VP
                  VP                  VP                  VP                  VP                  4      V4       V P                  VP                  4       V4       R# )zN
Verify that L{URL.replace} doesn't change any of the arguments it
is passed.
zhttps://x:1/y?z=1#AN)
r   rT   r   Úreplacer   r   r   r   r   r*   rW   s   & r%   Útest_cloneUnchangedÚTestURL.test_cloneUnchangedï  sw   € ô —-’-Ð 5Ó6ˆØ×ÑØ�O‰OØ—‘Ø—‘Ø—‘Ø—‘Ø× Ñ Ø—‘óð ô
	
ð 	×Ñ˜Ÿ™Ó*¨GÖ4r(   c                ó4  € . RO. RO. RO. RO. RO. R	O. R
O. RO. RO. RO. RO. RO. RO.pV Fh  w  r#p\         P                  ! V4      P                  V4      P                  4       pV P	                  VVRP                  V\        V4      VVR7      4       Kj  	  R# )zL
L{URL.click} collapses C{.} and C{..} according to RFC 3986 section
5.2.4.
z1{start}.click({click}) => {actual} not {expected})Ústartr‘   r-   r.   N)rq   Ú.rq   )rq   ú..rq   )úhttp://localhost/a/b/crª   zhttp://localhost/a/b/)r¬   r«   zhttp://localhost/a/)r¬   z./d/ezhttp://localhost/a/b/d/e)r¬   ú../d/eúhttp://localhost/a/d/e)r¬   z/./d/eúhttp://localhost/d/e)r¬   z/../d/er¯   )zhttp://localhost/a/b/c/z
../../d/e/zhttp://localhost/a/d/e/)zhttp://localhost/a/./cr­   r¯   )zhttp://localhost/a/./c/r­   r®   )zhttp://localhost/a/b/c/dz./e/../f/../gzhttp://localhost/a/b/c/g)r¬   zd//ezhttp://localhost/a/b/d//e)r   rT   r‘   rV   r   Úformatr   )r    Útestsr©   r‘   r.   r-   s   &     r%   Útest_clickCollapseÚTestURL.test_clickCollapse  s§   € ò <Ú<ÚDÚCÚKÚJÚHÚIòò
 IÚKòò
 Lð+
ˆó. ',Ñ"ˆE˜(Ü—]’] 5Ó)×/Ñ/°Ó6×>Ñ>Ó@ˆFØ×ÑØØØC×JÑJØÜ˜u›+Ø!Ø%ð	 Kó ö	ó ',r(   c                óp  € V P                  R\        P                  ! R4      P                  RR4      P	                  4       4       V P                  R\        RR7      P                  RR4      P	                  4       4       \        P                  ! \
        4      pV P                  RVP                  R	4      P	                  4       4       V P                  R
VP                  R	R4      P	                  4       4       V P                  RVP                  R	R4      P                  R4      P	                  4       4       V P                  RVP                  R4      P                  R	R4      P	                  4       4       V P                  RVP                  R	R4      P                  RR4      P	                  4       4       R# )z#
L{URL.add} adds query parameters.
z'http://www.foo.com/a/nice/path/?foo=barzhttp://www.foo.com/a/nice/path/rJ   rK   zhttp://www.foo.com/?foo=barr�   r‚   z/http://www.foo.com/a/nice/path/?zot=23&zut&burpÚburpz3http://www.foo.com/a/nice/path/?zot=23&zut&burp=xxxÚxxxz8http://www.foo.com/a/nice/path/?zot=23&zut&burp=xxx&zingÚzingz8http://www.foo.com/a/nice/path/?zot=23&zut&zing&burp=xxxz:http://www.foo.com/a/nice/path/?zot=23&zut&burp=xxx&zot=32ÚzotÚ32N)r   r   rT   ÚaddrV   rU   rW   s   & r%   Útest_queryAddÚTestURL.test_queryAdd-  sg  € ð
 	×ÑØ5Ü�MŠMÐ;Ó<ß‰S�˜Óß‰W‹Yô		
ð 	×ÑØ)Ü�]Ô#×'Ñ'¨¨uÓ5×=Ñ=Ó?ô	
ô —-’-¤	Ó*ˆØ×ÑØ=Ø�K‰K˜Ó×'Ñ'Ó)ô	
ð 	×ÑØAØ�K‰K˜ Ó&×.Ñ.Ó0ô	
ð 	×ÑØFØ�K‰K˜ Ó&×*Ñ*¨6Ó2×:Ñ:Ó<ô	
ð
 	×ÑØFØ�K‰K˜Ó×#Ñ# F¨EÓ2×:Ñ:Ó<ô	
ð
 	×ÑØHØ�K‰K˜ Ó&×*Ñ*¨5°$Ó7×?Ñ?ÓAö	
r(   c                ó˜  € \         P                  ! \        4      pV P                  RVP	                  RR4      P                  4       4       V P                  RVP	                  R4      P	                  RR4      P                  4       4       V P                  RVP                  RR4      P	                  RR4      P                  4       4       R# )	z/
L{URL.set} replaces query parameters by name.
z*http://www.foo.com/a/nice/path/?zot=32&zutr¸   r¹   z0http://www.foo.com/a/nice/path/?zot&zut=itworkedÚzutÚitworkedr¶   N)r   rT   rU   r   ÚsetrV   rº   rW   s   & r%   Útest_querySetÚTestURL.test_querySetT  s¦   € ô
 —-’-¤	Ó*ˆØ×ÑØ8Ø�K‰K˜˜tÓ$×,Ñ,Ó.ô	
ð
 	×ÑØ>Ø�K‰K˜Ó×"Ñ" 5¨*Ó5×=Ñ=Ó?ô	
ð 	×ÑØ8Ø�K‰K˜˜uÓ%×)Ñ)¨%°Ó6×>Ñ>Ó@ö	
r(   c                óè  € \         P                  ! R4      pV P                  VP                  R4      \         P                  ! R4      4       V P                  VP                  RRR7      \         P                  ! R4      4       V P                  VP                  R^R7      \         P                  ! R4      4       V P                  VP                  RR^ R7      \         P                  ! R4      4       R	# )
z7
L{URL.remove} removes instances of a query parameter.
z*https://example.com/a/b/?foo=1&bar=2&foo=3rJ   zhttps://example.com/a/b/?bar=2Ú1)ÚnameÚvaluez$https://example.com/a/b/?bar=2&foo=3)rÅ   Úlimit)rÅ   rÆ   rÇ   N)r   rT   r   Úremover}   s   & r%   Útest_queryRemoveÚTestURL.test_queryRemovej  sÂ   € ô
 �mŠmÐHÓIˆØ×ÑØ�J‰J�uÓœsŸ}š}Ð-MÓNô	
ð 	×ÑØ�J‰J˜E¨ˆJÓ-Ü�MŠMÐ@ÓAô	
ð
 	×ÑØ�J‰J˜E¨ˆJÓ+Ü�MŠMÐ@ÓAô	
ð
 	×ÑØ�J‰J˜E¨°AˆJÓ6Ü�MŠMÐFÓGö	
r(   c                óJ  € \         P                  ! R4      pV P                  VP                  R4      R.4       V P                  VP	                  4       R4       \         P                  ! R4      pV P                  VP
                  R	4       V P                  VP	                  4       R4       \         P                  ! R4      pVP                  4       pV P                  VP                  R4      R.4       V P                  VP                  4       P                  R4      R.4       R# )
zh
Every C{=}-sign after the first in a query parameter is simply included
in the value of the parameter.
zhttp://localhost/?=x=x=xr   úx=x=xz!http://localhost/?foo=x=x=x&bar=yz7https://example.com/?argument=3&argument=4&operator=%3DÚoperatorÚ=N))rJ   rÌ   )rK   Úy)r   rT   r   ÚgetrV   r   rd   Úto_uri)r    r!   rf   s   &  r%   Útest_parseEqualSignInParamValueÚ'TestURL.test_parseEqualSignInParamValueƒ  sÛ   € ô �MŠMÐ4Ó5ˆØ×Ñ˜Ÿ™˜r› W IÔ.Ø×Ñ˜Ÿ™›Ð&@ÔAÜ�MŠMÐ=Ó>ˆØ×Ñ˜Ÿ™Ð"BÔCØ×Ñ˜Ÿ™›Ð&IÔJä�MŠMØEó
ˆð �h‰h‹jˆØ×Ñ˜Ÿ™ Ó,¨s¨eÔ4à×Ñ˜Ÿ™›×)Ñ)¨*Ó5¸°uÖ=r(   c                óV   € V P                  \        4       P                  4       R4       R# )z7
An empty L{URL} should serialize as the empty string.
r   N)r   r   rV   rP   s   &r%   Ú
test_emptyÚTestURL.test_empty˜  s   € ð
 	×Ñœ›Ÿ™›¨"Ö-r(   c                ó`   € \        R.R7      pV P                  VP                  4       R4       R# )z@
An L{URL} with query text should serialize as just query text.
©r   z?hello=worldN©ÚhelloÚworld)r   r   rV   rB   s   & r%   Útest_justQueryTextÚTestURL.test_justQueryTextŸ  s(   € ô
 Ð)Ð*Ô+ˆØ×Ñ˜Ÿ™› nÖ5r(   c                óT   € \         P                  ! R4      pV P                  W4       R# )z"
L{URL} compares equal to itself.
rq   N©r   rT   r   rB   s   & r%   Útest_identicalEqualÚTestURL.test_identicalEqual§  s!   € ô
 �MŠMÐ-Ó.ˆØ×Ñ˜Ör(   c                ó€   € \         P                  ! R4      p\         P                  ! R4      pV P                  W4       R# )z7
URLs with equivalent components should compare equal.
ú%http://u@localhost:8080/p/a/t/h?q=p#fNrß   ©r    Úu1r”   s   &  r%   Útest_similarEqualÚTestURL.test_similarEqual¯  s0   € ô
 �]Š]ÐBÓCˆÜ�]Š]ÐBÓCˆØ×Ñ˜Ö r(   c                ó¶   € \         P                  ! R4      p\         P                  ! R4      pV P                  W8H  V: RV: 24       V P                  W4       R# )zd
L{URL}s that refer to different resources are both unequal (C{!=}) and
also not equal (not C{==}).
úhttp://localhost/aúhttp://localhost/bú != N)r   rT   ÚassertFalserm   rä   s   &  r%   Útest_differentNotEqualÚTestURL.test_differentNotEqual¸  sG   € ô �]Š]Ð/Ó0ˆÜ�]Š]Ð/Ó0ˆØ×Ñ˜™³²RÐ#8Ô9Ø×Ñ˜BÖ#r(   c                óî   € \         P                  ! R4      pV P                  V^*8H  R4       V P                  V\        4       8H  R4       V P	                  V^*4       V P	                  V\        4       4       R# )z-
L{URL} is not equal (C{==}) to other types.
rq   zURL must not equal a number.zURL must not equal an object.N)r   rT   rì   Úobjectrm   rB   s   & r%   Útest_otherTypesNotEqualÚTestURL.test_otherTypesNotEqualÃ  sa   € ô
 �MŠMÐ-Ó.ˆØ×Ñ˜˜b™Ð"@ÔAØ×Ñ˜œf›h™Ð(GÔHØ×Ñ˜A˜rÔ"Ø×Ñ˜Aœv›xÖ(r(   c                óh   € \         P                  ! R4      pV P                  W8g  RV,          4       R# )z:
Identical L{URL}s are not unequal (C{!=}) to each other.
rã   z%r == itselfN©r   rT   rì   rB   s   & r%   Útest_identicalNotUnequalÚ TestURL.test_identicalNotUnequalÎ  s*   € ô
 �MŠMÐAÓBˆØ×Ñ˜™ °!Õ!3Ö4r(   c                ó”   € \         P                  ! R4      p\         P                  ! R4      pV P                  W8g  V: RV: 24       R# )zE
Structurally similar L{URL}s are not unequal (C{!=}) to each other.
rã   ú == Nrô   rä   s   &  r%   Útest_similarNotUnequalÚTestURL.test_similarNotUnequalÖ  s9   € ô
 �]Š]ÐBÓCˆÜ�]Š]ÐBÓCˆØ×Ñ˜™³²RÐ#8Ö9r(   c                ó”   € \         P                  ! R4      p\         P                  ! R4      pV P                  W8g  V: RV: 24       R# )zC
Structurally different L{URL}s are unequal (C{!=}) to each other.
ré   rê   rø   N)r   rT   r   rä   s   &  r%   Útest_differentUnequalÚTestURL.test_differentUnequalß  s7   € ô
 �]Š]Ð/Ó0ˆÜ�]Š]Ð/Ó0ˆØ�‰˜™³²BÐ"7Ö8r(   c                ó–   € \         P                  ! R4      pV P                  V^*8g  R4       V P                  V\        4       8g  R4       R# )z+
L{URL} is unequal (C{!=}) to other types.
rq   zURL must differ from a number.z"URL must be differ from an object.N)r   rT   r   rð   rB   s   & r%   Útest_otherTypesUnequalÚTestURL.test_otherTypesUnequalè  s;   € ô
 �MŠMÐ-Ó.ˆØ�‰˜˜R™Ð!AÔBØ�‰˜œV›X™Ð'KÖLr(   c                ój  € Rp\         P                  ! V4      pVP                  4       pV P                  VP                  R4       V P                  VP
                  ^ ,          R4       V P                  VP                  4       V4       RpVP                  4       pV P                  WTV: RV: 24       R# )zs
L{URL.asURI} produces an URI which converts any URI unicode encoding
into pure US-ASCII and returns a new L{URL}.
õ   http://Ã©.com/eÌ�?aÌ�=iÌ�#uÌ�u   Ã©.comu   eÌ�ú.http://xn--9ca.com/%C3%A9?%C3%A1=%C3%AD#%C3%BArë   N)r   rT   ÚasURIr   r   r   rV   )r    Úunicodeyrf   ÚuriÚexpectedURIÚ	actualURIs   &     r%   Ú
test_asURIÚTestURL.test_asURIñ  s™   € ðBð 	ô �mŠm˜HÓ%ˆØ�i‰i‹kˆØ×Ñ˜Ÿ™Ð#LÔMØ×ÑØ�H‰H�Q�KÐMô	
ð 	×Ñ˜Ÿ™›¨Ô1ØFˆØ—K‘K“Mˆ	Ø×ÑØ³)º[Ð$Iö	
r(   c                ój  € Rp\         P                  ! V4      pVP                  4       pV P                  VP                  R4       V P                  VP
                  ^ ,          R4       V P                  VP                  4       V4       RpVP                  4       pV P                  WTV: RV: 24       R# )z„
L{URL.asIRI} decodes any percent-encoded text in the URI, making it
more suitable for reading by humans, and returns a new L{URL}.
r  zxn--9ca.comz%C3%A9u   http://Ã©.com/Ã©?Ã¡=Ã­#Ãºrë   N)r   rT   ÚasIRIr   r   r   rV   )r    Úasciiishr  rf   ÚexpectedIRIÚ	actualIRIs   &     r%   Ú
test_asIRIÚTestURL.test_asIRI  s”   € ð DˆÜ�mŠm˜HÓ%ˆØ�i‰i‹kˆØ×Ñ˜Ÿ™ =Ô1Ø×Ñ˜Ÿ™ !� hÔ/Ø×Ñ˜Ÿ™›¨Ô1ð3ð 	ð —K‘K“Mˆ	Ø×ÑØ³)º[Ð$Iö	
r(   c                ó¬   € Rp\         P                  ! V4      pVP                  4       pRpVP                  4       pV P	                  WTV: RV: 24       R# )z„
Bad UTF-8 in a path segment, query parameter, or fragment results in
that portion of the URI remaining percent-encoded in the IRI.
z http://xn--9ca.com/%00%FF/%C3%A9u   http://Ã©.com/%00%FF/Ã©rë   N)r   rT   r  rV   r   )r    ÚurlWithBinaryr  rf   r  r  s   &     r%   Útest_badUTF8AsIRIÚTestURL.test_badUTF8AsIRI#  sQ   € ð ;ˆÜ�mŠm˜MÓ*ˆØ�i‰i‹kˆð2ð 	ð
 —K‘K“Mˆ	Ø×ÑØ³)º[Ð$Iö	
r(   c                ó–   € Rp\         P                  ! V4      pVP                  4       pV P                  VP	                  4       V4       R# )zD
A L{URL} composed of non-ASCII text will result in non-ASCII text.
r  N)r   rT   r  r   rV   )r    r  rf   ÚalsoIRIs   &   r%   Útest_alreadyIRIAsIRIÚTestURL.test_alreadyIRIAsIRI6  s?   € ðBð 	ô �mŠm˜HÓ%ˆØ—)‘)“+ˆØ×Ñ˜Ÿ™Ó*¨HÖ5r(   c                ó”   € Rp\         P                  ! V4      pVP                  4       P                  4       pV P	                  W14       R# )z8
A L{URL} composed of encoded text will remain encoded.
r  N)r   rT   r  rV   r   )r    r  r  r  s   &   r%   Útest_alreadyURIAsURIÚTestURL.test_alreadyURIAsURIF  s:   € ð
 GˆÜ�mŠm˜KÓ(ˆØ—I‘I“K×'Ñ'Ó)ˆ	Ø×Ñ˜Ö0r(   c                óÆ  € \         P                  ! R4      pV P                  VP                  R4      R4       V P                  VP                  R4      R4       V P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  4       R4       V P                  VP                  RR	7      P                  4       R
4       R# )zc
L{URL.from_text} will parse the C{userinfo} portion of the URI
separately from the host and port.
z<http://someuser:somepassword@example.com/some-segment@ignoreTz!someuser:somepassword@example.comFzsomeuser:@example.comzsomeuser:somepasswordÚsomeuserz0http://someuser:@example.com/some-segment@ignore©r+   z/http://someuser@example.com/some-segment@ignoreN)r   rT   r   Ú	authorityr+   ÚuserrV   r¥   r}   s   & r%   Útest_userinfoÚTestURL.test_userinfoP  s½   € ô �mŠmØJó
ˆð 	×ÑØ�M‰M˜$ÓÐ!Dô	
ð 	×Ñ˜Ÿ™ uÓ-Ð/FÔGØ×Ñ˜Ÿ™Ð'>Ô?Ø×Ñ˜Ÿ™ :Ô.Ø×ÑØ�K‰K‹MÐMô	
ð 	×ÑØ�K‰K ˆKÓ,×4Ñ4Ó6Ø=ö	
r(   c                óª   € \         P                  ! R4      pV P                  VP                  R4       V P                  VP	                  4       R4       R# )z:
L{URL.from_text} parses custom port numbers as integers.
zhttp://www.example.com:8080/i�  N)r   rT   r   r*   rV   )r    ÚportURLs   & r%   Útest_portTextÚTestURL.test_portTextg  s?   € ô
 —-’-Ð >Ó?ˆØ×Ñ˜Ÿ™ tÔ,Ø×Ñ˜Ÿ™Ó*Ð,JÖKr(   c                ón   € V P                  \        P                  ! R4      P                  4       R4       R# )zë
Although L{URL} instances are mainly for dealing with HTTP, other
schemes (such as C{mailto:}) should work as well.  For example,
L{URL.from_text}/L{URL.to_text} round-trips cleanly for a C{mailto:}
URL representing an email address.
zmailto:user@example.comN)r   r   rT   rV   rP   s   &r%   Útest_mailtoÚTestURL.test_mailtop  s+   € ð 	×ÑÜ�MŠMÐ3Ó4×<Ñ<Ó>Ø%ö	
r(   c                ó  € \         P                  ! R4      pV P                  VP                  R4       V P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  4       R4       R# )zR
An HTTP URL without a hostname, but with a path, should also round-trip
cleanly.
zhttp:relative-pathr   FN)zrelative-path)r   rT   r   r   r   Úuses_netlocrV   )r    Úwithout_hosts   & r%   Útest_httpWithoutHostÚTestURL.test_httpWithoutHost}  sp   € ô —}’}Ð%9Ó:ˆØ×Ñ˜×*Ñ*¨BÔ/Ø×Ñ˜×*Ñ*Ð,>Ô?Ø×Ñ˜×1Ñ1°5Ô9Ø×Ñ˜×-Ñ-Ó/Ð1EÖFr(   c                ó°   € Rp\        R.R7      pV P                  VP                  V4       \        RR/R7      pV P                  VP                  V4       R# )z”
When a L{URL} is created with a C{query} argument, the C{query}
argument is converted into an N-tuple of 2-tuples, sensibly
handling dictionaries.
ÚalphaÚbetarØ   N©r1  r2  )r3  )r   r   r   )r    r.   re   s   &  r%   Útest_queryIterableÚTestURL.test_queryIterable‰  sN   € ð (ˆÜÐ*Ð+Ô,ˆØ×Ñ˜Ÿ™ HÔ-Ü˜ &Ð)Ô*ˆØ×Ñ˜Ÿ™ HÖ-r(   c                óZ   € \        RR.R7      pV P                  VP                  R4       R# )zZ
When a L{URL} is created with a C{path} argument, the C{path} is
converted into a tuple.
rÚ   rÛ   ©r   NrÙ   )r   r   r   r}   s   & r%   Útest_pathIterableÚTestURL.test_pathIterable–  s(   € ô ˜ Ð)Ô*ˆØ×Ñ˜Ÿ™Ð#5Ö6r(   c           
     ó>  a aa€  ! R R\         4      o\        \        J d   RMRpV 3R loV3VVV 3R llpV! R4       V! R4       V! R	4       V! R
R4       V! R4       V! RR4       S P                  \        4      ;_uu_ 4       p\        \        \        S! 4       4      .R7       RRR4       S! XVR4       S P                  \        4      ;_uu_ 4       p\        R\        \        S! 4       4      3.R7       RRR4       S! W1R,           R4       S P                  \        4      ;_uu_ 4       p\        \        \        S! 4       4      R3.R7       RRR4       S! W1R4       S P                  \        4      ;_uu_ 4        \        \        \        \        \        3,          S! 4       4      .R7       RRR4       S P                  \        4      ;_uu_ 4        \        \        \        \        \        3,          R4      .R7       RRR4       S P                  \        4      ;_uu_ 4        \        \        \        \        \        3,          R4      .R7       RRR4       \
        P                  ! R4      pS P                  \        4      ;_uu_ 4       pVP                  \        \        S! 4       4      4       RRR4       S! W1R4       S P                  \        4      ;_uu_ 4       pVP                  \        \        S! 4       4      4       RRR4       S! W1R4       S P                  \        4      ;_uu_ 4       pVP                  \        \        S! 4       4      4       RRR4       S! W1R4       R#   + '       g   i     ELÐ; i  + '       g   i     EL’; i  + '       g   i     ELN; i  + '       g   i     EL; i  + '       g   i     ELÄ; i  + '       g   i     EL†; i  + '       g   i     EL:; i  + '       g   i     Lú; i  + '       g   i     Lº; i)al  
Passing an argument of the wrong type to any of the constructor
arguments of L{URL} will raise a descriptive L{TypeError}.

L{URL} typechecks very aggressively to ensure that its constitutent
parts are all properly immutable and to prevent confusing errors when
bad data crops up in a method call long after the code that called the
constructor is off the stack.
c                   ó,   a € ] tR tRt o R tR tRtV tR# )Ú1TestURL.test_invalidArguments.<locals>.Unexpectedi«  c                ó   € R # )Úwrong© rP   s   &r%   Ú__str__Ú9TestURL.test_invalidArguments.<locals>.Unexpected.__str__¬  s   € ár(   c                ó   € R # )ú<unexpected>r?  rP   s   &r%   Ú__repr__Ú:TestURL.test_invalidArguments.<locals>.Unexpected.__repr__°  s   € á%r(   r?  N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r@  rD  Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r%   Ú
Unexpectedr<  «  s   ø‡ € ò÷&ð &r(   rN  r   Ústrc                 ór   <€ SP                  \        V P                  4      R P                  WR4      4       R# )zexpected {0} for {1}, got {2}rC  N)r   rO  Ú	exceptionr°   )ÚraisedÚexpectationrÅ   r    s   &&&€r%   ÚassertRaisedÚ3TestURL.test_invalidArguments.<locals>.assertRaised¶  s2   ø€ à×ÑÜ�F×$Ñ$Ó%Ø/×6Ñ6Ø ~óör(   c           	      ó°   <€ SP                  \        4      ;_uu_ 4       p\        R/ V S! 4       /B  R R R 4       S! XW4       R #   + '       g   i     L; i)Nr?  )r    Ú	TypeErrorr   )ÚparamrS  rR  rN  rT  r    s   && €€€r%   r4   Ú,TestURL.test_invalidArguments.<locals>.check¿  sB   ø€ à×"Ñ"¤9×-Ô-°ÜÑ,�u™j›lÐ+Ò,÷ .ñ ˜ Ö4÷ .×-ús   ŸAÁA	r   r   r   rƒ   Úboolr+   r*   zint or NoneTyper7  Nzpath segmentrÅ   rØ   z or NoneTypezquery parameter valuerÆ   zquery parameter namezhttps://valid.example.com/zrelative URL)r@   r$   Úvv)r@   )rð   ÚbytesrO  r    rW  r   r	   r   r   Ú
ValueErrorrT   rv   rŒ   r‘   )r    ÚdefaultExpectationr4   rR  re   rN  rT  s   f    @@r%   Útest_invalidArgumentsÚTestURL.test_invalidArgumentsŸ  sâ  ú€ ô	&œô 	&ô +0´3«,™Y¸EÐõ	ð &8÷ 	5ñ 	5ñ 	ˆhŒÙˆfŒÙˆjÔÙˆh˜ÔÙˆjÔÙˆfÐ'Ô(à×Ñœy×)Ô)¨VÜ”dœ4¡£Ó.Ð/Õ0÷ *ñ 	�VÐ/°Ô@à×Ñœy×)Ô)¨VÜ˜¤¤T©:«<Ó 8Ð9Ð:Õ;÷ *ñ 	Ø¨Õ7Ð9Pô	
ð ×Ñœy×)Ô)¨VÜœœT¡:£<Ó0°'Ð:Ð;Õ<÷ *ñ 	�VÐ1GÔHð ×Ñœy×)Õ)Ü”tœE¤$¬ *Õ-©z«|Ó<Ð=Õ>÷ *ð ×Ñœz×*Õ*Ü”tœE¤$¬ *Õ-Ð/?Ó@ÐAÕB÷ +ð ×Ñœz×*Õ*Ü”tœE¤$¬ *Õ-¨vÓ6Ð7Õ8÷ +ô �mŠmÐ8Ó9ˆØ×Ñœy×)Ô)¨VØ�I‰I”dœ4¡£Ó.Ô/÷ *á�V°Ô@Ø×Ñœy×)Ô)¨VØ�K‰KœœT¡:£<Ó0Ô1÷ *á�V°Ô@Ø×Ñœy×)Ô)¨VØ�I‰I”dœ4¡£Ó.Ô/÷ *á�V°Ö@÷K *×)Ð)ú÷
 *×)Ð)ú÷ *×)Ð)ú÷ *×)Ð)ú÷ +×*Ð*ú÷ +×*Ð*ú÷ *×)Ð)ú÷ *×)ú÷ *×)úsl   Â!M-Ã#NÄ-#NÅ>2N)Ç-N=È'-OÊ%O%Ë"%O9Ì5%PÍ-M>	ÎN	ÎN&	Î)N:	Î=O	ÏO"	Ï%O6	Ï9P		ÐP	c                ó
  € V P                  \        4      ;_uu_ 4       p\        RR7       RRR4       V P                  \	        XP
                  4      RP                  \        R4      4      4       R#   + '       g   i     LO; i)z˜
Technically, L{str} (or L{unicode}, as appropriate) is iterable, but
C{URL(path="foo")} resulting in C{URL.from_text("f/o/o")} is never what
you want.
rJ   r7  Nz,expected iterable of text for path, not: {0})r    rW  r   r   rO  rQ  r°   r   )r    rR  s   & r%   Ú!test_technicallyTextIsIterableButÚ)TestURL.test_technicallyTextIsIterableButô  sZ   € ð ×Ñœy×)Ô)¨VÜ�U�O÷ *à×ÑÜ�× Ñ Ó!Ø:×AÑAÄ$ÀuÃ+ÓNö	
÷ *×)ús   žA2Á2B	c                óÀ  € \        R R7      pV P                  VP                  R4       V P                  VP                  4       R4       V P                  \         P                  ! R4      P                  R4       V P                  \         P                  ! R4      P                  R4       V P                  \         P                  ! R4      P                  R4       \        R RR7      pV P                  VP                  R4       V P                  VP                  4       R4       \        RR7      pV P                  VP                  R4       V P                  VP                  4       R	4       \        R
R7      pV P                  VP                  R4       V P                  VP                  4       R4       \        RR7      pV P                  VP                  R4       V P                  VP                  4       R4       \         P                  ! R4      pV P                  VP                  R4       \         P                  ! R4      pV P                  VP                  R4       R# )Úhttps©r   Tzhttps://zhttps:Fzhttps:/)r   r,  z	git+httpszgit+https://Úmailtozmailto:ÚztpNzztp:zztp://test.comzztp:test:com)r   r   r,  rV   rT   r}   s   & r%   Útest_netlocÚTestURL.test_netloc  sª  € ä˜Ô!ˆØ×Ñ˜Ÿ™¨$Ô/Ø×Ñ˜Ÿ™›¨
Ô3à×ÑœŸš xÓ0×<Ñ<¸eÔDà×ÑœŸš yÓ1×=Ñ=¸uÔEà×ÑœŸš zÓ2×>Ñ>ÀÔEä˜¨eÔ4ˆØ×Ñ˜Ÿ™¨%Ô0Ø×Ñ˜Ÿ™›¨Ô1ä˜Ô%ˆØ×Ñ˜Ÿ™¨$Ô/Ø×Ñ˜Ÿ™›¨Ô7ä˜Ô"ˆØ×Ñ˜Ÿ™¨%Ô0Ø×Ñ˜Ÿ™›¨	Ô2ä˜ÔˆØ×Ñ˜Ÿ™¨$Ô/Ø×Ñ˜Ÿ™›¨Ô/ä�mŠmÐ,Ó-ˆØ×Ñ˜Ÿ™¨$Ô/ä�mŠm˜NÓ+ˆØ×Ñ˜Ÿ™¨%Ö0r(   c                óÒ   € R p\         P                  ! V4      pVP                  R8X  g   Q hVP                  ^P8X  g   Q h\        VP
                  ,          VP                  8w  g   Q hR# )z5https://[2001:0db8:85a3:0000:0000:8a2e:0370:7334]:80/z'2001:0db8:85a3:0000:0000:8a2e:0370:7334N)r   rT   r   r*   r   r   )r    Útre   s   &  r%   Útest_ipv6_with_portÚTestURL.test_ipv6_with_port$  sS   € àCˆÜ�mŠm˜AÓˆØ�x‰xÐDÔDÐDÐDØ�x‰x˜2Œ~Ðˆ~Ü˜sŸz™zÕ*¨c¯h©hÔ6Ð6Ò6r(   c                ó„  € R p\         P                  ! V4      pVP                  R8X  g   Q hVP                  R8X  g   Q hVP                  R8X  g   Q hVP
                  R
8X  g   Q hVP                  R8X  g   Q hRp\         P                  ! V4      pVP                  R8X  g   Q hVP                  R8X  g   Q hVP                  R8X  g   Q hVP
                  R
8X  g   Q hRp\         P                  ! V4      pVP                  R8X  g   Q hVP                  R8X  g   Q hVP                  R8X  g   Q hVP
                  R
8X  g   Q hR	# )z3https://user:pass@example.com/path/to/here?k=v#nicere  ú	user:passúexample.comÚnicez1https://user:pass@127.0.0.1/path/to/here?k=v#nicez	127.0.0.1z-https://user:pass@[::1]/path/to/here?k=v#nicez::1N)r   ÚtoÚhere)r   rT   r   r+   r   r   r   ©r    Útextre   s   &  r%   Ú
test_basicÚTestURL.test_basic,  s(  € àDˆÜ�mŠm˜DÓ!ˆØ�z‰z˜WÔ$Ð$Ð$Ø�|‰|˜{Ô*Ð*Ð*Ø�x‰x˜=Ô(Ð(Ð(Ø�x‰xÐ1Ô1Ð1Ð1Ø�|‰|˜vÔ%Ð%Ð%àBˆÜ�mŠm˜DÓ!ˆØ�z‰z˜WÔ$Ð$Ð$Ø�|‰|˜{Ô*Ð*Ð*Ø�x‰x˜;Ô&Ð&Ð&Ø�x‰xÐ1Ô1Ð1Ð1à>ˆÜ�mŠm˜DÓ!ˆØ�z‰z˜WÔ$Ð$Ð$Ø�|‰|˜{Ô*Ð*Ð*Ø�x‰x˜5Ô Ð Ð Ø�x‰xÐ1Ô1Ð1Ò1r(   c                óP   € V P                  \        \        P                  R 4       R# )z#

N©r    r   r   rT   rP   s   &r%   Útest_invalid_urlÚTestURL.test_invalid_urlD  s   € à×Ñœ-¬¯©¸Ö@r(   c                óP   € V P                  \        \        P                  R 4       R# )zhttp://abc:

/#Nrz  rP   s   &r%   Útest_invalid_authority_urlÚ"TestURL.test_invalid_authority_urlH  s   € à×Ñœ-¬¯©Ð8KÖLr(   c                óò   € . ROpV Fl  pRV,           R,           pV P                  \        P                  \        \        P                  V4       V P                  \
        \        P                  V4       Kn  	  R# )ú2001::0234:C1ab::A0:aabc:003Fzhttp://[Ú]N)r�  z2001::1::3FÚ:z::::z::256.0.0.1)r    ÚsocketÚerrorr   ÚAF_INET6r   r   rT   )r    Úinvalid_ipv6_ipsÚipr�   s   &   r%   Útest_invalid_ipv6ÚTestURL.test_invalid_ipv6L  sV   € ò
Ðó #ˆBØ! B•¨Õ,ˆHØ×ÑœfŸl™l¬I´v·±ÈÔKØ×Ñœm¬S¯]©]¸HÖEó #r(   c                óš   € V P                  \        \        P                  R 4       V P                  \        \        P                  R4       R# )zftp://portmouth:smashz+http://reader.googlewebsite.com:neverforgetN)r    r   r   rT   r]  rP   s   &r%   Útest_invalid_portÚTestURL.test_invalid_portZ  s4   € à×Ñœ-¬¯©Ð8OÔPØ×ÑÜÜ�M‰MØ9ö	
r(   c                ó  € \         P                  ! R 4      pV P                  VP                  R4       V P                  VP	                  4       R 4       V P                  VP                  4       P	                  4       R4       \         P                  ! R4      pV P                  VP                  R4       V P                  VP	                  4       R4       V P                  VP                  4       P	                  4       R4       R# )u   http://bÃ¼cher.chu
   bÃ¼cher.chzhttp://xn--bcher-kva.chúhttps://xn--bcher-kva.chzxn--bcher-kva.chu   https://bÃ¼cher.chN)r   rT   r   r   rV   rÑ   rd   rä   s   &  r%   Ú	test_idnaÚTestURL.test_idnac  s·   € ä�]Š]Ð.Ó/ˆØ×Ñ˜Ÿ™ ,Ô/Ø×Ñ˜Ÿ™›Ð':Ô;Ø×Ñ˜Ÿ™›×,Ñ,Ó.Ð0IÔJä�]Š]Ð5Ó6ˆØ×Ñ˜Ÿ™Ð"4Ô5Ø×Ñ˜Ÿ™›Ð'AÔBØ×Ñ˜Ÿ™›×,Ñ,Ó.Ð0DÖEr(   c                ó   € \         P                  ! R 4      pV P                  VP                  R4       V P                  VP	                  4       R 4       \         P                  ! R4      pV P                  VP                  R4       V P                  VP	                  4       R4       \         P                  ! R4      pV P                  VP                  R4       V P                  VP	                  4       R4       \         P                  ! R4      pV P                  VP                  R4       V P                  VP	                  4       R4       \         P                  ! R4      pV P                  VP                  R	4       V P                  VP	                  4       R4       \         P                  ! R
4      pV P                  VP                  R4       V P                  VP	                  4       R
4       \        RRRR7      pV P                  VP	                  4       R4       \        R	RRRR7      pV P                  VP	                  4       R4       \         P                  ! R4      pVP                  RR7      pV P                  VP	                  4       R4       Rp\         P                  ! V4      pVP                  RR7      pV P                  VP	                  4       R4       VP                  RR7      pV P                  VP	                  4       V4       R# )zmailto:mahmoud@hatnote.comrg  zhttp://hatnote.comr3   znewscheme:a:b:cÚ	newschemeznewerscheme://a/b/cÚnewerschemez%git+ftp://gitstub.biz/glyph/lefkowitzzgit+ftpz'what+mailto:freerealestate@enotuniq.orgzwhat+mailtorh  T)r   r   rƒ   z
ztp:/x/y/z)r   r   rƒ   r,  zgit+ftp:///x/y/z/zfile:///path/to/heckrf  zmailto:/path/to/heckzunregisteredscheme:///a/b/cF)r,  zunregisteredscheme:/a/b/cN)ÚxrÏ   Úz)r•  rÏ   r–  r   )r   rT   r   r   rV   r¥   )r    re   Úurl2r�   Úno_netloc_urlÚ
netloc_urls   &     r%   Útest_netloc_slashesÚTestURL.test_netloc_slasheso  s_  € ô �mŠmÐ8Ó9ˆØ×Ñ˜Ÿ™ XÔ.Ø×Ñ˜Ÿ™›Ð(DÔEä�mŠmÐ0Ó1ˆØ×Ñ˜Ÿ™ VÔ,Ø×Ñ˜Ÿ™›Ð(<Ô=ô �mŠmÐ-Ó.ˆØ×Ñ˜Ÿ™ [Ô1Ø×Ñ˜Ÿ™›Ð(9Ô:ä�mŠmÐ1Ó2ˆØ×Ñ˜Ÿ™ ]Ô3Ø×Ñ˜Ÿ™›Ð(=Ô>ô �mŠmÐCÓDˆØ×Ñ˜Ÿ™ YÔ/Ø×Ñ˜Ÿ™›Ð(OÔPä�mŠmÐEÓFˆØ×Ñ˜Ÿ™ ]Ô3Ø×ÑØ�K‰K‹MÐDô	
ô ˜ _¸TÔBˆØ×Ñ˜Ÿ™›¨Ô5ô ØØ$ØØô	
ˆð 	×Ñ˜Ÿ™›Ð(;Ô<ô �mŠmÐ2Ó3ˆØ�{‰{ (ˆ{Ó+ˆØ×Ñ˜Ÿ™›Ð)?Ô@à0ˆÜ�mŠm˜HÓ%ˆØŸ™°˜Ó6ˆØ×Ñ˜×.Ñ.Ó0Ð2MÔNØ—[‘[¨T�[Ó2ˆ
Ø×Ñ˜×+Ñ+Ó-¨xÔ8ár(   c                óæ   € \        R.R7      pV P                  VP                  4       R4       VP                  RR7      pV P                  VP                  4       R4       V P	                  W4       R# )z}
On host-relative URLs, the C{rooted} flag can be updated to indicate
that the path should no longer be treated as absolute.
rÚ   r7  T)rƒ   z/helloN)r   r   rV   r¥   rm   )r    ÚaÚbs   &  r%   Útest_rooted_to_relativeÚTestURL.test_rooted_to_relativeª  sZ   € ô �g�YÔˆØ×Ñ˜Ÿ™› gÔ.Ø�I‰I˜TˆIÓ"ˆØ×Ñ˜Ÿ™› hÔ/Ø×Ñ˜AÖ!r(   c                óž  € \        RR.RR7      pV P                  VP                  R4       \        R.RR7      pV P                  VP                  R4       V P                  W4       \        RR.RR7      p\        RR.R7      pV P                  W44       V P                  VP                  R4       V P                  VP                  R4       R	# )
aÉ  
The C{rooted} flag can be updated in some cases, but it cannot be made
to conflict with other facts surrounding the URL; for example, all URLs
involving an authority (host) are inherently rooted because it is not
syntactically possible to express otherwise; also, once an unrooted URL
gains a path that starts with an empty string, that empty string is
elided and it becomes rooted, because these cases are syntactically
indistinguisable in real URL text.
r   rJ   F)r   rƒ   TrK   )r   r   rƒ   )r   r   N)r   r   rƒ   )r    Úrelative_path_rootedÚrelative_flag_rootedÚattempt_unrooted_absoluteÚnormal_absolutes   &    r%   Útest_autorootedÚTestURL.test_autorooted¶  s¼   € ô  #¨¨U¨¸EÔBÐØ×ÑÐ-×4Ñ4°dÔ;Ü"¨¨¸Ô=ÐØ×ÑÐ-×4Ñ4°dÔ;Ø×ÑÐ-ÔDä$'¨U¸%¸ÈÔ$OÐ!Ü 5°¨wÔ7ˆØ×ÑÐ2ÔDØ×Ñ˜×/Ñ/°Ô6Ø×ÑÐ2×9Ñ9¸4Ö@r(   c                óÂ  € \        RRRR7      p\        RRR7      p\        RRRR7      pV P                  VP                  R4       V P                  VP                  R4       V P                  VP                  R4       \         P                  ! R4      pV P                  \	        V4      \	        V4      4       V P                  \	        V4      \	        V4      4       V P                  VP                  4       VP                  4       4       V P                  W4       V P                  W4       V P                  W4       V P                  W$4       V P                  W44       R# )	al  
URLs which include a ``://`` netloc-separator for any reason are
inherently rooted, regardless of the value or presence of the
``rooted`` constructor argument.

They may include a netloc-separator because their constructor was
directly invoked with an explicit host or port, or because they were
parsed from a string which included the literal ``://`` separator.
Úudpi$  F)r   r*   rƒ   )r   r*   Tzudp://:4900N)r   r   rƒ   rT   rO  ÚasText)r    Údirectly_constructedÚdirectly_constructed_implictÚdirectly_constructed_rootedÚparseds   &    r%   Ú!test_rooted_with_port_but_no_hostÚ)TestURL.test_rooted_with_port_but_no_hostÍ  s!  € ô  #¨%°dÀ5ÔIÐÜ'*°%¸dÔ'CÐ$Ü&)°¸TÈ$Ô&OÐ#Ø×ÑÐ-×4Ñ4°dÔ;Ø×ÑÐ5×<Ñ<¸dÔCØ×ÑÐ4×;Ñ;¸TÔBÜ—’˜}Ó-ˆØ×ÑœÐ1Ó2´C¸³KÔ@Ø×ÑœÐ9Ó:¼CÀ»KÔHØ×ÑÐ-×4Ñ4Ó6¸¿¹»ÔHØ×ÑÐ-Ô6Ø×ÑÐ-ÔLØ×ÑÐ-ÔKØ×ÑÐ5Ô>Ø×ÑÐ4Ö=r(   c                ó   € V P                  \        4      ;_uu_ 4        \        \        4       R R R 4       V P                  \        4      ;_uu_ 4        \        R4       R R R 4       R #   + '       g   i     LC; i  + '       g   i     R # ; i)NÚHTTP_____more_like_imHoTTeP)r    r]  r   rU   rP   s   &r%   Útest_wrong_constructorÚTestURL.test_wrong_constructorè  sX   € à×Ñœz×*Õ*ä”	ŒN÷ +ð ×Ñœz×*Õ*äÐ-Ô.÷ +Ñ*÷ +×*ú÷ +×*Ð*ús   žA)ÁA<Á)A9	Á<B	c                óN  € \         P                  ! R 4      pVP                  R8X  g   Q hVP                  RR7      pVP	                  4       pVP                  RR7      R8X  g   Q hVP                  RR7      R8X  g   Q hVP                  4       P                  RR7      R	8X  g   Q hR
# )zhttp://user:pass@example.comrp  zus%20her:passr  Tr\   zhttp://us her:pass@example.comFzhttp://us her:@example.comz http://us%20her:pass@example.comN)r   rT   r+   r¥   rd   rV   rÑ   ©r    re   rf   s   &  r%   Útest_encoded_userinfoÚTestURL.test_encoded_userinfoñ  s�   € ä�mŠmÐ:Ó;ˆØ�|‰|˜{Ô*Ð*Ð*Ø�k‰k ?ˆkÓ3ˆØ�j‰j‹lˆà�K‰K dˆKÓ+Ð/OÔOð	
ØOà�{‰{¨ˆ{Ó/Ð3OÔOÐOÐOà�J‰J‹L× Ñ ¨tÐ Ó4Ø1ô2ð	
ò2r(   c                óˆ  € / p\         P                  ! R 4      p\        V4      \        V4      8X  g   Q h^W&   \         P                  ! R4      pVP                  RR4      p^W&   \	        V4      ^8X  g   Q h\        VP                  4       4      ^.8X  g   Q h\        \        4       4      \        \        4       4      8X  g   Q hR# )z.http://blog.hatnote.com/ask?utm_source=geocityzhttp://blog.hatnote.com/askÚ
utm_sourceÚgeocityN)r   rT   ÚhashrÀ   ÚlenÚlistÚvalues)r    Úurl_mapÚurl1r—  s   &   r%   Ú	test_hashÚTestURL.test_hash   s¡   € àˆÜ�}Š}ÐMÓNˆÜ�D‹zœT $›ZÔ'Ð'Ð'àˆ‰ä�}Š}Ð:Ó;ˆØ�x‰x˜ iÓ0ˆàˆ‰ä�7‹|˜qÔ Ð Ð Ü�G—N‘NÓ$Ó%¨!¨Ô,Ð,Ð,ä”C“E‹{œd¤3£5›kÔ)Ð)Ò)r(   c                óœ   € \        4       p\        V4      p\        V4      ^8”  g   Q hRV9  g   Q hRV9  g   Q hRV9  g   Q hRV9  g   Q hR# )é   r’   rª  r  r  N)r   Údirr½  )r    re   r“   s   &  r%   Útest_dirÚTestURL.test_dir  sZ   € ä‹eˆÜ�#‹hˆä�3‹x˜"Œ}Ðˆ}à Ô$Ð$Ð$Ø˜sÔ"Ð"Ð"Ø˜cÔ!Ð!Ð!Ø˜cÔ!Ð!Ò!r(   c                óª   € \         P                  ! R 4      pVP                  4       R 8X  g   Q hVP                  4       P                  4       R8X  g   Q hR# )u"   http://example.com/a%20tÃ©%C3%A9stz&http://example.com/a%20t%C3%A9%C3%A9stN)r   r’   rª  r  r}   s   & r%   Útest_twisted_compatÚTestURL.test_twisted_compat  sD   € ä�lŠlÐ?Ó@ˆØ�z‰z‹|ÐCÔCÐCÐCØ�y‰y‹{×!Ñ!Ó#Ð'OÔOÐOÒOr(   c                ó¨   € \         P                  ! R 4      pVP                  RR4      pVP                  RR4      pVP	                  4       R8X  g   Q hR# )zhttp://example.com/?a=b&cr•  rÏ   z!http://example.com/?a=b&x=x&c&x=yN)r   rT   rÀ   rº   rV   r}   s   & r%   Útest_set_orderingÚTestURL.test_set_ordering%  sH   € ô �mŠmÐ7Ó8ˆØ�g‰g�c˜3ÓˆØ�g‰g�c˜3ÓˆØ�{‰{‹}Ð CÔCÐCÒCr(   c                óü  € \         P                  ! R4      p\         P                  ! VP                  4       4      pW8X  g   Q h\         P                  ! VP                  4       P                  4       4      pW8X  g   Q hW#8X  g   Q h\         P                  ! R4      pVP                  4       pVP                  4       R8X  g   Q h\         P                  ! VP                  4       4      P	                  4       pWV8X  g   Q hR# )zSee issue #4z#urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoobz1first-segment/urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoobz'first-segment/urn:ietf:wg:oauth:2.0:oobN)r   rT   rV   rd   rÑ   )r    rå   r”   r•   Úu4Úu5Úu6s   &      r%   Útest_schemeless_pathÚTestURL.test_schemeless_path0  s¶   € ô �]Š]Ð@ÓAˆÜ�]Š]˜2Ÿ:™:›<Ó(ˆØŒxˆˆxä�]Š]˜2Ÿ9™9›;×.Ñ.Ó0Ó1ˆØŒxˆˆxØŒxˆˆxô �]Š]ÐNÓOˆØ�Y‰Y‹[ˆØ�z‰z‹|ÐHÔHÐHÐHä�]Š]˜2Ÿ:™:›<Ó(×/Ñ/Ó1ˆØŒxˆŠxr(   c                ór   € \         P                  ! R4      pVP                  4       pVP                  4        R# )z4See issue #7, affecting only narrow builds (2.6-3.3)zhttps://xn--vi8hiv.wsN)r   rT   rd   rV   r¶  s   &  r%   Útest_emoji_domainÚTestURL.test_emoji_domainC  s'   € ô �mŠmÐ3Ó4ˆØ�j‰j‹lˆØ�‰Žr(   c                óè   € V P                  \        \        RRR7       V P                  \        \        RR7       V P                  \        \        RR7       V P                  \        \        R	R7       R# )
zPer issue #6 and #8r3   za/c)r   r   r7  rØ   N)Ú?)Ú#)Ú&r_   )r    r]  r   rP   s   &r%   Útest_delim_in_paramÚTestURL.test_delim_in_paramK  sZ   € ð 	×Ñœ*¤c°&¸uÐÔEØ×Ñœ*¤c°ÐÔ7Ø×Ñœ*¤c°ÐÔ7Ø×Ñœ*¤c°-ÐÖAr(   c                ó¦  € \         P                  ! R 4      p\         P                  ! R4      pW8X  g   Q h\         P                  ! R4      p\         P                  ! R4      pW8X  g   Q h\         P                  ! R4      p\         P                  ! R 4      pW8X  g   Q h\         P                  ! R 4      p\         P                  ! R 4      pW8X  g   Q hR# )zhttp://example.com/zhttp://example.comN)r   rT   rä   s   &  r%   Útest_empty_paths_eqÚTestURL.test_empty_paths_eqS  sž   € ä�]Š]Ð0Ó1ˆÜ�]Š]Ð/Ó0ˆàŒxˆˆxä�]Š]Ð/Ó0ˆÜ�]Š]Ð/Ó0ˆàŒxˆˆxä�]Š]Ð/Ó0ˆÜ�]Š]Ð0Ó1ˆàŒxˆˆxä�]Š]Ð0Ó1ˆÜ�]Š]Ð0Ó1ˆàŒxˆŠxr(   c                óø   € \         P                  ! R 4      P                  R8X  g   Q hV P                  \        \         P                  R4       V P                  \        \         P                  \        4       4       R# )z#okÚoks   bytes://x.y.zN)r   rT   r   r    rW  rð   rP   s   &r%   Útest_from_text_typeÚTestURL.test_from_text_typei  sN   € ä�}Š}˜UÓ#×,Ñ,°Ô4Ð4Ð4Ø×Ñœ)¤S§]¡]Ð4DÔEØ×Ñœ)¤S§]¡]´F³HÖ=r(   c                ó  € V P                  \        \        P                  R 4       V P                  \        \        P                  R4       V P                  \        \        P                  R4       V P                  \        \        P                  R4       V P                  \        \        P                  R4       V P                  \        \        P                  R4       V P                  \        \        P                  R4       R# )zhttp://[::1/zhttp://::1]/zhttp://[[::1]/zhttp://[::1]]/zhttp://127.0.0.1:zhttp://127.0.0.1:hizhttp://127.0.0.1::80Nrz  rP   s   &r%   Útest_from_text_bad_authorityÚ$TestURL.test_from_text_bad_authorityo  s¥   € ð 	×Ñœ-¬¯©¸ÔGØ×Ñœ-¬¯©¸ÔGØ×Ñœ-¬¯©Ð8HÔIØ×Ñœ-¬¯©Ð8HÔIð 	×Ñœ-¬¯©Ð8KÔLà×Ñœ-¬¯©Ð8MÔNà×Ñœ-¬¯©Ð8NÖOr(   c                óz  € \         P                  ! R 4      pVP                  R4      . 8X  g   Q hVP                  R4      R.8X  g   Q h\        VP                  4      ^8X  g   Q hVP                  4       pVP                  R8X  g   Q hVP                  R8X  g   Q hVP                  R8X  g   Q hVP                  R4      R.8X  g   Q hVP                  R8X  g   Q hVP                  4       R8X  g   Q hVP                  R	R	R	R	R	R
7      pW18X  g   Q h\         P                  ! R4      pVP                  4       pVP                  4       R8X  g   Q h\         P                  ! R4      pVP                  4       pVP                  4       R8X  g   Q h\        RR7      P                  R	R7      P                  4       R8X  g   Q h\        RR7      P                  4       P                  4       R8X  g   Q h\        RRR.R .RRR7      pVP                  RR7      R8X  g   Q hVP                  4       P                  RR7      R8X  g   Q hR# )!z0HTTP://Example.com/A%61/./../A%61?B%62=C%63#D%64ÚBbzB%62zC%63r3   rq  ÚCcÚDdzhttp://example.com/Aa?Bb=Cc#DdFrM   zhttp://example.iozhttp://example.io/z/a%2fb/cd%3f?k%3d=v%23#testz/a%2Fb/cd%3F?k%3D=v%23#testr7  )Úpercentsz/%te%stsz/%25te%25stsÚftpz%%%z%a%bÚ%z%:%)r   r   r   r   r+   Tr\   zftp://%:%@/%%%/%a%b?%=%%#%z0ftp://%25:%25@/%25%25%25/%25a%25b?%25=%25%25#%25N)ÚAa)r   z%te%sts)rî  z%%)
r   rT   rÐ   r½  r   Ú	normalizer   r   r   rV   )	r    re   Únorm_urlÚnoop_norm_urlÚslashless_urlÚslashful_urlÚdelimited_urlÚnorm_delimited_urlÚpercenty_urls	   &        r%   Útest_normalizeÚTestURL.test_normalize  sH  € ä�mŠmÐNÓOˆØ�w‰w�t‹} Ô"Ð"Ð"Ø�w‰w�v‹ 6 (Ô*Ð*Ð*Ü�3—8‘8‹} Ô!Ð!Ð!ð —=‘=“?ˆà�‰ &Ô(Ð(Ð(Ø�}‰} Ô-Ð-Ð-Ø�}‰} Ô'Ð'Ð'Ø�|‰|˜DÓ! d VÔ+Ð+Ð+Ø× Ñ  DÔ(Ð(Ð(Ø×ÑÓ!Ð%EÔEÐEÐEð Ÿ™Ø˜u¨5¸Èð &ó 
ˆð Ô#Ð#Ð#ô ŸšÐ&9Ó:ˆØ$×.Ñ.Ó0ˆØ×#Ñ#Ó%Ð)=Ô=Ð=Ð=ô ŸšÐ&CÓDˆØ*×4Ñ4Ó6ÐØ!×)Ñ)Ó+Ð/LÔLÐLÐLô �_Ô%×/Ñ/¸Ð/Ó?×GÑGÓIØôð	
ðô ˜Ô(×2Ñ2Ó4×<Ñ<Ó>À.ÔPÐPÐPäØØ˜�Ø�-ØØô
ˆð × Ñ ¨tÐ Ó4Ø+ô,ð	
ð,ð ×"Ñ"Ó$×,Ñ,¸4Ð,Ó@ØAôBð	
òBr(   c                ó¢  € R p\         P                  ! V4      p\        V4      V8X  g   Q h\        V4      R8X  g   Q h\        '       dE   \        \        V4      \        4      '       g   Q h\        \        V4      \        4      '       g   Q hR# \        \        V4      \        4      '       g   Q h\        \        V4      \        4      '       g   Q hR# )u&   http://example.com/Ã¡/y%20a%20y/?b=%25s*   http://example.com/%C3%A1/y%20a%20y/?b=%25N)r   rT   r   r\  ÚPY2r   rO  ru  s   &  r%   Útest_strÚTestURL.test_str¸  s�   € ð 8ˆÜ�mŠm˜DÓ!ˆÜ�s‹|˜tÔ#Ð#Ð#Ü�S‹zÐJÔJÐJÐJç‹3Üœc #›h¬×.Ò.Ð.Ð.Üœg c›l¬G×4Ò4Ð4Ò4äœc #›h¬×0Ò0Ð0Ð0Üœe C›j¬%×0Ò0Ð0Ò0r(   c                óN  € \         P                  ! R 4      pVP                  4       P                  R8X  g   Q hVP	                  4       P                  R8X  g   Q h\         P                  ! R4      pVP                  4       P                  R8X  g   Q hVP	                  4       P                  R8X  g   Q hVP	                  4       P                  4       P                  R8X  g   Q hRp\         P                  ! V4      P	                  4       P                  4       P                  R8X  g   Q hR# )	u   http://abÃ©.com/u   abÃ©.comzxn--ab-cja.comu(   http://ãƒ‰ãƒ¡ã‚¤ãƒ³.ãƒ†ã‚¹ãƒˆ.co.jp#testu   ãƒ‰ãƒ¡ã‚¤ãƒ³.ãƒ†ã‚¹ãƒˆ.co.jpzxn--eckwd4c7c.xn--zckzah.co.jpzhttp://Example.comrq  N)r   rT   rd   r   rÑ   Úget_decoded_url)r    re   rv  s   &  r%   Útest_idna_cornersÚTestURL.test_idna_cornersÈ  så   € ä�mŠmÐ.Ó/ˆØ�z‰z‹|× Ñ  JÔ.Ð.Ð.Ø�z‰z‹|× Ñ Ð$4Ô4Ð4Ð4ä�mŠmÐFÓGˆØ�z‰z‹|× Ñ Ð$BÔBÐBÐBØ�z‰z‹|× Ñ Ð$DÔDÐDÐDà�z‰z‹|×+Ñ+Ó-×2Ñ2Ð6TÔTÐTÐTà#ˆä�MŠM˜$Ó×&Ñ&Ó(×8Ñ8Ó:×?Ñ?À=ÔPð	
ÚPr(   r?  N)r   )RrF  rG  rH  rI  Ú__doc__r&   r/   r6   rC   rG   rQ   rY   ra   rj   rn   rr   rw   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)  r.  r4  r8  r_  rb  ri  rm  rw  r{  r~  r‰  rŒ  r�  rš  rŸ  r¦  r¯  r³  r·  rÂ  rÇ  rÊ  rÍ  rÓ  rÖ  rÜ  rß  rã  ræ  rø  rü  r   rJ  rK  rL  s   @r%   r   r   ‘   s   ø‡ € ñò=ô$1+òf+ò
ò&	
ò
ò(7ò+òò
ò 

ò
ò0	
òEò+ò
ò&<Cò|BòEò5ò((òT%
òN
ò,
ò2>ò*.ò6òò!ò	$ò	)ò5ò:ò9òMò
ò4
ò0
ò&6ò 1ò
ò.Lò
ò
Gò.ò7òSAòj
ò 1òD7ò2ò0AòMòFò
ò
Fò9òv
"òAò.>ò6/ò
ò*ò$
"òPòDòò&òBòò,>òPò 7
òr1÷ 
ð 
r(   r   )Úgúhttp://a/b/c/g)z./gr  )zg/úhttp://a/b/c/g/)z/gú
http://a/g)z//gzhttp://g)z?yzhttp://a/b/c/d;p?y)zg?yzhttp://a/b/c/g?y)z#szhttp://a/b/c/d;p?q#s)zg#szhttp://a/b/c/g#s)zg?y#szhttp://a/b/c/g?y#s)z;xzhttp://a/b/c/;x)zg;xzhttp://a/b/c/g;x)zg;x?y#szhttp://a/b/c/g;x?y#s)r   r   )rª   úhttp://a/b/c/)z./r  )r«   úhttp://a/b/)z../r  )z../gúhttp://a/b/g)z../..ú	http://a/)z../../r
  )z../../gr  )z
../../../gr  )z../../../../gr  )z/./gr  )z/../gr  )zg.zhttp://a/b/c/g.)z.gzhttp://a/b/c/.g)zg..zhttp://a/b/c/g..)z..gzhttp://a/b/c/..g)z./../gr	  )z./g/.r  )zg/./hzhttp://a/b/c/g/h)zg/../hzhttp://a/b/c/h)z	g;x=1/./yzhttp://a/b/c/g;x=1/y)z
g;x=1/../yzhttp://a/b/c/y)zg?y/./xzhttp://a/b/c/g?y/./x)zg?y/../xzhttp://a/b/c/g?y/../x)zg#s/./xzhttp://a/b/c/g#s/./x)zg#s/../xzhttp://a/b/c/g#s/../x)6zhttp://localhostrq   zhttp://127.0.0.1/zhttp://[::127.0.0.1]/zhttp://[::1]/zhttp://localhost/foozhttp://localhost/foo/zhttp://localhost/foo!!bar/zhttp://localhost/foo%20bar/zhttp://localhost/foo%2Fbar/zhttp://localhost/foo?nzhttp://localhost/foo?n=vzhttp://localhost/foo?n=/a/bz%http://example.com/foo!@$bar?b!@z=123z$http://localhost/asd?a=asd%20sdf/345z6http://(%2525)/(%2525)?(%2525)&(%2525)=(%2525)#(%2525)z<http://(%C3%A9)/(%C3%A9)?(%C3%A9)&(%C3%A9)=(%C3%A9)#(%C3%A9)zG?sslrootcert=/Users/glyph/Downloads/rds-ca-2015-root.pem&sslmode=verifyz%http://googlewebsite.com/e-shops.aspxz?http://example.com:8080/search?q=123&business=Nothing%20Specialz*http://hatnote.com:9000/?arg=1&arg=2&arg=3r�  z"http://xn--ggbla1c4e.xn--ngbc5azd/z.http://tools.ietf.org/html/rfc3986#section-3.4z:ftp://ftp.rfc-editor.org/in-notes/tar/RFCs0001-0500.tar.gzz.http://[1080:0:0:0:8:800:200C:417A]/index.htmlzssh://192.0.2.16:2222/z$https://[::101.45.75.219]:80/?hi=byez7ldap://[::192.9.5.5]/dc=example,dc=com??sub?(sn=Jensen)zFmailto:me@example.com?to=me@example.com&body=hi%20http://wikipedia.orgznews:alt.rec.motorcycleztel:+1-800-867-5309zurn:oasis:member:A00024:xa  magnet:?xt=urn:btih:1a42b9e04e122b97a5254e3df77ab3c4b7da725f&dn=Puppy%20Linux%20precise-5.7.1.iso&tr=udp://tracker.openbittorrent.com:80&tr=udp://tracker.publicbt.com:80&tr=udp://tracker.istole.it:6969&tr=udp://tracker.ccc.de:80&tr=udp://open.demonii.com:1337zhttps://%3A@example.com/zhttps://%40@example.com/zhttps://%2f@example.com/zhttps://a:%3a@example.com/zhttps://a:%40@example.com/zhttps://a:%2f@example.com/zhttps://a:%3f@example.com/zhttps://example.com/%2F/zhttps://example.com/%3F/zhttps://example.com/%23/zhttps://example.com/?%23=bzhttps://example.com/?%3D=bzhttps://example.com/?%26=bzhttps://example.com/?a=%23zhttps://example.com/?a=%26zhttps://example.com/?a=%3Dz https://example.com/?foo+bar=bazz https://example.com/?foo=bar+bazzChttp://(%2525):(%2525)@example.com/(%2525)/?(%2525)=(%2525)#(%2525)z8first_seg_rel_path__colon%3Anotok/second_seg__colon%3Aok)Ú
__future__r   Úsysr„  Útypingr   r   r   r   r   r	   Úcommonr
   r   r   r   Ú_urlr   r   Úversion_inforû  r   r   rU   r™   rš   r^   r   r?  r(   r%   Ú<module>r     s  ðõ (ã 
Û ß =× =å %ß !ß -ð 
×Ñ�qÕ˜QÑ€Ù
ˆr‹(€ð 9€	ð 2Ð ð1ð ð1ð ð	1ð
 ð1ð ð1ð ð1ð !ð1ð  ð1ð #ð1ð  ð1ð $ð1ð ð1ð  ð1ð (ð1ð  ð!1ð" ð#1ð$ ð%1ð& ð'1ð( ð)1ð* ð+1ð, ð-1ð. ð/1ð0 ð11ð6 !ð71ð8 $ð91ð> ð?1ð@ ðA1ðB ðC1ðD ðE1ðF  ðG1ðH  ðI1ðL ðM1ðN !ðO1ðP "ðQ1ðR !ðS1ðT *ðU1ðV %ðW1ðZ (ð[1ð\ *ð]1ð^ (ð_1ð` *ða1Ð ðhA€ôHF
Ðö F
r(   