package with _ in name breaks localshop
bsdlp opened this issue · 4 comments
I have a package with an underscore in the name (let's call it a_pkg
). Uploading the package via setup.py bdist_egg upload
works, but if I upload the egg itself, the package will be uploaded as a-pkg
since that's what's in EGG-INFO
.
Now, I see I have both a_pkg
and a-pkg
when browsing the listings at /simple
, and downloading a release from either package returns HTTP 500
.
Should localshop attempt to convert -
into _
, since -
is an invalid character?
What do you mean by "upload the egg itself"?
I'm using twine
(the pypa recommend tool) to upload the build artifacts (the .egg
files in the dist/
directory) to localshop
The problem is that twine
replaces any underscores with hyphens [1]. Localshop assumed that the name
on the upload POST was always correct, and therefore made no extra validation on it.
I fixed the issue by adding an extra validation on the upload form. The bugfix is included on the release 0.8.1
Update to the release 0.8.3 instead, it fixes a problem I just found in 0.8.1
Thanks!