Skip to content
Unverified Commit a14a93d9 authored by David Hotham's avatar David Hotham Committed by GitHub
Browse files

refactor(uploader): don't use normalize_version() or escape_version() (#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.
parent 4914c265
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment