+
    êhG"  ã                   óÈ   € ^ RI t^ RIt^ RIt^ RIt^ RIHt ^ RIt^ RI	t
^ RIt ! R R4      t ! R R4      t ! R R4      t]P                   P#                  ^4      R	 4       tR# )
é    N)Úcleandocc                   ón   a € ] tR t^t o 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V tR# )ÚTestPackageIndexc                óÎ   € R pVR,          pRP                  4       P                  ! R/ \        4       B p\        P                  P
                  P                  V4      '       g   Q hR# )z&http://other_url?:action=show_md5&amp;z'digest=0123456789abcdef0123456789abcdefz€
            <a href="http://some_url">Name</a>
            (<a title="MD5 hash"
            href="{hash_url}">md5</a>)
        N© )ÚlstripÚformatÚlocalsÚ
setuptoolsÚpackage_indexÚPYPI_MD5Úmatch)ÚselfÚhash_urlÚdocs   &  ÚD/usr/lib/python3/dist-packages/setuptools/tests/test_packageindex.pyÚ
test_regexÚTestPackageIndex.test_regex   sa   € Ø;ˆØÐ=Õ=ˆð÷ ‰F‹H—V‘Vð	ñ (ô %›hñ	(ˆô
 ×'Ñ'×0Ñ0×6Ñ6°s×;Ò;Ð;Ò;ó    c                ól  € \         P                  P                  4       pR p\        P                  ! \
        \        P                  ! V4      R7      ;_uu_ 4        VP                  V4      p\        V\        P                  P                  4      '       g   Q h RRR4       R#   + '       g   i     R# ; i)z.http://127.0.0.1:0/nonesuch/test_package_index©r   N©r   r   ÚPackageIndexÚpytestÚraisesÚ	ExceptionÚreÚescapeÚopen_urlÚ
isinstanceÚurllibÚerrorÚ	HTTPError©r   ÚindexÚurlÚvs   &   r   Útest_bad_url_bad_portÚ&TestPackageIndex.test_bad_url_bad_port   sn   € Ü×(Ñ(×5Ñ5Ó7ˆØ>ˆÜ�]Š]œ9¬B¯IªI°c«N×;Ö;Ø—‘˜sÓ#ˆAÜ˜a¤§¡×!7Ñ!7×8Ò8Ð8Ñ8÷ <×;×;Ò;ús   Á>B"Â"B3	c                óp  € \         P                  P                  RR7      pRp\        P                  ! \
        \        P                  ! V4      R7      ;_uu_ 4        VP                  V4      p\        V\        P                  P                  4      '       g   Q h RRR4       R#   + '       g   i     R# ; i)úwww.example.com©ÚhostszMurl:%20https://svn.plone.org/svn/collective/inquant.contentmirror.plone/trunkr   N©r+   r   r$   s   &   r   Útest_bad_url_typoÚ"TestPackageIndex.test_bad_url_typo    sv   € ô ×(Ñ(×5Ñ5Ð<PÐ5ÓQˆà]ˆä�]Š]œ9¬B¯IªI°c«N×;Ö;Ø—‘˜sÓ#ˆAÜ˜a¤§¡×!7Ñ!7×8Ò8Ð8Ñ8÷ <×;×;Ò;ús   Á>B$Â$B5	c                ó   € \         P                  P                  RR7      pR pW!n        Rp\        P
                  ! \        RR7      ;_uu_ 4        VP                  V4       RRR4       R#   + '       g   i     R# ; i)r+   r,   c                  ó@   € \         P                  P                  R 4      h)Úline)ÚhttpÚclientÚBadStatusLine)Úargss   *r   Ú_urlopenÚ?TestPackageIndex.test_bad_url_bad_status_line.<locals>._urlopen/   s   € Ü—+‘+×+Ñ+¨FÓ3Ð3r   zhttp://example.comr3   r   Nr.   )r   r   r   Úopenerr   r   r   r   )r   r%   r8   r&   s   &   r   Útest_bad_url_bad_status_lineÚ-TestPackageIndex.test_bad_url_bad_status_line,   sY   € Ü×(Ñ(×5Ñ5Ð<PÐ5ÓQˆò	4ð  ŒØ"ˆÜ�]Š]œ9¨G×4Ö4Ø�N‰N˜3Ô÷ 5×4×4Ò4ús   ÁA,Á,A=	c                ó  € \         P                  P                  RR7      pRp VP                  V4       \        R4      h  \        P
                  P                   d.   p\        T4      pRT9   g   RT9   g
   RT9   g   Q h Rp?R# Rp?ii ; i)	z?
A bad URL with a double scheme should raise a DistutilsError.
r,   z2http://http://svn.pythonpaste.org/Paste/wphp/trunkznonnumeric portzgetaddrinfo failedzName or service not knownNzDid not raiser.   )	r   r   r   r   Ú	distutilsÚerrorsÚDistutilsErrorÚstrÚRuntimeError)r   r%   r&   r"   Úmsgs   &    r   Útest_bad_url_double_schemeÚ+TestPackageIndex.test_bad_url_double_scheme7   s’   € ô ×(Ñ(×5Ñ5Ð<PÐ5ÓQˆð Cˆð		Ø�N‰N˜3Ôô ˜?Ó+Ð+øô ×Ñ×.Ñ.ô 	Ü�e“*ˆCà! SÔ(Ø'¨3Ô.Ø.°#Ô5ðð6õ ûð	ús   ¤A  Á BÁ"BÂBc                ó~   € \         P                  P                  RR7      pRpVP                  VR4      '       g   Q hR# )r+   r,   zfile:///tmp/test_package_indexTNr.   )r   r   r   Úurl_ok)r   r%   r&   s   &  r   Útest_url_okÚTestPackageIndex.test_url_okK   s8   € Ü×(Ñ(×5Ñ5Ð<PÐ5ÓQˆØ.ˆØ�|‰|˜C ×&Ò&Ð&Ò&r   c                óÊ   € \         P                  P                  pV! R 4      pRpW#8X  g   Q hV! R4      pRpW#8X  g   Q hV! R4      pRpW#8X  g   Q hV! R4      pRpW#8X  g   Q hR# )	zreportlab-2.5.win32-py2.4.exezreportlab-2.5.win32.exeNz!reportlab-2.5.win-amd64-py2.7.exezreportlab-2.5.win-amd64.exe)úreportlab-2.5z2.4Úwin32)rK   NrL   )rK   z2.7ú	win-amd64)rK   NrM   )r   r   Úparse_bdist_wininst)r   ÚparseÚactualÚexpecteds   &   r   Útest_parse_bdist_wininstÚ)TestPackageIndex.test_parse_bdist_wininstP   sƒ   € Ü×(Ñ(×<Ñ<ˆáÐ6Ó7ˆØ2ˆØÔ!Ð!Ð!áÐ0Ó1ˆØ1ˆØÔ!Ð!Ð!áÐ:Ó;ˆØ6ˆØÔ!Ð!Ð!áÐ4Ó5ˆØ5ˆØÔ!Ð!Ò!r   c                ó†   € \         P                  P                  P                  pV! R4      w  r#VR8X  g   Q hVR8X  g   Q hR# )z1
Test the basic usage of _vcs_split_rev_from_url
zhttps://example.com/bar@2995zhttps://example.com/barÚ2995N)r   r   r   Ú_vcs_split_rev_from_url)r   Úvsrfur&   Úrevs   &   r   Útest__vcs_split_rev_from_urlÚ-TestPackageIndex.test__vcs_split_rev_from_urlc   sC   € ô ×(Ñ(×5Ñ5×MÑMˆÙÐ7Ó8‰ˆØÐ/Ô/Ð/Ð/Ø�fŒ}ÐŠ}r   c                ó|  € VR,          pVP                  R4      ;_uu_ 4       pVP                  R4       RRR4       R\        P                  P	                  \        V4      4      ,           R,           p\        P                  P                  V4      pRVP                  4       9   g   Q hR#   + '       g   i     L~; i)zB
local_open should be able to read an index from the file system.
z
index.htmlÚwz<div>content</div>Nzfile:Ú/Úcontent)
ÚopenÚwriter!   ÚrequestÚpathname2urlrA   r   r   Ú
local_openÚread)r   ÚtmpdirÚ
index_fileÚfr&   Úress   &&    r   Útest_local_indexÚ!TestPackageIndex.test_local_indexl   s†   € ð ˜lÕ*ˆ
Ø�_‰_˜S×!Ô! QØ�G‰GÐ(Ô)÷ "àœŸ™×3Ñ3´C¸³KÓ@Õ@À3ÕFˆÜ×&Ñ&×1Ñ1°#Ó6ˆØ˜CŸH™H›JÔ&Ð&Ò&÷	 "×!ús   £B+Â+B;	c                óî  € RR.p. ROp. ROpR.pR.p. R	OpV UUU	U
Uu. uFN  pV FE  p\        W4V.R.4       F/  p	V F&  p
V
 Uu. uF  pRP                  WxW›.4      NK  	  upNK(  	  K1  	  KG  	  KP  	  pp
p	pppV Fh  w  rÞ\        \        P                  P                  RV,           4      4      pV^ ,          P                  R8X  g   Q hV^,          P                  V8X  d   Kh  Q h	  R# u upi u upp
p	ppi )
z&
EGG fragments must comply to PEP 440
Ú z1!z.post0z.dev0z3http://example.com/example-foo.zip#egg=example-foo-N)Ú0z0.0z0.0.0)Úa0Úb0Úrc0))rl   rl   )ú	+ubuntu.0rq   )z	+ubuntu-0rq   )z	+ubuntu_0rq   )ÚsumÚjoinÚlistr   r   Údistros_for_urlÚversion)r   ÚepochÚreleasesÚpreÚpostÚdevÚlocalÚeÚrÚpÚlocsÚlocÚversionsr'   ÚvcÚdistss   &               r   Útest_egg_fragmentÚ"TestPackageIndex.test_egg_fragmentw   s   € ð
 Øð
