Incorrect normalization of PEP 440 development and post release version name #4843
Closed
3 tasks done
Labels
kind/bug
Something isn't working as expected
-vvv
option).Issue
I don't know if this is a bug in
poetry-core
but I am posting it here.Poetry incorrectly normalizes the PEP440 version names of development releases and post releases. The following table shows the normal forms in the PEP and the forms which poetry uses.
The version names that poetry uses are however acceptable alternative forms. (Hence this bug could be low priority)
Unless there is a very good reason to do so I don't see why poetry should normalize the version names to an alternative form rather than the standard form, if it is going to normalize the version names in the first place.
To recreate the issue, create a repository and change the version in
pyproject.py
to one of the forms for a post-release or a development release. like (1.2.3.post4
or5.6.7.dev8
). Now there are two places where the normalized version numbers show up.wheel
andsdist
. To check this runpoetry build
and look at the filenames generated. It would have generated things of the form 1.2.3-4 and 5.6.7dev8 instead of 1.2.3.post4 and 5.6.7.dev8.poetry install
. Then checkimportlib.metadata.version("PACKAGE_NAME")
in an interactive python shell.The text was updated successfully, but these errors were encountered: