[Catalog-sig] Finalising PEP-345 - Requires-Python
david.lyon at preisshare.net
Thu Dec 31 02:23:42 CET 2009
> This field specifies the Python version(s) that the package is
> guaranteed to be compatible with.
> Version numbers must be in the format specified in Version Specifiers.
> Requires-Python: 2.5
> Requires-Python: >2.1
> Requires-Python: >=2.3.4
> Requires-Python: >=2.5,<2.7
I think most untrained readers, would find the ">=2.5,<2.7" notation
to be non-obvious and ambiguous.
The shortest known method to express the condition is
Most importantly, specifying a logical 'AND' operation with a comma is
obscure and verbose. We don't find any prior examples in any programming
language that I know of where comma's are used to denote a logical
What it seems to imply is that there is a pipeline of logical
expressions built into a comma seperated list. That must be
parsed, and if all are true, then the condition is accepted.
I think it would take me some time if I had to explain this proposed
solution to a computer sciences teacher in an exam situation. I
don't think I'd be so confident of getting a pass.
It would be way more logical to do the and operation by
specifying multiple conditions.
As there is an implication that the file will be parsed
sequentially, and every conditional line needs to process
with a true result.
Still, the shortest known way is "Requires-Python: 2.5:2.7"
More information about the Catalog-SIG