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

Dots in package names are getting replaced by underscores since 1.2.0 #6590

Closed
4 tasks done
SvenBecker opened this issue Sep 22, 2022 · 7 comments
Closed
4 tasks done
Labels
kind/question User questions (candidates for conversion to discussion) status/duplicate Duplicate issues

Comments

@SvenBecker
Copy link

  • Poetry version: 1.2.0/1.2.1
  • Python version: 3.8/3.9
  • OS version and name: macOS/Linux
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

Given a pyproject.toml file like the following

[tool.poetry]
name = "com.namespace.package"
version = "5.3.0"

previously the resulting wheel name after running poetry build was com.namespace.package-5.3.0-py3-none-any.whl. Now it is
com_namespace_package-5.3.0-py3-none-any.whl. Same applies to metadata on various locations. Unfortunately we can not simply rename our packages due to permission handling based on artifact names.

@SvenBecker SvenBecker added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Sep 22, 2022
@dimbleby
Copy link
Contributor

essentially duplicate #5782

@neersighted neersighted added kind/question User questions (candidates for conversion to discussion) and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Sep 22, 2022
@neersighted neersighted closed this as not planned Won't fix, can't repro, duplicate, stale Sep 22, 2022
@neersighted neersighted added the status/duplicate Duplicate issues label Sep 22, 2022
@rkhwaja
Copy link

rkhwaja commented Jan 20, 2023

This is still broken in 1.3.2. It worked in 1.1.15

My package name is fs.onedrivefs. The files produced by poetry build are fs_onedrivefs*. The dist-info folder in the wheel is similarly renamed. The name in the METADATA file is changed to fs-onedrivefs.

Can I just reopen this bug?

@neersighted
Copy link
Member

That's not a bug, that's the expected filename as mandate by the packaging standards.

@rkhwaja
Copy link

rkhwaja commented Jan 20, 2023

Thanks. I see your point about the all the renamings with the underscore. However, I don't think that covers the changing of the name field in the METADATA file. It causes the name of the package to be wrong in pip freeze for instance.

@petergaultney
Copy link

petergaultney commented Feb 21, 2023

PEP 491 is apparently deferred - are we certain it's a packaging standard?

Incidentally, importlib.metadata.version does not successfully read the METADATA for packages built by poetry, because of the dots being replaced by underscores.

@neersighted
Copy link
Member

Sorry, that was a bad citation. PEP 625 is the authority for sdist names, and PEP 427 is canonical for wheels. Both impose the same escaping rules.

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/question User questions (candidates for conversion to discussion) status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

5 participants