[Distutils] Error downloading pythonutils from pypi: Can't process plain .py files

Phillip J. Eby pje at telecommunity.com
Sat Dec 20 02:02:53 CET 2008


At 07:41 AM 12/19/2008 -0700, Jason R. Coombs wrote:
>Phillip,
>         Thanks for your response.
>
> > -----Original Message-----
> > From: Phillip J. Eby [mailto:pje at telecommunity.com]
> > Sent: Thursday, 18 December, 2008 21:59
> >
> > ...  And
> > it's not reasonable to expect it to grow special cases for every site
> > that wants to hide the filename in the query string attached to a CGI
> > script.
>
>I absolutely agree it's not reasonable to grow special cases... but the RFCs
>do provide a standard for describing the content disposition.  Perhaps it
>would be worthwhile to handle that general case.  Specifically, one could
>request the headers for a given URL to determine if a content-disposition
>filename is supplied.

Please re-read my original message; easy_install can't retrieve every 
URL in order to determine which URL to retrieve in the first place.


>... or alternatively, one could only perform the content-disposition
>retrieval when the filename _appears_ to be invalid.

...which would mean it would then have to follow every NON-download 
link on the page.


>Would you consider a patch that incorporates this more robust behavior?

If you can come up with a way to do it without retrieving any 
non-download URLs, and that doesn't need a special case for every 
kind of CMS, yes.

I just don't think that those requirements can be met.

Now, for the specific case of the apparent filename not matching the 
actual filename, it's possible you could do something about 
that.  But it would only work for voidspace and anybody else using a 
.py file as their wrapping script, because the only reason 
easy_install's even *considering* that URL a download candidate is 
the .py extension.  Without it, it wouldn't be considered a download 
URL to start with, let alone actually retrieved.

(So, it won't address Java, PHP, or Zope CMS programs without more 
special cases.)



More information about the Distutils-SIG mailing list