-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
pdm-backend should not normalize names in project metadata #185
Comments
It is the behavior of pyproject-metadata, can you report the issue there? |
Maybe just removing line 198 does the trick? |
Fixes #185 Signed-off-by: Frost Ming <me@frostming.com>
Thank you! I've confirmed this fixes the problem in the metadata. Unfortunately, the project name is still getting normalized on PyPI, so I will follow up over there. |
This is not solved: pypi/warehouse#13992 (comment) But I think this is a bug in |
But twine is doing the same: https://github.com/pypa/twine/blob/0bb428c410b8df64c04dc881ac1db37d932f3066/twine/package.py#L146 Maybe only flit doesn't normalize it? |
Okay, hatch doesn't normalize either, I will change it in PDM. |
I think both twine and flit do the right thing. I had a long discussion with @dstufft about this, and he gave me a little bit of Python code to test what those tools do when uploading to PyPI). Here's what I've seen: PDM:
flit:
twine:
So you can see that only PDM is sending You can see the effects of this very clearly at: https://pypi.org/project/flufl-enum/ (I'm not sure if the canonical URL is also taken from that, but I care a little less about that because https://pypi.org/project/flufl.enum/ does redirect.) |
Thanks! Is there an issue over in PDM I can follow? |
|
Thank you! |
In the long thread on discuss.python.org several problems related to normalization of package names have been identified. Specifically,
pdm-backend
's behavior of normalizing the package name in the project metadata causes PyPI to incorrectly display the package's intentional name andpip install
instructions.Context is contained in the thread linked above.
FWIW, I actually don't care about the file names - normalize away! I just want the metadata project name to match what I put in
pyproject.toml
!The text was updated successfully, but these errors were encountered: