[Distutils] PEP440: foo-X.Y.Z does not satisfy "foo>X.Y"?

Chris Jerdonek chris.jerdonek at gmail.com
Sat Dec 27 06:38:50 CET 2014

On Fri, Dec 26, 2014 at 4:53 PM, Marcus Smith <qwcode at gmail.com> wrote:
>> Thinking of ">1.7" as "greater than the 1.7 series" sort of helps me as
>> well...
> the problem with thinking of it this way is that you naturally want to
> extend the concept to >=, but it doesn't work.
> If the concept were consistent,  1.7.dev1 would satisfy  >=1.7, but it
> doesn't.

I'm pretty sure it's consistent.  For example, "1.7.2" doesn't satisfy
">1.7", but it satisfies ">=1.7" (e.g. because it's "part of the

I believe the inconsistency you're mentioning doesn't have anything to
do with the comparison operator.  It's that pre-releases like "dev1"
are special cases and governed by different rules.

For example, from the "Handling of pre-releases" section,
"Pre-releases of any kind, including developmental releases, are
implicitly excluded from all version specifiers, unless they are
already present on the system, explicitly requested by the user, or if
the only available version that satisfies the version specifier is a
pre-release."  And then it goes on.


> for >=, the concept seems to be zero-padding.
> for >, the concept is the series wildcard idea.
> this inconsistency concerns me, and makes it hard to edit the PEP to be more
> understandable like I would have wanted.
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> https://mail.python.org/mailman/listinfo/distutils-sig

More information about the Distutils-SIG mailing list