>>> And I will not care much about the micro version in that case, since >>> Python will not change its syntax/API in a micro release. >> I think that's a mistake. Specifying "2.6" is equivalent to specifying >> "==2.6". With your proposed meaning of "==", either == is not >> transitive, or all versions compare equal. As 2.6==2.6.1 and 2.6==2.6.2, >> we get (with transitive ==), 2.6.1==2.6.2. >> >> Furthermore, if the same wildcarding applies to major versions as well, >> i.e. >> >> Requires-Python: 3 >> >> means any 3.x, then we have 3==3.1, 3==3.2, 3.1==3.1.3, 3.2==3.2.4, >> and, transitively, 3.1.3==3.2.4. This is undesirable. > > Why this is undesirable ?
I find it undesirable if 3.1.3==3.2.4. Then, if I specify Requires-Python: 3.1.3 and I have 3.2.4 installed, it would accept that (because the version numbers are "equal", i.e. "=="). > I find it highly desirable for developers that don't want to > bother with Python version details, while it will let other developers > give precise versions if they need. That is desirable, indeed. However, it is also possible without == performing some wildcard matching: Requires-Python: >=2.5,<2.6 will also specify that 2.5.x is required. > You'll have to convince me otherwise by explaining why it's a mistake > to apply wildcarding when the full version is not provided. See above: is == transitive or not? I think it is counter-intuitive if the == operator on versions does anything else than comparing version strings for string equality. If you think that a range matching operator is needed, perhaps a different symbol could be used (such as ~=)? >>> 3.6 would include all 3.6.x releases as well. So 3.6b4 is excluded >>> since it does not belong to the 3.6 series, but 3.6.1b4 is included. >> Please define "belongs to the 3.6 series". In PEP 386 terminology, >> I would expect that this means "the 'version' part is 3.6", so >> 3.6b4 *does* belong to the 3.6 series. > > Sorry, here's the definition I've put behind the word belong: > > A version belongs to the 3.6 series if : 3.6 <= VERSION < 3.7 > > 3.6b4 is the fourth beta release, so : > > 3.6b4 < 3.6 <= VERSION < 3.7 > > So obviously, if the developer ask for 3.6, he doesn't want a preview of that > version, he wants that version Where is that specified? I can't find it in the PEP. If you really want this == operator, please add a Discussion section to the PEP discussing that there was objection to this operator, proposing that it should do string== instead, and that this specific semantics was chosen because <insert reason>. Regards, Martin P.S. I notice that your == definition and my explicit rewrite of it have the same flaw: in your example, "3.7b1" would also match a version specification of "3.6". I.e. prereleases of the next releases still fall into the previous range. _______________________________________________ Distutils-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/distutils-sig
