+
    WBi9                         R t RtRt. tRtRt^ RIt. ROtR t	R t
]R8X  d-   ^ RIt ! R	 R
]P                  4      t]P                  ! 4        R# R# )zConverts an IRI to a URI.z!Joe Gregorio (joe@bitworking.org)zCopyright 2006, Joe Gregorioz1.0.0MITNc                     T p\        V 4      p\         FV  w  r4W#8  d    V# W#8  g   K  W$8:  g   K  R P                  V P                  R4       Uu. uF  pRV,          NK  	  up4      p V# 	  V# u upi ) utf-8z%%%2X)ordescape_rangejoinencode)cretvalilowhighos   &     5/usr/lib/python3.14/site-packages/httplib2/iri2uri.pyr	   r	   0   sy    FAA!	7 M 8	WW188G3DE3Dagkk3DEFFM " M Fs   A0
c                Z   \        V \        4      '       d   \        P                  P	                  V 4      w  rr4pVP                  R4      P                  R4      p\        P                  P                  WW4V34      p RP                  V  Uu. uF  p\        V4      NK  	  up4      p V # u upi )zConvert an IRI to a URI. Note that IRIs must be
passed in a unicode strings. That is, do not utf-8 encode
the IRI before passing it into the function.idnar   r   )	
isinstancestrurllibparseurlsplitr	   decode
urlunsplitr   )urischeme	authoritypathqueryfragmentr
   s   &      r   iri2urir    <   s     #s5;\\5J5J35O2D$$V,33G<	 ll%%v$x&PQgg#.#Qvay#./J /s   B(__main__c                   ,   a  ] tR t^Nt o R tR tRtV tR# )Testc                V    . ROpV F  pV P                  V\        V4      4       K   	  R# )z6Test that URIs are invariant under the transformation.N)z"ftp://ftp.is.co.za/rfc/rfc1808.txtz#http://www.ietf.org/rfc/rfc2396.txtz)ldap://[2001:db8::7]/c=GB?objectClass?onezmailto:John.Doe@example.comz&news:comp.infosystems.www.servers.unixztel:+1-816-555-1212ztelnet://192.0.2.16:80/z3urn:oasis:names:specification:docbook:dtd:xml:4.1.2)assertEqualr    )self	invariantr   s   &  r   	test_urisTest.test_urisO   s)    	I !  gcl3 !    c                   V P                  R\        R4      4       V P                  R\        R4      4       V P                  R\        R4      4       V P                  R\        R4      4       V P                  R	\        R
4      4       V P                  R	\        \        R
4      4      4       V P                  R	\        R
P                  R4      4      4       R# )zFTest that the right type of escaping is done for each part of the URI.zhttp://xn--o3h.com/%E2%98%84u   http://☄.com/☄z%http://bitworking.org/?fred=%E2%98%84u   http://bitworking.org/?fred=☄z http://bitworking.org/#%E2%98%84u   http://bitworking.org/#☄z
#%E2%98%84u   #☄z/fred?bar=%E2%98%9A#%E2%98%84u   /fred?bar=☚#☄r   N)r%   r    assertNotEqualr	   )r&   s   &r   test_iriTest.test_iri^   s    .89 7?@ 2:; \7<+@A/KL / STU /GNNwWr*    N)__name__
__module____qualname____firstlineno__r(   r-   __static_attributes____classdictcell__)__classdict__s   @r   r#   r#   N   s     	4	 	r*   r#   ))   i  )i   i  )i   i  )i  i  )i   i )i   i )i   i )i   i )i   i )i   i )i   i )i   i )i  	 i	 )i  
 i
 )i   i )i   i )i   i )i  i )i   i )i   i )__doc__
__author____copyright____contributors____version____license__urllib.parser   r   r	   r    r0   unittestTestCaser#   mainr/   r*   r   <module>rB      sg    0
.  0	 z,x   ,\ MMOc r*   