[Distutils] [Python-Dev] [Python-checkins] peps: PEP 426: replace implied 'version starts with' with new ~= operator
chris.jerdonek at gmail.com
Tue Feb 26 20:53:08 CET 2013
On Tue, Feb 26, 2013 at 8:01 AM, Donald Stufft <donald.stufft at gmail.com> wrote:
> 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.
> * 86 total releases using at least 3 version levels where A.B and A.B.0
> to be different.
> 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
> 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
> it then we need to be explicit about how that should be handled in either
There is a similar issue with leading zeroes. For example, I was able
to upload to PyPI versions both of the form A.B.2 and A.B.02. The PEP
should probably be explicit and state that any N must be the unique
integer representation, and state how that case should be handled if
violated (with respect to equality, etc).
Is it easy to check if any releases on PyPI have versions with leading zeroes?
More information about the Distutils-SIG