File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ document we limit the acceptable values for identifiers to that regex. A full
142142redefinition of name may take place in a future metadata PEP. The regex (run
143143with 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
531534References
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ underscore and hyphen. It must start and end with a letter or number.
1717This means that valid project names are limited to those which match the
1818following 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)
You can’t perform that action at this time.
0 commit comments