PEP 440 contains a section that claims:
Summary of differences from pkg_resources.parse_version [https://www.python.org/dev/peps/pep-0440/#id63]
* Local versions sort differently, this PEP requires that they sort as greater than the same version without a local version, whereas pkg_resources.parse_version considers it a pre-release marker.
I haven't been able to find any mention of this in the setuptools changelogs, but this no longer seems to be the case: >>> from pkg_resources import parse_version >>> parse_version('1.0.0+dev') > parse_version('1.0.0') True Thus, it might be good to change the comment in the PEP accordingly (ideally, someone is able to figure out in which version of setuptools parse_version started to be compatible with PEP440). Best, Michael Goerz
On Fri, 18 Jan 2019 at 03:17, Michael Goerz <goerz@stanford.edu> wrote:
PEP 440 contains a section that claims:
Summary of differences from pkg_resources.parse_version [https://www.python.org/dev/peps/pep-0440/#id63]
* Local versions sort differently, this PEP requires that they sort as greater than the same version without a local version, whereas pkg_resources.parse_version considers it a pre-release marker.
I haven't been able to find any mention of this in the setuptools changelogs, but this no longer seems to be the case:
>>> from pkg_resources import parse_version >>> parse_version('1.0.0+dev') > parse_version('1.0.0') True
Thus, it might be good to change the comment in the PEP accordingly (ideally, someone is able to figure out in which version of setuptools parse_version started to be compatible with PEP440).
Thanks for the heads up - I've filed https://github.com/python/peps/issues/881 about it, and pinged Jason to see if he knows when that behaviour may have changed. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
participants (2)
-
Michael Goerz
-
Nick Coghlan