[Distutils] RFC : Version comparison

Jean-Paul Calderone exarkun at divmod.com
Wed Apr 22 15:38:15 CEST 2009


On Wed, 22 Apr 2009 11:12:22 +0200, Tarek Ziadé <ziade.tarek at gmail.com> wrote:
>Hi,
>
>We worked during Pycon on version comparisons. Distutils has one but
>it is a bit strict, setuptools has another one, but it's a bit
>heuristic.
>
>We would like to propose the inclusion for Python 2.7 of a new version
>comparison algorithm, based on the discussion
>Fedora, Ubuntu and Python people had. The plan would be to deprecate
>the current one (which is not really used anyway)
>and provide, promote this one.
>
>Trent Mick took the lead on this work at the end of Pycon, and worked
>on a prototype.
>
>It's explained here, and there's an implementation  (I've put it at
>the top of the page for conveniency):
>
>http://wiki.python.org/moin/Distutils/VersionComparison
>

Clearly being able to parse the string representation is important, since
this information will largely reside in non-Python text files.  I suppose
that many people will also be very comfortable with and happy about writing
RationalVersion(somestring) and ">=somestring".  However, it would also be
great if there were a way to construct a version object out of structured
data instead.  Can a constructor which takes each part of the version data
as a separate object be added?

Jean-Paul


More information about the Distutils-SIG mailing list