Minor wording changes for PEP 685 (#2448)
This commit is contained in:
parent
df2f79cd0b
commit
b9f57b9c2d
10
pep-0685.rst
10
pep-0685.rst
|
@ -27,7 +27,7 @@ The `Provides-Extra`_ core metadata specification states that an extra's
|
|||
name "must be a valid Python identifier".
|
||||
:pep:`508` specifies that the value of an ``extra`` marker may contain a
|
||||
letter, digit, or any one of ``.``, ``-``, or ``_`` after the initial character.
|
||||
Otherwise, there is no other `PyPA specification
|
||||
There is no other `PyPA specification
|
||||
<https://packaging.python.org/en/latest/specifications/>`_
|
||||
which outlines how extra names should be written or normalized for comparison.
|
||||
Due to the amount of packaging-related code in existence,
|
||||
|
@ -60,7 +60,7 @@ via::
|
|||
re.sub(r'[^A-Za-z0-9-.]+', '_', name).lower()
|
||||
|
||||
The use of an underscore/``_`` differs from PEP 503's use of a hyphen/``-``,
|
||||
and it also normalizes characters outside of those allowed by :pep`508`.
|
||||
and it also normalizes characters outside of those allowed by :pep:`508`.
|
||||
Runs of ``.`` and ``-``, unlike PEP 503, do **not** get normalized to one ``_``,
|
||||
e.g. ``..`` stays the same. To note, this is inconsistent with this function's
|
||||
docstring, which *does* specify that all non-alphanumeric characters
|
||||
|
@ -96,10 +96,10 @@ Tools generating metadata MUST raise an error if a user specified
|
|||
two or more extra names which would normalize to the same name.
|
||||
Tools generating metadata MUST raise an error if an invalid extra
|
||||
name is provided as appropriate for the specified core metadata version.
|
||||
If an older core metadata version is specified and the name would be
|
||||
If a project's metadata specifies an older core metadata version and the name would be
|
||||
invalid with newer core metadata versions,
|
||||
tools SHOULD warn the user.
|
||||
Tools SHOULD warn users when an invalid extra name is read and SHOULD not use
|
||||
tools reading that metadata SHOULD warn the user.
|
||||
Tools SHOULD warn users when an invalid extra name is read and SHOULD ignore
|
||||
the name to avoid ambiguity.
|
||||
Tools MAY raise an error instead of a warning when reading an
|
||||
invalid name, if they so desire.
|
||||
|
|
Loading…
Reference in New Issue