-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
repository: keep (uncanonicalized) pretty_name #6237
Conversation
interesting canonicalization still creeps in for extras somewhere, I haven't tried to figure out where. Eg if you add dev = ["coverage[toml] (==5.0.4)", "cryptography (>=3.3.1)", "mypy", "pre-commit", "pytest (>=6.0.0,<7.0.0)", "sphinx", "sphinx-rtd-theme", "zope-interface"]
docs = ["sphinx", "sphinx-rtd-theme", "zope-interface"] although |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not the biggest fan of the inline canonicalization -- I'd rather see a variable to hold the canon form. That being said, LGTM even if you disagree.
…_name is equal to pretty_name)
5428048
to
ff834f4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Lockfiles created with 1.2rc1 are not compatible with 1.1 if there is a dependency with a dot in its name (e.g.
discord.py
), because 1.1 applies a half-hearted normalization not converting dot to dash (writingdiscord.py
in the lockfile) and 1.2rc1 does a complete normalization so thatdiscord.py
is normalized todiscord-py
, which is written to the lockfile.However, when looking at
poetry/src/poetry/packages/locker.py
Line 388 in 4392bd6
we can see that the intention has always been to write pretty name (instead of the canonicalized name) into the lockfile. Considering that, half-hearted normalization vs. complete normalization is not the actual issue.
The actual issue is that pretty name got lost unintionally in the process of looking up dependencies in repositories. This PR ensures that pretty name is not lost anymore.