Issue #22 new

Handling of redirections

Georges Racinet
created an issue

The main PyPI has some sort of spelling-correction system. It issues permanent redirections (HTTP 301) to help installing misspelled packages (capitalization, mostly)

As a result many distributions have wrong lists of dependencies (babel for Babel, mako for Mako, etc.) and their maintainers don't even know it.

Currently, pep381client ignores these redirections. The installer softwares that use it (e.g., pip) will default to the main 'simple' page, to get the full list, then try and guess from it.

Besides from being inefficient (main simple page is huge), this does not work in all cases, for instance if pypiserver is used in front of the mirror (will report to them as well).

Here's the part where pep381 client ignores a redirection:

        if r.status == 301:
            # package not existant anymore, however, similarly-spelled
            # package exists
            return None

But it won't see them all, because this happens only for distributions who changed names for a similar one. For others, pep381run won't see them at all.

I did manually add some redirections in my mirrors front-end, but that's a pain to maintain.

I'm not sure anything can be done within pep381client, besides web server log analysis and dump of suggested web server configuration snippet. Hence 'minor' priority.

Comments (2)

  1. Log in to comment