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

An underscore in a package name appears as a hyphen on PyPI #13218

Closed
Kodiologist opened this issue Mar 16, 2023 · 2 comments
Closed

An underscore in a package name appears as a hyphen on PyPI #13218

Kodiologist opened this issue Mar 16, 2023 · 2 comments
Labels
bug 🐛 requires triaging maintainers need to do initial inspection of issue

Comments

@Kodiologist
Copy link

Describe the bug
I have a package named geocode_sparcs, but it appears at https://pypi.org/project/geocode-sparcs . In fact, https://pypi.org/project/geocode_sparcs redirects there. Evidently it's not just a matter of PyPI not supporting underscores in package names, because e.g. https://pypi.org/project/ls_json exists, and https://pypi.org/project/ls-json redirects to it.

In general, I don't understand what the deal is with hyphens or underscores in package names it comes to PyPI.

To Reproduce
Upload geocode_sparcs-0.2.0.tar.gz with twine upload.

My Platform
twine version 4.0.1 (importlib-metadata: 4.6.4, keyring: 23.8.2, pkginfo: 1.8.3, requests: 2.27.1, requests-toolbelt: 0.9.1, urllib3: 1.26.9)

@Kodiologist Kodiologist added bug 🐛 requires triaging maintainers need to do initial inspection of issue labels Mar 16, 2023
@di
Copy link
Member

di commented Mar 16, 2023

This is pypa/twine#920: twine is normalizing the package name to something that is functionally equivalent when uploading to PyPI, but not exactly the same as what you originally specified.

PyPI is just using whatever is provided at upload-time, so I don't think there's anything to do here.

@Kodiologist
Copy link
Author

Yep, sounds like a Twine thing. I should've guessed. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 requires triaging maintainers need to do initial inspection of issue
Projects
None yet
Development

No branches or pull requests

2 participants