[Distutils] markers, <= and python 2.7.10
Nick Coghlan
ncoghlan at gmail.com
Thu Jul 2 16:34:32 CEST 2015
On 2 July 2015 at 01:37, Donald Stufft <donald at stufft.io> wrote:
> On July 1, 2015 at 12:33:29 AM, Nick Coghlan (ncoghlan at 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.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Distutils-SIG
mailing list