Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion source/specifications/dependency-specifiers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ document we limit the acceptable values for identifiers to that regex. A full
redefinition of name may take place in a future metadata PEP. The regex (run
with re.IGNORECASE) is::

^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$
^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])\Z

.. _dependency-specifiers-extras:

Expand Down Expand Up @@ -526,6 +526,9 @@ History
in use since late 2022.
- April 2025: Added ``extras`` and ``dependency_groups`` for
:ref:`lock-file-spec` as approved through :pep:`751`.
- August 2025: The suggested name validation regex was fixed to match the field
specification (it previously finished with ``$`` instead of ``\Z``,
incorrectly permitting trailing newlines)


References
Expand Down
5 changes: 4 additions & 1 deletion source/specifications/name-normalization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ underscore and hyphen. It must start and end with a letter or number.
This means that valid project names are limited to those which match the
following regex (run with :py:data:`re.IGNORECASE`)::

^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$
^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])\Z
Comment thread
di marked this conversation as resolved.


.. _name-normalization:
Expand Down Expand Up @@ -53,3 +53,6 @@ History
:pep:`503 <503#normalized-names>`.
- November 2015: The specification of valid names was approved through
:pep:`508 <508#names>`.
- August 2025: The suggested name validation regex was fixed to match the field
specification (it previously finished with ``$`` instead of ``\Z``,
incorrectly permitting trailing newlines)