Skip to content
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
ghost opened this issue Aug 21, 2013 · 4 comments
Closed

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

ghost opened this issue Aug 21, 2013 · 4 comments

Comments

@ghost
Copy link

ghost 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.


@ghost
Copy link
Author

ghost 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.

@ghost
Copy link
Author

ghost commented Sep 6, 2013

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


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

@ghost
Copy link
Author

ghost commented Sep 6, 2013

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


Fixed in 1.1.3

@ghost
Copy link
Author

ghost 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.

@ghost ghost added critical bug labels Mar 29, 2016
@ghost ghost closed this as completed Mar 29, 2016
jaraco added a commit that referenced this issue Nov 18, 2021
Allow pkgsrc to monkeypatch settings instead of relying on patches.
jaraco added a commit that referenced this issue Feb 4, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants