Skip to content

Commit 6810293

Browse files
Merge branch 'main' into translation/source
2 parents 79f5d4c + 4cfc8b9 commit 6810293

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

source/specifications/dependency-specifiers.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ document we limit the acceptable values for identifiers to that regex. A full
142142
redefinition of name may take place in a future metadata PEP. The regex (run
143143
with re.IGNORECASE) is::
144144

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

147147
.. _dependency-specifiers-extras:
148148

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

530533

531534
References

source/specifications/name-normalization.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ underscore and hyphen. It must start and end with a letter or number.
1717
This means that valid project names are limited to those which match the
1818
following regex (run with :py:data:`re.IGNORECASE`)::
1919

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

2222

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

0 commit comments

Comments
 (0)