ˆò
ˆò

ˆð
 ˆzˆàð
ˆò
ˆñ ÷
á�Û�Ü˜# SÐ)¨B¨4Ö0�Û�ñ	 15Ó5±¨ˆR�W‰W�a˜A�^Ö$±Ô5ñ ñ	 6ñ 1ñ 6áñ 6Ùð 	ô 
ó ‰EˆAÜÜ×(Ñ(×8Ñ8ØIÈAÕMóóˆEð
 ˜•8×#Ñ# rÔ)Ð)Ð)Ø˜•8×#Ñ# rÖ)Ð)Ð)ó ùò 6ùö
s   Ÿ%C.ÁC)Á C.Ã)C.c                ó0  € R p\         P                  P                  4       pVR,          pVP                  RRRRV.4       VP                  RRVRRR.4       VP	                  W14      pV\        V4      8X  g   Q h\        VP                  4      ^8X  g   Q hR	# )
z7git+https://github.example/group/project@master#egg=foozproject@masterÚgitÚcloneú--quietú$https://github.example/group/projectz-CÚcheckoutÚmasterN)r   r   r   ÚregisterÚdownloadrA   ÚlenÚcalls)r   Útmp_pathÚfpr&   r%   Úexpected_dirÚresults   &&&    r   Útest_download_git_with_revÚ+TestPackageIndex.test_download_git_with_rev£   s˜   € ØGˆÜ×(Ñ(×5Ñ5Ó7ˆàÐ"2Õ2ˆØ
�‰ØØØØ2Øð
ô 	ð 	�‰�U˜D ,°
¸IÀxÐPÔQà—‘ Ó.ˆàœ˜\Ó*Ô*Ð*Ð*Ü�2—8‘8‹} Ô!Ð!Ò!r   c                ó¦   € R p\         P                  P                  4       pVR,          pVP                  RRRRV.4       VP	                  W14       R# )z0git+https://github.example/group/project#egg=fooÚprojectrˆ   r‰   rŠ   r‹   N)r   r   r   rŽ   r�   )r   r’   r“   r&   r%   r”   s   &&&   r   Útest_download_git_no_revÚ)TestPackageIndex.test_download_git_no_rev¶   sS   € Ø@ˆÜ×(Ñ(×5Ñ5Ó7ˆà )Õ+ˆØ
�‰ØØØØ2Øð
ô 	ð 	�‰�sÖ%r   c                ó  € R p\         P                  P                  4       pRp\        P                  ! \
        P                  P                  VR7      ;_uu_ 4        VP                  W!4       RRR4       R#   + '       g   i     R# ; i)z'svn+https://svn.example/project#egg=fooz!.*SVN download is not supported.*r   N)	r   r   r   r   r   r>   r?   r@   r�   )r   r’   r&   r%   rC   s   &&   r   Útest_download_svnÚ"TestPackageIndex.test_download_svnÄ   sY   € Ø7ˆÜ×(Ñ(×5Ñ5Ó7ˆà2ˆÜ�]Š]œ9×+Ñ+×:Ñ:À#×FÖFØ�N‰N˜3Ô)÷ G×F×FÒFús   ÁA7Á7B	r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   r(   r/   r;   rD   rH   rR   rY   ri   r…   r–   rš   r�   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r   r      sL   ø‡ € ò<ò9ò
