Hm, you're right.  Note:

>>> from pkg_resources import *
>>> parse_version('1.0') < parse_version('1.0-dev')
False
>>> parse_version('1.0') < parse_version('1.0-r10')
True

So "dev" gets special treatment. Wonderful. I guess that must be intuitive.

Jim


On Jul 3, 2007, at 6:59 AM, Christian Theune wrote:

Hi,

Am Dienstag, den 03.07.2007, 06:19 -0400 schrieb Jim Fulton:
we have some packages around that have x.x.x.dev x.x.x-dev and i
think they are considered newer than x.x.xa1

a .dev release is older than a .a1 release (or a1). The '-' makes a
post-release tag, so x.x.x-dev is later than x.x.xa1.

That's what the spec says. However, that's not how setuptools worked for
me a week ago and is now.

'1.0-dev' is considered earlier than '1.0' as is '1.0dev':

from pkg_resources import parse_version
parse_version('1.0dev')
('00000001', '*@', '*final')
parse_version('1.0-dev')
('00000001', '*@', '*final')
parse_version('1.0-r123')
('00000001', '*final-', '*r', '00000123', '*final')
parse_version('1.0r123')
('00000001', '*r', '00000123', '*final')
parse_version('1.0a1')
('00000001', '*a', '00000001', '*final')
parse_version('1.0-a1')
('00000001', '*a', '00000001', '*final')
parse_version('1.0')
('00000001', '*final')

Christian


--
Jim Fulton                      mailto:[EMAIL PROTECTED]                Python 
Powered!
CTO                             (540) 361-1714                  
http://www.python.org
Zope Corporation        http://www.zope.com             http://www.zope.org



_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to