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

Paul Moore p.f.moore at gmail.com
Mon Dec 22 21:43:59 CET 2014

On 22 December 2014 at 20:33, Donald Stufft <donald at stufft.io> wrote:
> It’s true that pip doesn’t install pre-releases by default (assuming there
> is any final releases available), but that doesn’t actually solve the
> underlying problem - it just masks it. When people put ``foo<8`` in their
> install_requires they generally do not expect to get ``8.0.dev0``, and in my
> opinion, they shouldn’t get ``8.0.dev0`` even if someone uses —pre.

I see the point, but when *should* they get 8.0.dev0? It seems to me
that "=8.0" (with --pre) is the correct answer. So <8.0 means 7.9 and
earlier, >8.0 means 8.1 and later, =8.0 means 8.0 and any dev, pre,
post and local releases.

Essentially, any version X.Y.Z lumped together with all of its pre,
post, local and dev versions, (mathematically a version is an
equivalence class of all these) and otherwise ordering is a pretty
straightforward ordering as if the version were a tuple (X, Y, Z).
That's what my intuition says - are there any other ways that PEP 440
doesn't work like this?.


More information about the Distutils-SIG mailing list