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

file:// urls broken #471

Closed
bb-migration opened this Issue Dec 8, 2015 · 1 comment

Comments

Projects
None yet
1 participant
@bb-migration

bb-migration commented Dec 8, 2015

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


In setuptools/package_index.py

line 1040 in local_open()
files.append("%s" % (f,f))

If f is a unicode string the resulting text is:
[u"<a href=u'testbuilder-1.0.tar.gz'>testbuilder-1.0.tar.gz"]

note the href=u in the HTML, which is not valid - this leads to output like the following:
Reading file:///tmp/tmpBGlO4q/testbuilder/
Reading file:///tmp/tmpBGlO4q/testbuilder/u
No local packages or download links found for testbuilder

Using ..."%s"... in the format string should fix this - I'm not 100% sure why filename is ending up unicode for me, but there it is


@bb-migration

This comment has been minimized.

bb-migration commented Dec 9, 2015

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


Don't rely on repr for an HTML attribute value (could end up with 'u' prefix). Fixes #471.

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