[Python-Dev] Proposing PEP 345 : Metadata for Python Software Packages 1.2
Stephen J. Turnbull
stephen at xemacs.org
Mon Dec 28 04:17:55 CET 2009
Ben Finney writes:
> Instead, the default should be `=='. That is, `Requires-Python: 3'
> should be equivalent to `Requires-Python: ==3'; and only "3" or "3.0" or
> "3.0.0" etc. will match. I maintain that is what most people will expect
> on seeing that syntax.
I really don't think your assessment that a majority agrees with you
is warranted. The demand for backward compatibility is so strong that
(wearing my maintainer hat, in other projects) I actually assume that
in compatibility claims a bare version number like 3 means >= 3.0.0 to
my listeners, unless explicitly qualified.
Therefore, I think there should be no default. "Explicit is better
And IMO the choice of "~=" or "=~" for the range match should be
avoided, since that looks like the regexp search operator in Perl, and
there "~= 3" would match "3", "3.0.4", and "2.3.5". The next obvious
interpretation is "fuzzy match", but that doesn't have an obvious,
more specific meaning. The usual comparson operators do have pretty
obvious interpretations, and are not hard to use.
More information about the Python-Dev