Skip to content

Commit 68d6ded

Browse files
authored
Merge branch 'main' into pep824-coalescing-operators
2 parents 0351b5c + 82acded commit 68d6ded

34 files changed

+7616
-367
lines changed

.github/CODEOWNERS

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ peps/pep-0020.rst @tim-one
5050
peps/pep-0042.rst @jeremyhylton
5151
# ...
5252
peps/pep-0100.rst @malemburg
53-
peps/pep-0101.rst @hugovk @Yhg1s @pablogsal @ambv @ned-deily
53+
peps/pep-0101.rst @savannahostrowski @hugovk @Yhg1s @pablogsal @ambv @ned-deily
5454
peps/pep-0102.rst @warsaw @gvanrossum
5555
# peps/pep-0103.rst
5656
# ...
@@ -656,7 +656,6 @@ peps/pep-0775.rst @encukou
656656
peps/pep-0776.rst @hoodmane @ambv
657657
peps/pep-0777.rst @warsaw @emmatyping
658658
peps/pep-0778.rst @warsaw @emmatyping
659-
# ...
660659
peps/pep-0779.rst @Yhg1s @colesbury @mpage
661660
peps/pep-0780.rst @lysnikolaou
662661
peps/pep-0781.rst @methane
@@ -688,18 +687,22 @@ peps/pep-0808.rst @FFY00
688687
peps/pep-0809.rst @zooba
689688
peps/pep-0810.rst @pablogsal @DinoV @Yhg1s
690689
peps/pep-0811.rst @sethmlarson @gpshead
691-
# ...
690+
peps/pep-0813.rst @warsaw @ericvsmith
692691
peps/pep-0814.rst @vstinner @corona10
693692
peps/pep-0815.rst @emmatyping
694693
peps/pep-0816.rst @brettcannon
695694
peps/pep-0817.rst @warsaw @dstufft
696695
peps/pep-0817/ @warsaw @dstufft
697-
# ...
696+
peps/pep-0818.rst @hoodmane @ambv
698697
peps/pep-0819.rst @emmatyping
699698
peps/pep-0820.rst @encukou
700699
peps/pep-0821.rst @JelleZijlstra
701700
peps/pep-0822.rst @methane
701+
# ...
702702
peps/pep-0824.rst @gvanrossum
703+
peps/pep-0825.rst @warsaw @dstufft
704+
peps/pep-0826.rst @savannahostrowski
705+
peps/pep-0827.rst @1st1
703706
# ...
704707
peps/pep-2026.rst @hugovk
705708
# ...

