On July 2, 2015 at 10:34:35 AM, Nick Coghlan (ncogh...@gmail.com) wrote: > On 2 July 2015 at 01:37, Donald Stufft wrote: > > On July 1, 2015 at 12:33:29 AM, Nick Coghlan (ncogh...@gmail.com) wrote: > >> From a "how to fix it?" perspective, I think it makes sense to say > >> that any marker ending in "_version" is compared using PEP 440 version > >> ordering semantics rather than lexical ordering > >> > >> My rationale for that is: > >> > >> 1. In the simple X.Y.Z cases, lexical string comparisons and PEP 440 > >> give the same answer > >> 2. In the more complex cases (like 2.7.10), PEP 440 gives the right > >> answer, while lexical string comparison fails > >> 3. Anything handling environment markers already needs to be able to > >> handle PEP 440 semantics anyway > > > > Also agreed. Perhaps the ``_version`` markers should just support the > > full range of specifiers in PEP 440. > > That's what I was thinking. The one slight difference is that I don't > believe we'd want any special case handling of pre-releases in > environment markers - if I have a Python alpha installed, I'd want it > treated as equivalent to the corresponding final release, since > constraint checking isn't the same as choosing the "best" version for > download/installation. > >
Well, even in the case for dependencies we say that a pre-release should be accepted if it’s installed which would be in that vein IMO. I agree that it’d be useful to call that out explicitly though. --- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig