Capitalization issues in combination with conda skeleton
stefdoerr opened this issue · 4 comments
Describe the bug
It's impossible to fix the capitalization of a PyPI project even on the test server. Once uploaded it stays like that even if the project is deleted and reuploaded. Problem is that conda skeleton
expects small caps URLs and it won't find it if it contains capitalized letters (see conda/conda-build#2389)
Now I practically only have the choice of:
- Testing on the production server which I didn't upload the capitalized project to (and hoping I don't mess anything up)
- Choosing a different name for my project (highly improbable)
- Modify the URL in the
conda skeleton
yaml file every time it's generated (makes for ugly code)
Expected behavior
Deleting a project on the test server should delete it for good. It's a test server after all.
To Reproduce
- Create a project with capital letters i.e. Mytest and upload it to the test server. File resides now in
https://test.pypi.io/packages/source/M/Mytest/Mytest-0.0.1.tar.gz
- Run
conda skeleton
on it and it creates a script that tries to pull thetar.gz
but with small caps in the URL likehttps://test.pypi.io/packages/source/m/mytest/mytest-0.0.1.tar.gz
- Get an error with
conda build
because the small caps URL doesn't exist - Delete the package from the PyPI test server
- Change project name to lower caps
mytest
- Reupload the package to the test server
- Test server puts the files under the capitalized project URL only fixing the filename i.e.
https://test.pypi.io/packages/source/M/Mytest/mytest-0.0.1.tar.gz
Hello @stefdoerr thanks for your report. This belongs on the conveyor project, which is the shim that redirects these legacy URLs into their canonical location. I'm going to transfer the issue there.
The long story short here is that conveyor is not performing any normalization on the project name. Support for this could be added with the packaging.utils.canonicalize_name utility.
We would probably want to drop this check and apply normalization to the project_name
somewhere in the request handling.
Is there any chance to get the project wiped from the test server so that I can use it again before canonicalization becomes a thing? Or is it manual work?
Oh seems like it fixed now. Don't know if anyone changed it or it just needed some time to pick up the lower case changes.