9ò	 ò,ò('ò
"ò&ò	'ò**òX"ò&&÷*ð *r   r   c                   ó>   a € ] tR t^Ít o R tR tR tR tR tRt	V t
R# )ÚTestContentCheckersc                ó
  € \         P                  P                  P                  R 4      pVP	                  RP                  R4      4       VP                  P                  4       R8X  g   Q hVP                  4       '       g   Q hR# )ú3http://foo/bar#md5=f12895fdffbd45007040d2e44df98478z$You should probably not be using MD5ÚasciiÚ f12895fdffbd45007040d2e44df98478N)	r   r   ÚHashCheckerÚfrom_urlÚfeedÚencodeÚhashÚ	hexdigestÚis_valid©r   Úcheckers   & r   Útest_md5ÚTestContentCheckers.test_md5Î   sl   € Ü×*Ñ*×6Ñ6×?Ñ?ØAó
ˆð 	�‰Ð;×BÑBÀ7ÓKÔLØ�|‰|×%Ñ%Ó'Ð+MÔMÐMÐMØ×Ñ×!Ò!Ð!Ò!r   c                óÈ   € \         P                  P                  P                  R4      pVP	                  RP                  R4      4       VP                  4       '       g   Q hR# )z<Content checks should succeed silently if no hash is presentz1http://foo/bar#something%20completely%20differentÚanythingr«   N©r   r   r­   r®   r¯   r°   r³   r´   s   & r   Útest_other_fragmentÚ'TestContentCheckers.test_other_fragmentÖ   sO   € ä×*Ñ*×6Ñ6×?Ñ?Ø?ó
ˆð 	�‰�Z×&Ñ& wÓ/Ô0Ø×Ñ×!Ò!Ð!Ò!r   c                óÈ   € \         P                  P                  P                  R4      pVP	                  RP                  R4      4       VP                  4       '       g   Q hR# )z0Content checks should succeed if a hash is emptyzhttp://foo/bar#md5=r¹   r«   Nrº   r´   s   & r   Útest_blank_md5Ú"TestContentCheckers.test_blank_md5Þ   sK   € ä×*Ñ*×6Ñ6×?Ñ?Ð@UÓVˆØ�‰�Z×&Ñ& wÓ/Ô0Ø×Ñ×!Ò!Ð!Ò!r   c                ó~   € \         P                  P                  P                  R 4      pVP                  R8X  g   Q hR# )rª   Úmd5N)r   r   r­   r®   Ú	hash_namer´   s   & r   Útest_get_hash_name_md5Ú*TestContentCheckers.test_get_hash_name_md5ä   s7   € Ü×*Ñ*×6Ñ6×?Ñ?ØAó
ˆð × Ñ  EÔ)Ð)Ò)r   c                ó�   € \         P                  P                  P                  R 4      pVP	                  R R4      pVR8X  g   Q hR# )rª   c                 ó   € V # )Nr   )Úxs   &r   Ú<lambda>Ú1TestContentCheckers.test_report.<locals>.<lambda>î   s   € ¡qr   zMy message about %szMy message about md5N)r   r   r­   r®   Úreport)r   rµ   Úreps   &  r   Útest_reportÚTestContentCheckers.test_reportê   sC   € Ü×*Ñ*×6Ñ6×?Ñ?ØAó
ˆð �n‰n™[Ð*?Ó@ˆØÐ,Ô,Ð,Ò,r   r   N)rŸ   r    r¡   r¢   r¶   r»   r¾   rÃ   rÌ   r£   r¤   r¥   s   @r   r¨   r¨   Í   s#   ø‡ € ò"ò"ò"ò*÷-ð -r   r¨   c                   ó&   a € ] tR t^òt o R tRtV tR# )ÚTestPyPIConfigc                óþ   € VR ,          pVP                  \        R4      RR7       \        P                  P	                  4       pVP
                  R,          pVP                  R8X  g   Q hVP                  R8X  g   Q hR# )z.pypircz“
                [pypi]
                repository=https://pypi.org
                username=jaraco
                password=pity%
                zutf-8)Úencodingzhttps://pypi.orgÚjaracozpity%N)Ú
