-
Notifications
You must be signed in to change notification settings - Fork 952
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
PyPI does not honor package name from author in some cases #13992
Comments
PyPI respects the This was set by the build backend you were using, which consumed it from |
(And to be clear, if the |
Note that PyPI will rename the project to whatever the most recently uploaded artifact's |
Thanks @di - that's what I suspected. In this case I'm using PDM and |
@warsaw I agree with your intent, but I don't think there's anything actionable for PyPI to do here. Given that PEP 621 says this about the
I think if you disagree with this behavior in build backeds, you probably need to take it up as an ecosystem-wide issue instead (which you kind of already have in your discourse thread). |
The PEP that I hope to post this weekend clarifies that section of PEP 621, because I think that segment goes against what most people expected. |
@dstufft 💯 Thank you! |
@warsaw Given that a future PEP would likely resolve this, and that PyPI would likely not need to make changes as a result of that PEP, is it OK with you if we close this? |
Yep, and thanks @di! |
@di I'm reopening this issue because I think there may still be a problem on the PyPI side. Let's look at .whl METADATA excerpt:
sdist PKG-INFO excerpt:
Both metadata files are non-normalized, as we all now expect and want. However, look at the PyPI page. It is still displaying the normalized name and instructions. I've verified the metadata by actually downloading the .whl and .tar.gz so I know that PyPI has the right information. But it's still displaying the wrong data. |
What is doing the upload? Because PyPI also doesn't read the |
@frostming: Doesn't look like you quite got it with your change: https://github.com/pdm-project/pdm-backend/blob/4476f86465644bdf6dc5f073fc5552db56937932/src/pdm/backend/_vendor/pyproject_metadata/__init__.py#L197 |
Closing, PyPI is behaving as described. |
Okay, thanks!
TIL! I'm using pdm publish, so I think that's probably a bug in the PDM front-end. Maybe I can try |
Describe the bug
PyPI's UI does not honor the package name I specify in my
pyproject.toml
file. This leads to confusion and incorrect (or at least unintentional) installation instructions on the PyPI front page of the project.Take for example
flufl.i18n
. I clearly call the project that in its pyproject.toml file. That's the name I want to advertise the package as, and this intentional -- and legal -- so PyPI should honor that, even if the packaging tools normalize the upload file name. But this doesn't happen, as this screenshot illustrates.The URL is also normalized:
https://pypi.org/project/flufl-i18n/
.Expected behavior
I would expect PyPI at least to display
flufl.i18n 5.0.1
on the project page, and provide apip
install command aspip install flufl.i18n
. If it doesn't do this, it directly conflicts with my intentional choices and my own documentation.I think the URL should also be non-normalized, but I'm a little less concerned about that.
To Reproduce
Create a project with a dot in its name. Use a modern packaging tool that support
pyproject.toml
(flufl,i18n
uses PDM). Upload that package to PyPI.My Platform
n/a
Additional context
This may be related to the meta issue #12316 but I didn't see this specific issue discussed there (I could have missed it). It's also related to this discuss.python.org thread. It's probably also related to the root cause for a downstream bug report in GNU Mailman.
The text was updated successfully, but these errors were encountered: