[Distutils] Finishing PEP 345
"Martin v. Löwis"
martin at v.loewis.de
Fri Dec 25 23:28:17 CET 2009
> Ok maybe that would be the solution indeed: if we add a ~= symbol
> that compares ranges, we could make it the default operator. e.g.:
> Requires-Python: 3.1
> would mean
> Requires-Python: ~=3.1
> wich would be equal to:
> Requires-Python: >=3.1,<3.2
> Then == would compare precise versions.
> How does that sounds ?
Maybe it's bike-shedding, but yes, I would like to have a separate
operator for this range matching. So it would be fine with me.
>> Where is that specified? I can't find it in the PEP.
> It is not specified like this, but the examples in PEP 386 indicates
> that b4 is a marker for a beta pre-release. And that "a" , "b" , "c"
> are post-release markers.
I agree that PEP 386 specifies sufficiently that 3.6b4 < 3.6. However,
I was wondering where it is specified that your == operator is
equivalent to a range starting at the value. If it was "wildcard
matching" (which I assume it was), I would have expect that "==3.6"
means "matches 3\.6.*" (in re syntax), so 3.6b4 would match.
> Yes. That's quite a problem. I am wondering if we should introduce
> a specific operator to include/exclude pre and post releases.
> The use case I can see would be to be able :
> - to exclude pre-releases and post-releases (defaut behaviour)
> - to include one of them, or both
It may be useful, but I would wait for user demand. In the end, if
you install a prerelease, and then find that something breaks, it's
really "your fault".
More information about the Distutils-SIG