[Distutils] PEP 386 status - last round here ?

M.-A. Lemburg mal at egenix.com
Wed Nov 25 23:36:09 CET 2009


Tarek Ziadé wrote:
> On Wed, Nov 25, 2009 at 9:52 PM, M.-A. Lemburg <mal at egenix.com> wrote:
> [..]
>> If we'd allow [a-z_] (including the underscore which AFAIK doesn't
>> cause RPM/deb problems), this could also be written as:
>>
>>        3.2.0_dev_snapshot.20091125
>>
>> ... much better :-)
> 
> How do you sort them in that case ? And can you have snapshots of
> pre-release tags ?

You sort them based on the tag "_dev_snapshot". The leading underscore
causes the tag to sort before the first release tag (which would
start with a letter, like in "alpha"):

>>> "_dev_snapshot" < "alpha"
True

> e.g., is this right ? :
> 
> 3.2.0_dev_snapshot.20091125 < 3.2.0a_dev_snapshot.20091125 <
> 3.2.0rc1_dev_snapshot.20091125 < 3.2.0

Yes (*), even though, I'd probably drop the "_dev_snapshot" on these and
write:

  3.2.0_dev_snapshot.20091125
< 3.2.0a1
< 3.2.0a1.20091125
< 3.2.0rc1
< 3.2.0rc1.20091125
< 3.2.0

It's clear from the added version component that the version
points to revision after the release revision.

With the PEP format, I could write:

  3.2.0a1.dev20091125
< 3.2.0a1
< 3.2.0a1.post20091125
< 3.2.0rc1
< 3.2.0rc1.post20091125
< 3.2.0

... but I doubt that users would understand the difference
between "dev" and "post".

Furthermore, the "dev" and "post" modifiers don't follow the
same semantics as the pre-release tags.

This version would use the same semantics for both, but
looks even worse:

  3.2.0a1.0a20091125
< 3.2.0a1
< 3.2.0a1.0a20091125
< 3.2.0rc1
< 3.2.0rc1.0a20091125
< 3.2.0

I'd just drop the whole post/dev stuff and allow additional
(\.\d+) components after the pre-release tag part. One
pre-release field per version string is really enough, IMHO.

An alternative based on the same convention we use for Python
would be to use the "alpha 0" release as marker for pre-release
snapshots. The a0 "release" is then never actually released.

Using this convention, I could write:

  3.2.0a0.20091125
< 3.2.0a1
< 3.2.0a1.20091125
< 3.2.0rc1
< 3.2.0rc1.20091125
< 3.2.0

... looks good :-)

(*) with one nit: the third one needs to be
3.2.0rc_dev_snapshot_1.20091125 since the "1" in
"rc1_dev_snapshot" is not allowed.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Nov 25 2009)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/


More information about the Distutils-SIG mailing list