.github/PULL_REQUEST_TEMPLATE/Add a new PEP.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,17 @@ If your PEP is not Standards Track, remove the corresponding section.
2929
* [ ] PEP topic [discussed in a suitable venue](https://peps.python.org/pep-0001/#start-with-an-idea-for-python) with general agreement that a PEP is appropriate
3030
* [ ] [Suggested sections](https://peps.python.org/pep-0012/#suggested-sections) included (unless not applicable)
3131
* [ ] Motivation
32-
* [ ] Rationale
3332
* [ ] Specification
33+
* [ ] Rationale
3434
* [ ] Backwards Compatibility
3535
* [ ] Security Implications
3636
* [ ] How to Teach This
3737
* [ ] Reference Implementation
3838
* [ ] Rejected Ideas
3939
* [ ] Open Issues
40+
* [ ] Acknowledgements
41+
* [ ] Footnotes
42+
* [ ] Change History
4043
* [ ] ``Python-Version`` set to valid (pre-beta) future Python version, if relevant
4144
* [ ] Any project stated in the PEP as supporting/endorsing/benefiting from the PEP formally confirmed such
4245
* [ ] Right before or after initial merging, [PEP discussion thread](https://peps.python.org/pep-0001/#discussing-a-pep) created and linked to in ``Discussions-To`` and ``Post-History``

pep_sphinx_extensions/pep_theme/static/style.css

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ div.table-wrapper {
236236
table {
237237
width: 100%;
238238
border-collapse: collapse;
239-
border: 1px solid var(--colour-background-accent-strong);
240239
}
241240
table caption {
242241
margin: 1rem 0 .75rem;
@@ -245,22 +244,16 @@ table thead tr {
245244
background-color: var(--colour-background-accent-medium);
246245
color: var(--colour-text-strong);
247246
}
248-
table tbody tr {
249-
border-top: 1px solid var(--colour-background-accent-strong);
250-
}
251247
table th,
252248
table td {
253249
text-align: left;
254250
padding: 0.25rem 0.5rem 0.2rem;
251+
border: 1px solid var(--colour-background-accent-strong);
255252
}
256253
table.pep-zero-table tr td:nth-child(1),
257254
table.pep-zero-table tr td:nth-child(2) {
258255
white-space: nowrap;
259256
}
260-
table th + th,
261-
table td + td {
262-
border-left: 1px solid var(--colour-background-accent-strong);
263-
}
264257
/* Common column widths for PEP status tables */
265258
table.pep-zero-table tr td:nth-child(1) {
266259
width: 5%;

pep_sphinx_extensions/pep_zero_generator/writer.py

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -331,36 +331,25 @@ def _classify_peps(peps: list[PEP]) -> tuple[list[PEP], ...]:
331331

332332

333333
def _verify_email_addresses(peps: list[PEP]) -> dict[str, str]:
334-
authors_dict: dict[str, set[str]] = {}
334+
authors_dict: dict[str, list[str]] = {}
335335
for pep in peps:
336336
for author in pep.authors:
337337
# If this is the first time we have come across an author, add them.
338338
if author.full_name not in authors_dict:
339-
authors_dict[author.full_name] = set()
339+
authors_dict[author.full_name] = []
340340

341341
# If the new email is an empty string, move on.
342342
if not author.email:
343343
continue
344344
# If the email has not been seen, add it to the list.
345-
authors_dict[author.full_name].add(author.email)
346-
347-
valid_authors_dict: dict[str, str] = {}
348-
too_many_emails: list[tuple[str, set[str]]] = []
349-
for full_name, emails in authors_dict.items():
350-
if len(emails) > 1:
351-
too_many_emails.append((full_name, emails))
352-
else:
353-
valid_authors_dict[full_name] = next(iter(emails), "")
354-
if too_many_emails:
355-
err_output = []
356-
for author, emails in too_many_emails:
357-
err_output.append(" " * 4 + f"{author}: {emails}")
358-
raise ValueError(
359-
"some authors have more than one email address listed:\n"
360-
+ "\n".join(err_output)
361-
)
362-
363-
return valid_authors_dict
345+
emails = authors_dict[author.full_name]
346+
if author.email not in emails:
347+
emails.append(author.email)
348+
349+
# Combine multiple email addresses with commas. Since peps is
350+
# sorted by PEP number, this should produce a deterministic
351+
# output.
352+
return {name: ', '.join(emails) for name, emails in authors_dict.items()}
364353

365354

366355
def _sort_authors(authors_dict: dict[str, str]) -> list[str]:

pep_sphinx_extensions/tests/pep_zero_generator/test_writer.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,23 @@ def test_verify_email_addresses(test_input, expected):
5656
assert out == expected
5757

5858

59+
def test_verify_email_addresses_multiple_emails():
60+
# Arrange
61+
peps = [
62+
parser.PEP(Path("pep_sphinx_extensions/tests/peps/pep-9000.rst")),
63+
parser.PEP(Path("pep_sphinx_extensions/tests/peps/pep-9003.rst")),
64+
]
65+
66+
# Act
67+
out = writer._verify_email_addresses(peps)
68+
69+
# Assert: Francis has two emails combined, Javier's single email is not duplicated
70+
assert out == {
71+
"Francis Fussyreverend": "one@example.com, different@example.com",
72+
"Javier Soulfulcommodore": "two@example.com",
73+
}
74+
75+
5976
def test_sort_authors():
6077
# Arrange
6178
authors_dict = {
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
PEP: 9003
2+
Title: Test with author using a different email than in PEP 9000
3+
Author: Francis Fussyreverend <different@example.com>,
4+
Javier Soulfulcommodore <two@example.com>
5+
Created: 20-Apr-2022
6+
Status: Draft
7+
Type: Process

peps/pep-0001.rst

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,13 @@ Each PEP should have the following parts/sections:
509509
projects in the Python ecosystem. PEP submissions without
510510
sufficient motivation may be rejected.
511511

512-
4. Rationale -- The rationale fleshes out the specification by
512+
4. Specification -- The technical specification should describe the
513+
syntax and semantics of any new language feature. The
514+
specification should be detailed enough to allow competing,
515+
interoperable implementations for at least the current major Python
516+
platforms (CPython, Jython, IronPython, PyPy).
517+
518+
5. Rationale -- The rationale fleshes out the specification by
513519
describing why particular design decisions were made. It should
514520
describe alternate designs that were considered and related work,
515521
e.g. how the feature is supported in other languages.
@@ -518,12 +524,6 @@ Each PEP should have the following parts/sections:
518524
community and discuss important objections or concerns raised
519525
during discussion.
520526

521-
5. Specification -- The technical specification should describe the
522-
syntax and semantics of any new language feature. The
523-
specification should be detailed enough to allow competing,
524-
interoperable implementations for at least the current major Python
525-
platforms (CPython, Jython, IronPython, PyPy).
526-
527527
6. Backwards Compatibility -- All PEPs that introduce backwards
528528
incompatibilities must include a section describing these
529529
incompatibilities and their severity. The PEP must explain how the
@@ -581,7 +581,18 @@ Each PEP should have the following parts/sections:
581581
13. Footnotes -- A collection of footnotes cited in the PEP, and
582582
a place to list non-inline hyperlink targets.
583583

584-
14. Copyright/license -- Each new PEP must be placed under a dual license of
584+
Change History -- A summary of major changes the PEP has undergone, based on
585+
discussions and feedback. Think of this as a "changelog" or "release notes"
586+
for the PEP. In general, whenever you update the ``Post-History`` header
587+
for major changes, add a new bullet item in newest-first (i.e. reverse
588+
chronological) order, using the same ``DD-MMM-YYYY`` format, with
589+
sub-bullets summarizing the changes. You can consider linking this to the
590+
same link as the ``Post-History`` link. This isn't mandatory, so it's left
591+
to the PEP author's discretion, but such a section can be helpful for those
592+
following along to understand the evolution of your PEP. Here is :pep:`an
593+
example <694#change-history>`.
594+
595+
15. Copyright/license -- Each new PEP must be placed under a dual license of
585596
public domain and CC0-1.0-Universal_ (see this PEP for an example).
586597

587598

@@ -876,6 +887,14 @@ Footnotes
876887
.. _Contributing Guide: https://github.com/python/peps/blob/main/CONTRIBUTING.rst
877888

878889

890+
Change History
891+
==============
892+
893+
* 2026-02-02
894+
895+
* Added an optional ``Change History`` section for PEPs, for summarizing changes when updating the
896+
``Post-History`` header.
897+
879898
Copyright
880899
=========
881900

peps/pep-0012.rst

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Status: Active
77
Type: Process
88
Created: 05-Aug-2002
99
Post-History: `30-Aug-2002 <https://mail.python.org/archives/list/python-dev@python.org/thread/KX3AS7QAY26QH3WIUAEOCCNXQ4V2TGGV/>`__
10+
`22-Feb-2026 <https://discuss.python.org/t/small-but-useful-change-to-pep-1-12/106250>`__
11+
1012

1113

1214
.. highlight:: rst
@@ -32,13 +34,17 @@ The source for this (or any) PEP can be found in the
3234
as well as via a link at the bottom of each PEP.
3335

3436

35-
Rationale
36-
=========
37+
Specification
38+
=============
3739

3840
If you intend to submit a PEP, you MUST use this template, in
3941
conjunction with the format guidelines below, to ensure that your PEP
4042
submission won't get automatically rejected because of form.
4143

44+
45+
Rationale
46+
=========
47+
4248
ReStructuredText provides PEP authors with useful functionality and
4349
expressivity, while maintaining easy readability in the source text.
4450
The processed HTML form makes the functionality accessible to readers:
@@ -100,8 +106,8 @@ directions below.
100106
feature is described in a Final PEP.
101107

102108
- Change the Created header to today's date. Be sure to follow the
103-
format carefully: it must be in ``dd-mmm-yyyy`` format, where the
104-
``mmm`` is the 3 English letter month abbreviation, i.e. one of Jan,
109+
format carefully: it must be in ``DD-MMM-YYYY`` format, where the
110+
``MMM`` is the three-letter English month abbreviation, i.e. one of Jan,
105111
Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec.
106112

107113
- For Standards Track PEPs, after the Created header, add a
@@ -122,7 +128,7 @@ directions below.
122128
- Post-History can be 'Pending' for now; you'll add dates and corresponding links
123129
to this header each time you post your PEP to the designated discussion forum
124130
(and update the Discussions-To header with said link, as above).
125-
For each thread, use the date (in the ``dd-mmm-yyy`` format) as the
131+
For each thread, use the date (in the ``DD-MMM-YYYY`` format) as the
126132
linked text, and insert the URLs inline as anonymous reST `hyperlinks`_,
127133
with commas in between each posting.
128134

@@ -795,6 +801,16 @@ resources don't address, ping ``@python/pep-editors`` on GitHub, open an
795801
or reach out to a PEP editor directly.
796802

797803

804+
Change History
805+
==============
806+
807+
* `22-Feb-2026 <https://discuss.python.org/t/small-but-useful-change-to-pep-1-12/106250>`_
808+
809+
* Suggest a new section, headed ``Change History`` to the PEP template, and
810+
add that section to this PEP.
811+
* The ``Rationale`` section now comes after the ``Specification`` section.
812+
813+
798814
Copyright
799815
=========
800816

peps/pep-0012/pep-NNNN.rst

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,18 @@ Motivation
2828
[Clearly explain why the existing language specification is inadequate to address the problem that the PEP solves.]
2929

3030

31-
Rationale
32-
=========
33-
34-
[Describe why particular design decisions were made.]
35-
36-
3731
Specification
3832
=============
3933

4034
[Describe the syntax and semantics of any new language feature.]
4135

4236

37+
Rationale
38+
=========
39+
40+
[Describe why particular design decisions were made.]
41+
42+
4343
Backwards Compatibility
4444
=======================
4545

@@ -88,6 +88,16 @@ Footnotes
8888
[A collection of footnotes cited in the PEP, and a place to list non-inline hyperlink targets.]
8989

9090

91+
Change History
92+
==============
93+
94+
[A summary of major changes the PEP has undergone. Whenever you update the
95+
``Post-History``, add a new bullet item in newest-first (i.e. reverse
96+
chronological) order, using the same ``DD-MMM-YYYY`` format, with sub-bullets
97+
summarizing the changes. You can use the same link for the date bullet as you
98+
do in the ``Post-History`` addition.]
99+
100+
91101
Copyright
92102
=========
93103

peps/pep-0101.rst

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ release. The roles and their current experts are:
127127

128128
* RM = Release Manager
129129

130+
- Savannah Ostrowski <savannah@python.org> (US)
130131
- Hugo van Kemenade <hugo@python.org> (FI)
131132
- Thomas Wouters <thomas@python.org> (NL)
132133
- Pablo Galindo Salgado <pablogsal@python.org> (UK)
133-
- Łukasz Langa <lukasz@python.org> (PL)
134134

135135
* WE = Windows - Steve Dower <steve.dower@python.org>
136136
* ME = Mac - Ned Deily <nad@python.org> (US)
@@ -157,8 +157,8 @@ As much as possible, the release is automated and guided by the
157157
`python/release-tools`_. This helps by automating many of the following steps,
158158
and guides you to perform some manual steps.
159159

160-
- Log into Discord and join the Python Core Devs server. Ask Thomas
161-
or Łukasz for an invite.
160+
- Log into Discord and join the Python Core Devs server. Ask another
161+
RM for an invite.
162162

163163
You probably need to coordinate with other people around the world.
164164
This communication channel is where we've arranged to meet.
@@ -330,8 +330,6 @@ and guides you to perform some manual steps.
330330
- Compile all variants of binaries (32-bit, 64-bit, debug/release),
331331
including running profile-guided optimization.
332332

333-
- Compile the HTML Help file containing the Python documentation.
334-
335333
- Codesign all the binaries with the PSF's certificate.
336334

337335
- Create packages for python.org, nuget.org, the embeddable distro and
@@ -740,20 +738,6 @@ else does them. Some of those tasks include:
740738

741739
git push upstream --delete 3.3 # or perform from GitHub Settings page
742740

743-
- Remove the release from the list of "Active Python Releases" on the Downloads
744-
page. To do this, `log in to the admin page <https://www.python.org/admin>`__
745-
for python.org, navigate to Boxes,
746-
and edit the ``downloads-active-releases`` entry. Strip out the relevant
747-
paragraph of HTML for your release. (You'll probably have to do the ``curl -X PURGE``
748-
trick to purge the cache if you want to confirm you made the change correctly.)
749-
750-
- Add a retired notice to each release page on python.org for the retired branch.
751-
For example:
752-
753-
* https://www.python.org/downloads/release/python-337/
754-
755-
* https://www.python.org/downloads/release/python-336/
756-
757741
- In python-releases.toml_, set the branch status to end-of-life.
758742

759743
- Update or remove references to the branch in the `developer's guide

0 commit comments

Comments
 (0)