[Distutils] parse_version() with '-'

Pascoe, S (Stephen) S.Pascoe at rl.ac.uk
Wed Nov 29 10:42:21 CET 2006


I've just noticed pkg_resources.parse_version() doesn't appear to follow
the setuptools documentation with regards 'rc' vs. '-rc'.  With
setuptools-0.6c3:
 
Python 2.4.1 (#1, Oct 13 2006, 16:58:04)
[GCC 4.0.2 20050901 (prerelease) (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pkg_resources import parse_version
>>> parse_version('2.1-rc2') < parse_version('2.1')
True
>>> parse_version('2.1rc2') < parse_version('2.1')
True
>>>

This contradicts the docs and suggests a '-' no longer differentiates
pre and post releases.
Is this a bug or feature?
 
Thanks,
Stephen.
 
---
Stephen Pascoe  01235 445980
British Atmospheric Data Centre
Rutherford Appleton Laboratory, CCLRC
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/distutils-sig/attachments/20061129/aa57dc97/attachment.htm 


More information about the Distutils-SIG mailing list