[Distutils] Common version-comparison semantics for peace love and harmony
Laura Creighton
lac at openend.se
Sat Nov 28 10:50:36 CET 2009
In a message of Sat, 28 Nov 2009 10:27:14 +0100, Tarek Ziadé writes:
>On Sat, Nov 28, 2009 at 7:31 AM, Laura Creighton <lac at openend.se> wrote:
>> It occurs to me that this problem would go away if we had a way to
>> ask, for any given version number, 'what was your creation date' and
>> the sorting 'earlier' and 'later' by that date. Can somebody explain
>> why we aren't doing this?
>
>You mean like a timestamp before or after the version ?
>
>I might be wrong but I think that would be similar to what RPM calls
>an Epoch. A number that can be used to compare two packages when their
>versions number don't follow the standard scheme anymore. But that's
>just a fallback.
>But for the sake of simplicity and standardization, this extra number
>is avoided.
>
>Meaning that it would be better to define and use a standard for the
>released packages, than introducing a timestamp and say: do whatever
>you want with your version numbers.
But I think that it is the other way around ... what we want is a
timestamp. The algorithm is for guessing which version is ealier
in the absence of a timestamp.
>At some point, we all agree that MAJOR.MINOR.MICRO is an accepted
>standard and we are arguing about pre/post/dev releases.
We have no way to enforce this on the world. The arguments here may
have gone away, but out in the wild, I think we need to accept that
people are going to name their packages whatever they like. We
can suggest in the strongest possible terms that they use this
numbering convention, but it will still just be a suggestion.
>My point is that we are able to define a public scheme for those too,
>so all package installers share the same conventions.
>
>This doesn't imply that developers have to use it internally. It just
>implies that, if the developer releases his package at some point to
>PyPI, he will know *how* his version number will be sorted by package
>managers, because it's documented in a PEP. e.g. a shared convention.
It's not that I am 'anti-convention', it is just that I think that
if we include a timestamp, and use that _first_ when trying to find
out if a package is earlier than another package, then we will be
able to interoperate with those people who out of ignorance or some
business reason cannot respect the convention.
Laura
>Regards
>Tarek
More information about the Distutils-SIG
mailing list