Warn about potentially incompatible project name canonicalisations#560
Closed
PeterJCLaw wants to merge 2 commits intopython-poetry:mainfrom
Closed
Warn about potentially incompatible project name canonicalisations#560PeterJCLaw wants to merge 2 commits intopython-poetry:mainfrom
PeterJCLaw wants to merge 2 commits intopython-poetry:mainfrom
Conversation
The handling of package names within the Python packaging ecosystem is unfortunately not in a great state at the moment. There exist a large number of packages which contain characters which (some of) the specs indicate are invalid, yet there is not a clear migration path nor destination at the moment. Poetry's approach is to normalise project names towards their "canonical" form, meaning that existing projects on PyPI which use the more relaxed name forms will be silently renamed if they move to (recent versions of) Poetry. As well as changing the name of these packages (which maintainers are unlikely to expect nor desire) this unfortunately ends up breaking introspection via `importlib.metadata` in Python 3.8 and 3.9 which are not aware of the canonicalisation rules which Poetry is using. Adding this warning informs maintainers so that they can decide how (and if) they want this name canonicalisation to happen.
|
Kudos, SonarCloud Quality Gate passed!
|
Contributor
|
pypi/warehouse#10030 was closed - fixed apparently - a couple of weeks ago, which should make this unnecessary. |
Member
|
Closing as no longer necessary |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








The handling of package names within the Python packaging ecosystem is unfortunately not in a great state at the moment. There exist a large number of packages which contain characters which (some of) the specs indicate are invalid, yet there is not a clear migration path nor destination at the moment.
Poetry's approach is to normalise project names towards their "canonical" form, meaning that existing projects on PyPI which use the more relaxed name forms will be silently renamed if they move to (recent versions of) Poetry. As well as changing the name of these packages (which maintainers are unlikely to expect nor desire) this unfortunately ends up breaking introspection via
importlib.metadatain Python 3.8 and 3.9 which are not aware of the canonicalisation rules which Poetry is using.Adding this warning informs maintainers so that they can decide how (and if) they want this name canonicalisation to happen.
Added tests for changed code.
Not sure this is worthwhile here?
Updated documentation for changed code.Not planning to do this given the self-documenting nature of this.
Open to suggestions on better wording. Other details which might be worth including are:
.replaced with_pypi/warehouse#10030, in particular the summary at PyPI does not accept wheel file name with.replaced with_pypi/warehouse#10030 (comment)Related to python-poetry/poetry#6198