[Distutils] PEP 386 status - last round here ?

Tarek Ziadé ziade.tarek at gmail.com
Thu Nov 26 18:36:35 CET 2009


On Thu, Nov 26, 2009 at 1:08 PM, M.-A. Lemburg <mal at egenix.com> wrote:
> Here's another take at a minimal change to the format which
> includes the things we discussed, adds a few more aliases
> for the "post" and "dev" markers and also adds optional
> underscores for more readability.
>
> VERSION_RE = re.compile(r'''
>    ^
>    (?P<version>\d+\.\d+)          # minimum 'N.N'
>    (?P<extraversion>(?:\.\d+)*)   # any number of extra '.N' segments
>    (?:                            # pre-release tag
>        _?
>        (?P<prerel>(a|alpha|b|beta|c|rc))
>        _?
>        (?P<prerelversion>\d+(?:\.\d+)*)
>    )?
>    (?P<postdev>
>        (\.(post|fix|sp)_?(?P<post>\d+))?
>        (\.(dev|pre|build|nightly)_?(?P<dev>\d+))?
>    )?
>    $''', re.VERBOSE + re.I)
>
> Examples:
>
>  3.2.0a0.20091125
> < 3.2.0a1
> = 3.2.0_alpha_1
> < 3.2.0a1.20091125
> < 3.2.0rc1
> = 3.2.0c1
> < 3.2.0rc1.20091125
> = 3.2.0_rc1.20091125
> < 3.2.0
> < 3.2.0.sp1
> = 3.2.0.fix1
> = 3.2.0.post1
>
> One nit I have with the order of the N.N.devN version is that it is regarded
> "more" than any of the pre-release tags, but less than the release itself:
>
>  1.0a1
> < 1.0rc1
> < 1.0.dev456
> < 1.0
>
> IMHO, the order should be:
>
>  1.0.dev456
> < 1.0a1.dev456
> < 1.0a1
> < 1.0rc1.dev456
> < 1.0rc1
> < 1.0
>
> since the .dev versions are really only snapshots leading up to
> some release, i.e. 1.0.dev456 is a snapshot leading up to the
> first pre-release of the 1.0 :-)

That's right, that's a bug in the PEP and/or verlib.py

The changes look good to me.

If you made some changes in verlib, would you mind pushing them back at

http://bitbucket.org/tarek/distutilsversion ?

I'll update the PEP then, and if there's no more feedback here, I'll
propose it at python-dev

Regards
Tarek


More information about the Distutils-SIG mailing list