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

[1.2] don't use normalize_version() #6550

Merged
merged 1 commit into from
Sep 17, 2022
Merged

[1.2] don't use normalize_version() #6550

merged 1 commit into from
Sep 17, 2022

Conversation

poetry-bot[bot]
Copy link

@poetry-bot poetry-bot bot commented Sep 17, 2022

Backport a14a93d from #6476.

…#6476)

When you already have a `Version` in hand,
`normalize_version(version.text)` is a very roundabout way of calling
`version.to_string()`: it re-parses the version text to give you the
same `Version` you already had and then calls `to_string()` on that.

https://github.com/python-poetry/poetry-core/blob/37cee90a5dd4c7ee2c5ee836216ba813242b3ade/src/poetry/core/utils/helpers.py#L27-L28

Then calling `escape_version()` on such a version is actually
counter-productive, per #6466.

Similar changes can and should be made over in poetry-core, but it
should be safe to merge this before that is done.

(cherry picked from commit a14a93d)
@neersighted neersighted enabled auto-merge (rebase) September 17, 2022 18:00
@neersighted neersighted merged commit 024c4a5 into 1.2 Sep 17, 2022
@neersighted neersighted deleted the backport-6476-to-1.2 branch September 17, 2022 18:04
Copy link

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.

@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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants