[Distutils] [Python-Dev] [Python-checkins] peps: PEP 426: replace implied 'version starts with' with new =?utf-8?Q?=7E=3D_?=operator

Donald Stufft donald.stufft at gmail.com
Tue Feb 26 17:01:02 CET 2013


On Tuesday, February 26, 2013 at 10:10 AM, Nick Coghlan wrote:
> Remember, part of the goals of both PEP 386 and PEP 426 is to tighten
> up cases where setuptools is considered too permissive, because it's
> guessing in the face of ambiguity. "Trailing zeroes should be
> considered implied" when comparing versions is one such guess.
> 
> 

It goes against the common usage in the Python community.

* 135869 total releases
* 66528 total releases that have at least 3 version levels (A.B.C)
* 20244 total releases that have at least 3 version levels where A.B and
  A.B.0 appear to be equivalent[1].
* 86 total releases using at least 3 version levels where A.B and A.B.0 appear
  to be different[2].

Would break the assumptions made in ~30% of the releases using at least 3
version levels, or 15% of all releases. Furthermore A.B == A.B.0 being
equivalent is a matter of opinion with no clear answer. I would be inclined
to say that not breaking it for the 15% of all releases is a greater net
benefit here then anyones notion of "right" unless there is a clear benefit.

For what it's worth, the implementation of PEP386 treats them as equal as well,
choosing to pad the shorter one out to whatever the requisite number of 0's
is required to make the number of components equal.

On a tangential note PyPI should probably not be allowing you to upload both
a A.B and an A.B.0, or at the very least if we want PyPI to continue allowing
it then we need to be explicit about how that should be handled in either scheme.


[1] Determined by looking for A.B.N.NUMERIC_BUT_NOT_ZERO, and then seeing if
    there was a A.B.N without a A.B.N.0.
[2] Determined the same as in [1], but dropping the "without a A.B.N.0" and
    differences the counts.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20130226/b126a6b4/attachment.html>


More information about the Distutils-SIG mailing list