[Distutils] PEP440: foo-X.Y.Z does not satisfy "foo>X.Y"?
p.f.moore at gmail.com
Mon Dec 22 21:31:44 CET 2014
On 22 December 2014 at 20:20, Marcus Smith <qwcode at gmail.com> wrote:
> In PEP440, foo-X.Y.Z does not satisfy the specifier "foo>X.Y" (although it
> satisfies "foo>=X.Y")
> for example, foo-1.7.2 will not satisfy "foo>1.7", but it will satisfy
> for '>' and '<', PEP440 states that they are "interpreted as implying the
> prefix based version exclusion clause != V.*"
> the rationale from Donald for this is explained here:
> in brief, this was done to avoid pre-releases (i.e. something like
> "foo-1.7a1") satisfying "foo<1.7".
> It seems to me we've just traded one confusion for another, and this seems
> worse (to me at least, although I'm trying to let it sink in)
> 1.7.2 is greater than 1.7, and the specifiers should honor that. It's hard
> to accept otherwise.
> Yes, it's true in the past, when people would get a pre-release installed
> (for example 1.7a1), when they really wanted something in the 1.6.X series,
> that was also confusing. But now that pip now excludes pre-releases by
> default, it seems that confusion is mostly solved practically speaking, so
> why solve it (and create a new confusion)?
Hmm, yes, I'd have to say that sounds like a recipe for bug reports.
+1 for updating PEP 440 (and pip) so that 1.7.2 is > 1.7. Maybe add a
note to PEP 440 that installers SHOULD exclude pre-releases by default
(with a note mentioning the 1.7a1 < 1.7 case as the justification).
More information about the Distutils-SIG