poetry: `poetry publish` fails for package with `.` in its name.

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)

Most upvoted comments

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. 😃

Once again, I’m not exactly sure how to solve this issue, though.

We’ve already got a PR under review that uses the same logic pip does to canonicalize wheel names.