[Distutils] Comparison semantics for alphanumeric components of a version number (was: Version comparison - round 2)

Tarek Ziadé ziade.tarek at gmail.com
Fri Jun 5 15:07:31 CEST 2009


On Fri, Jun 5, 2009 at 11:19 AM, Ben Finney<ben+python at benfinney.id.au> wrote:
>
> Yet the discussion around these non-obvious semantics, trying to have
> components interpreted as “pre-release” and “post-release” and
> “development release” and so on seem to underline the fact that
> they're *not* something that there's any consensus on. So why are they
> being foisted into a standard for version strings?

There's a consensus on this in most packaging system out there, and the goal
is to have a rational version system that is understandable by most packagers
so they can work with python projects versions.

For instance, most packaging systems out there will reject your project if
you use "FooBar" as its version number,  then "ZooBar" for its second release.

> Rather than trying to force non-alphanumeric comparison semantics for
> alphabetic sequences, why not simply say that alphanumeric comparison
> semantics apply for components? That would, at a stroke, end all this
> turmoil and IMO futile seeking of some other consensus, when the best
> consensus is already what most would expect: alphanumeric comparison.

I don't think alphanumeric comparison is what most would expect.

For example if you use dates for your version, it'll work perfeclty
with alphanumeric
comparison but Fedora packagers will fail at sorting your versions properly.

Tarek


More information about the Distutils-SIG mailing list