write_textr   r   r   Ú
PyPIConfigÚcreds_by_repositoryÚusernameÚpassword)r   Útmp_home_dirÚpypircÚcfgÚcreds   &&   r   Útest_percent_in_passwordÚ'TestPyPIConfig.test_percent_in_passwordó   s|   € Ø 	Õ)ˆØ×ÑÜðóð ð 	ô 
	
ô ×&Ñ&×1Ñ1Ó3ˆØ×&Ñ&Ð'9Õ:ˆØ�}‰} Ô(Ð(Ð(Ø�}‰} Ô'Ð'Ò'r   r   N)rŸ   r    r¡   r¢   rÜ   r£   r¤   r¥   s   @r   rÏ   rÏ   ò   s   ø‡ € ÷(ð (r   rÏ   c                 óX   € \         P                  P                  P                  R4       R# )z3
REL should not hang on a contrived attack string.
Na  < rel=                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                )r   r   ÚRELÚsearchr   r   r   Útest_REL_DoSrá     s   € ô
 ×Ñ× Ñ ×'Ñ'Ð(>Ö?r   )Úhttp.clientr4   r   Úurllib.errorr!   Úurllib.requestÚinspectr   r   Úsetuptools.package_indexr   Údistutils.errorsr>   r   r¨   rÏ   ÚmarkÚtimeoutrá   r   r   r   Ú<module>rê      sd   ðÛ Û 	Û Û Ý ã ã ã ÷|*ñ |*÷~"-ñ "-÷J(ñ (ð( ‡�×Ñ�QÓñ@ó ò@r   