PEP 566: Support for direct references and permit public index to add restrictions (#783)

This commit is contained in:
Pradyun Gedam 2018-09-22 02:59:50 +05:30 committed by Brett Cannon
parent c90bd94a51
commit bde4ef1f98
1 changed files with 5 additions and 2 deletions

View File

@ -93,13 +93,16 @@ Version Specifiers
================== ==================
Version numbering requirements and the semantics for specifying comparisons Version numbering requirements and the semantics for specifying comparisons
between versions are defined in PEP 440. between versions are defined in :pep:`440`. Direct references as defined in
:pep:`440` are also permitted as an alternative to version specifiers.
Following :pep:`508`, version specifiers no longer need to be surrounded by Following :pep:`508`, version specifiers no longer need to be surrounded by
parentheses in the fields Requires-Dist, Provides-Dist, Obsoletes-Dist or parentheses in the fields Requires-Dist, Provides-Dist, Obsoletes-Dist or
Requires-External, so e.g. ``requests >= 2.8.1`` is now a valid value. Requires-External, so e.g. ``requests >= 2.8.1`` is now a valid value.
The recommended format is without parentheses, but tools parsing metadata should The recommended format is without parentheses, but tools parsing metadata should
also be able to handle version specifiers in parentheses. also be able to handle version specifiers in parentheses. Further, public index
servers MAY prohibit strict version matching clauses or direct references in
these fields.
Usage of version specifiers is otherwise unchanged from PEP 345. Usage of version specifiers is otherwise unchanged from PEP 345.