[Distutils] version for VCS/local builds between alpha and release

Robert Collins robertc at robertcollins.net
Tue Apr 14 10:04:19 CEST 2015

Tl;dr: I woud like to change PEP-440 to remove the stigmata around dev
versions that come between pre-releases and releases.

The basic scenario here is developers and CD deployers building
versions from VCS of arbitrary commits. So we need to be able to
deliver strictly increasing version numbers, automatically, without
interfering with actual publishing of pre-release and release versions
to PyPI.

Today, this is fairly sane as a sort order and mechanism to deliver this:
>>> v = ['1.0', '1.2.3.a1.dev1', '1.2.3.a1', '1.2.3.a2.dev1', '1.2.3.b1', '1.2.3.b2.dev1', '1.2.3.rc1', '1.2.3.rc2.dev1', '1.2.3', '1.2.3.dev1']
>>> sorted(v, key=packaging.version.parse)
['1.0', '1.2.3.dev1', '1.2.3.a1.dev1', '1.2.3.a1', '1.2.3.a2.dev1',
'1.2.3.b1', '1.2.3.b2.dev1', '1.2.3.rc1', '1.2.3.rc2.dev1', '1.2.3']

But it doesn't feel good using a 'strongly recommended against' order.

I think the recommendation is overly strong: If we touch up the
language we can make the spec clearer, and a simple example like above
will speak a thousand words :).


Robert Collins <rbtcollins at hp.com>
Distinguished Technologist
HP Converged Cloud

More information about the Distutils-SIG mailing list