[Distutils] new behavior of parse_version('dev')?

Jason R. Coombs jaraco at jaraco.com
Tue Nov 18 15:53:11 CET 2008

It appears to me as if the behavior of parse_version('dev') has changed with
setuptools-0.6c9, but this change is not documented on the setuptools
documentation.  Assuming pv=parse_version, the documentation implies that
pv('a') < pv('b') < pv('c') == pv('rc') < pv('d') == pv('dev'). but it turns
out that pv('dev') == pv('@') < pv('a').


I suggest the documentation say something like the following:


A pre-release tag is a series of letters that are alphabetically before
"final". Some examples of prerelease tags would include alpha, beta, a, c,
dev, and so on. You do not have to place a dot before the prerelease tag if
it's immediately after a number, but it's okay to do so if you prefer. Thus,
2.4c1 and 2.4.c1 both represent release candidate 1 of version 2.4, and are
treated as identical by setuptools.

In addition, there are three special prerelease tags that are treated as if
they were the letter c: pre, preview, and rc. So, version 2.4rc1, 2.4pre1
and 2.4preview1 are all the exact same version as 2.4c1, and are treated as
identical by setuptools.

Furthermore, dev is a special tag that is always less than any other
character tag.  It is treated as the equivalent of the character '@'.

Any objections?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20081118/edf0418c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7001 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20081118/edf0418c/attachment.bin>

More information about the Distutils-SIG mailing list