Issue #69 resolved

Python 2.6: URLs should be stripped of #egg= fragments

Nikolai Prokoschenko
created an issue

Merged setuptools is missing a crucial conditional from distribute in the package_index._download_to function:

if '#' in url:
    url, info = url.split('#', 1)

Because of this, the #egg= is sent to the server and probably URL-encoded. At least for Bitbucket URLs this leads to 404 errors, but it wrong in general, since #egg= is metadata for setuptools only.

This error is probably not visible in Python 2.7+, since urllib2 has been patched to ignore the URL fragment on request.

Comments (7)

  1. Jason R. Coombs

    This issue stems from this changeset (4e4ccf3ea04d), which was ancestral to 0.9, so 0.7 and 0.8 should not be affected by this issue. I remember testing this behavior when I made the change (to ensure that the fragment in the request was suitably ignored), but I did not test on older Python versions. Thanks for the report; I'll get it fixed straight away.

  2. Log in to comment