New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bb-migration opened this Issue Aug 21, 2013 · 4 comments

Comments

Projects
None yet
1 participant
@bb-migration

bb-migration commented Aug 21, 2013

Originally reported by: rassie (Bitbucket: rassie, GitHub: rassie)


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.


@bb-migration

This comment has been minimized.

bb-migration commented Sep 6, 2013

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


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.

@bb-migration

This comment has been minimized.

bb-migration commented Sep 6, 2013

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


Correct 404 errors when URLs contain fragments. Fixes #69.

@bb-migration

This comment has been minimized.

bb-migration commented Sep 6, 2013

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


Fixed in 1.1.3

@bb-migration

This comment has been minimized.

bb-migration commented Sep 12, 2013

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


Looks like I got the logic wrong in the compat module (bb29cec316de). Should be fixed in 1.1.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment