[Distutils] PEP440: foo-X.Y.Z does not satisfy "foo>X.Y"?
donald at stufft.io
Mon Dec 22 21:47:17 CET 2014
> On Dec 22, 2014, at 3:43 PM, Paul Moore <p.f.moore at gmail.com> wrote:
> 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?.
You won’t get 8.0.dev1 with a == operation. You would get it with <=8
and of course you’d get it with a >7 if 8.0.dev1 was the newest available.
PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
More information about the Distutils-SIG