[Distutils] setuptools http auth

Phillip J. Eby pje at telecommunity.com
Mon Apr 23 23:55:07 CEST 2007


At 01:07 PM 4/23/2007 -0700, Rob Cakebread wrote:
>On 4/23/07, Phillip J. Eby <pje at telecommunity.com> wrote:
>>
>>Argh.  setuptools.package_index isn't HTML-unquoting URLs.  That needs to
>>be fixed.  :(
>>
>
>I'm not sure if this is the best way to go about it, I couldn't find
>anything in the stdlib
>to unencode it, but this works:
>
>--- setuptools/package_index.py (revision 54927)
>+++ setuptools/package_index.py (working copy)
>@@ -385,6 +385,7 @@
>         of `tmpdir`, and the local filename is returned.  Various errors 
> may be
>         raised if a problem occurs during downloading.
>         """
>+        spec = spec.replace("&#64;", "@")
>         if not isinstance(spec,Requirement):
>             scheme = URL_SCHEME(spec)
>             if scheme:

There are actually a bunch of places where these URLs get used, so the 
decoding actually needs to happen all over.  So I'm implementing a more 
complete solution.



More information about the Distutils-SIG mailing list