poetry: `poetry publish` fails for package with `.` in its name.
-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
OS version and name: windows 11, also fails on linux
-
Poetry version: 1.2.0-beta.1
-
Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/nekitdev/99b0cd36e9fd32712f38401439823cc1
Issue
For packages with .
in the name:
[tool.poetry]
name = "example.py"
Poetry correctly builds wheels and sdists with example.py
in the file name.
However, when uploading to PyPI with the canonical name (i.e. example-py
), poetry publish
fails with the following error:
HTTP Error 400: Start filename for 'example-py' with 'example-py'.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (9 by maintainers)
Is there some way to opt out of the package name normalization or would it be possible to provide such an option? We are using some internal PyPI so I’m not sure if those PyPI validations even affect us.
Sure, the proposal to canonicalize sdists in the same way as bdists wasn’t intended to rule out the possibility of supporting un-canonicalized project names at some later point (nor to rule it in, come to that!).
I suggest sdist canonicalization as a relatively low risk next step that can be taken without getting into that discussion at all. It’s clearly a bug at the moment that some packages can’t upload their sdists, start by solving that.
Then later debate the merits or otherwise of supporting un-canonicalized names.
Oh, I see, thanks! I’m looking forward to it. 😃
We’ve already got a PR under review that uses the same logic pip does to canonicalize wheel names.