Setuptools + specifying project's version
Hi, In http://peak.telecommunity.com/DevCenter/setuptools#specifying-your-project-s... there is a statement that 2.1-rc2 means you've already released 2.1 and an example """ ....
parse_version('2.1-rc2') < parse_version('2.1') False .... """
Running the example gives quite the opposite result (setuptools-0.6c11):
parse_version('2.1-rc2') < parse_version('2.1') True
and actually it turns out that a pre-release tag 2.1rc2 is equal to the post-release tag 2.1-rc2
parse_version('2.1-rc2') == parse_version('2.1rc2') True
Does anyone have any idea why that's the case or is it a bug? Cheers, Ruslan
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 05/09/2011 03:29 PM, Ruslan Spivak wrote:
Hi,
In http://peak.telecommunity.com/DevCenter/setuptools#specifying-your-project-s... there is a statement that 2.1-rc2 means you've already released 2.1 and an example
""" ....
parse_version('2.1-rc2') < parse_version('2.1') False .... """
Running the example gives quite the opposite result (setuptools-0.6c11):
parse_version('2.1-rc2') < parse_version('2.1') True
and actually it turns out that a pre-release tag 2.1rc2 is equal to the post-release tag 2.1-rc2
parse_version('2.1-rc2') == parse_version('2.1rc2') True
Does anyone have any idea why that's the case or is it a bug?
Likely a bug, due to the fact that nobody who could fix it uses post-release tags (I can't see the point, myself) -- just make another release already). Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3ITWkACgkQ+gerLs4ltQ4YogCfdXZw8noDKlQ/eRoBjz8Y1gO5 yN0Anj0seQNVfFw2iDGpmxpkrOpHIeRH =IIDM -----END PGP SIGNATURE-----
At 03:29 PM 5/9/2011 -0400, Ruslan Spivak wrote:
Hi,
In http://peak.telecommunity.com/DevCenter/setuptools#specifying-your-project-s... there is a statement that 2.1-rc2 means you've already released 2.1 and an example
""" ....
parse_version('2.1-rc2') < parse_version('2.1') False .... """
Running the example gives quite the opposite result (setuptools-0.6c11):
parse_version('2.1-rc2') < parse_version('2.1') True
and actually it turns out that a pre-release tag 2.1rc2 is equal to the post-release tag 2.1-rc2
parse_version('2.1-rc2') == parse_version('2.1rc2') True
Does anyone have any idea why that's the case or is it a bug?
If it's a bug, it's a documentation bug. Originally, setuptools had the behavior described, and I later realized it was a bad idea. ;-) I think I skipped updating the documentation at the time, though, because there were still versions of setuptools in the field which could confuse the two, and thus using a '-' would still be a bad practice. It might be a good idea to update it *now*, though. ;-)
participants (3)
-
P.J. Eby
-
Ruslan Spivak
-
Tres Seaver