On 21 March 2015 at 15:19, Peter Suter <[email protected]> wrote:
> Hi
>
> from pkg_resources import parse_version
> parse_version('2.0dev-r123') > parse_version('1.0dev')
>
> In setuptools 7 and below this was True. In setuptools 8 and above this is
> False.
>
> A bug? Are these tags not supported anymore?
>
> The documentation still mentions them extensively, e.g. in:
> https://pythonhosted.org/setuptools/setuptools.html#managing-continuous-releases-using-subversion
>
> setup.cfg options are recommended that generate similar versions:
>
> [egg_info]
> tag_build = .dev
> tag_svn_revision = 1
>
> Am I missing something?

Version numbers are now standardised under PEP 440
(https://www.python.org/dev/peps/pep-0440/). Under that PEP,
post-releases come before pre-releases. "r" represents a post-release
and "dev" a pre-release. So your version isn't a valid PEP 440
version, and gets parsed as a legacy version. Legacy versions then get
sorted before any PEP 440 version, such as 1.0dev.

It looks like the setuptools documentation hasn't been updated
(setuptools now uses PEP 440 versions since 8.0, see
https://pythonhosted.org/setuptools/history.html#id48).

Paul
_______________________________________________
Distutils-SIG maillist  -  [email protected]
https://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to