Description
As discussed in the December 2022 Python Docs Community meeting, it seems like it would be a good idea to have a straightforward checklist concisely listing what needs to happen when a new PEP is added, when a PEP is approved/rejected, and when it is marked Final. This way, it is clear to both PEP authors and editors exactly the steps needed, both so they get applied consistently and they avoid having to dig through PEP 1, 12, the template, the devguide, the readme/contributing guide, and/or old PRs to figure out exactly what they need to do.
First, we should make sure we're clear on what we want in the checklist, and then we should decide how best to make them easily accessible (and ideally, checkable) to authors (and PEP editors). Therefore, for starters, I propose the following content (based on the relevant sections in PEP 1, PEP 12 and elsewhere):
Proposed content
Adding a new PEP
Adding a new PEP checklist
- File created from the latest PEP template
Content requirements
- PEP topic discussed in a suitable venue and general agreement that a PEP is appropriate
- Content is reasonably sound, complete and makes at least basic technical sense
- Abstract and Copyright sections completed, with the required wording in the latter
- Suggested sections included (unless not applicable)
- Title clearly, accurately and concisely describes the content
- Prose is intelligible and generally free of basic grammar and syntax errors, at least to the degree they significantly detract from understanding
- Code is in code blocks, well-formatted (PEP 7/PEP 8) and has the right lexer name if non-Python (or
text
) - Any project stated in the PEP as supporting/endorsing benefiting from it confirms such
Technical requirements
- Filename in the correct format (
pep-NNNN.rst
) -
PEP
,Title
,Author
,Status
(Draft
),Type
andCreated
headers filled out correctly -
PEP-Delegate
,Requires
,Python-Version
andReplaces
filled out if appropriate -
Sponsor
listed and approves if not authored by a core dev or PEP editor - PEP builds with no warnings, CI checks pass and content displays as intended in the rendered preview
- PEP number assigned by the PEP editors and filename &
PEP
header updated accordingly - Sponsor/author(s) that are core devs/PEP editors added to
.github/CODEOWNERS
for the PEP - Right before or after initial merging, PEP discussion thread created and linked to in
Discussions-To
andPost-History
Accepting/rejecting a PEP:
Accepting/rejecting a PEP checklist
- SC/PEP Delegate has formally accepted/rejected the PEP and posted to the
Discussions-To
thread -
Status
changed toAccepted
-
Resolution
link points directly to SC/PEP Delegate formal acceptance/rejected post -
Discussions-To
,Post-History` and
Python-Version`` complete and up to date
Marking a PEP Final
Marking a PEP Final checklist
- Specification has been implemented in a released stable CPython version
(or third-party tools, for packaging/typing topic PEPs) -
Status
changed toFinal
- Canonical docs/spec moved to an appropriate place, and linked with a
canonical-doc
directive - PEP headers and content updated with any substantial changes during the implementation phase
Where to put the checklist
Ideally, it is most visible and easy to find for all involved if its right in the relevant PR body template as opposed to having to manually dig through PEP 1, PEP 12, the Readme, the Contributing Guide or the devguide, and allows the author, reviewers and PEP editors to actually check things off as they are completed/confirmed, allowing everyone keep track of what's done and what's needed.
The one obstacle is while GitHub supports multiple templates, but but there's no actual "chooser" UI yet for it like for issues—the template name has to be manually input via a query parameter in the new PR URL.
We could add put each checklist into a separate sub-template and then expose links to each with the appropriate query param set, which would avoid belaboring the main template with them. However, we run into the issue that both new authors and old hands alike are unlikely to find these links if we bury them in one of the existing places, as newer/occasional contributors may not know where (or remember to) look where to find them, and more experienced ones are unlikely to know something has changed, and either way just create the PR via the normal, expected way. We could also put a big reminder in the default PEP template, but it still could be easily missed, whether by a new contributor not knowing what to do, or a veteran one not bothering to look. Either way, it defeats a lot of the benefit of the checklist if it isn't easy to use by default and is used consistently.
Instead, what I'd suggest is having each checklist as subsections in the default PR template, and tell the user to just delete the checklists that aren't relevant (or all of them, with a Ctrl-A
Del
), as its a lot less work to delete sections (or all of it) then go find the right checklist and then copy and paste it in. Then, in case they do miss it, they'll see it when they submit so they'll know for the future, and either they or we can easily delete the not-relevant ones from their PR. I'm not sure what else would be that effective since it'll be too easy to miss otherwise, considering how many experienced devs don't use the actual PEP template (as opposed to copying an old outdated PEP, or just winging it), read the PR template admonition about prefixing their PR titles with the PEP number, etc. If and when GitHub added a PR chooser, we could switch to using that once implemented.