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
142
142
redefinition of name may take place in a future metadata PEP. The regex (run
143
143
with re.IGNORECASE) is::
144
144
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
146
146
147
147
.. _dependency-specifiers-extras :
148
148
@@ -526,6 +526,9 @@ History
526
526
in use since late 2022.
527
527
- April 2025: Added ``extras `` and ``dependency_groups `` for
528
528
: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)
529
532
530
533
531
534
References
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.
17
17
This means that valid project names are limited to those which match the
18
18
following regex (run with :py:data: `re.IGNORECASE `)::
19
19
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
21
21
22
22
23
23
.. _name-normalization :
@@ -53,3 +53,6 @@ History
53
53
:pep: `503 <503#normalized-names >`.
54
54
- November 2015: The specification of valid names was approved through
55
55
: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