Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Mar 27, 2025

Basic requirements (all PEP Types)

  • Read and followed PEP 1 & PEP 12
  • File created from the latest PEP template
  • PEP has next available number, & set in filename (pep-NNNN.rst), PR title (PEP 123: <Title of PEP>) and PEP header
  • Title clearly, accurately and concisely describes the content in 79 characters or less
  • Core dev/PEP editor listed as Author or Sponsor, and formally confirmed their approval
  • Author, Status (Draft), Type and Created headers filled out correctly
  • PEP-Delegate, Topic, Requires and Replaces headers completed if appropriate
  • Required sections included
    • Abstract (first section)
    • Copyright (last section; exact wording from template required)
  • Code is well-formatted (PEP 7/PEP 8) and is in code blocks, with the right lexer names if non-Python
  • PEP builds with no warnings, pre-commit checks pass and content displays as intended in the rendered HTML
  • Authors/sponsor added to .github/CODEOWNERS for the PEP

Standards Track requirements

  • PEP topic discussed in a suitable venue with general agreement that a PEP is appropriate
  • Suggested sections included (unless not applicable)
    • Motivation
    • Rationale
    • Specification
    • Backwards Compatibility
    • Security Implications
    • How to Teach This
    • Reference Implementation
    • Rejected Ideas
    • Open Issues
  • Python-Version set to valid (pre-beta) future Python version, if relevant
  • Any project stated in the PEP as supporting/endorsing/benefiting from the PEP formally confirmed such
  • Right before or after initial merging, PEP discussion thread created and linked to in Discussions-To and Post-History

📚 Documentation preview 📚: https://pep-previews--4325.org.readthedocs.build/

@vstinner vstinner requested a review from a team as a code owner March 27, 2025 15:23
@AA-Turner AA-Turner added the new-pep A new draft PEP submitted for initial review label Mar 27, 2025
@AA-Turner

This comment was marked as resolved.

@vstinner

This comment was marked as resolved.

Copy link
Member

@AA-Turner AA-Turner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brief editorial review:

Carol25170

This comment was marked as spam.

vstinner and others added 3 commits March 28, 2025 08:53
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Examples becomes a top-level section.
@vstinner
Copy link
Member Author

@AA-Turner: I updated the PEP, please review it again.

vstinner and others added 6 commits March 29, 2025 00:43
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the examples, it could help if you could add comments telling what happens if we were to call PyBytesWriter_Finish() after each call to a PyBytesWriter_* writing function. For instance in the hello world case:

PyObject* hello_world(void)
{
    PyBytesWriter *writer = PyBytesWriter_Create(0);
    if (writer == NULL) {
        goto error;
    }
    // PyBytesWriter_Finish(writer) == b""
    if (PyBytesWriter_WriteBytes(writer, "Hello", -1) < 0) {
        goto error;
    }
    // PyBytesWriter_Finish(writer) == b"Hello"
    if (PyBytesWriter_Format(writer, " %s!", "World") < 0) {
        goto error;
    }
    // PyBytesWriter_Finish(writer) == b"Hello World!"
    return PyBytesWriter_Finish(writer);
error:
    PyBytesWriter_Discard(writer);
    return NULL;
}

vstinner and others added 4 commits March 31, 2025 13:47
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
@vstinner vstinner enabled auto-merge (squash) March 31, 2025 12:19
@vstinner vstinner merged commit da52c06 into python:main Mar 31, 2025
4 of 5 checks passed
@vstinner vstinner deleted the pep782 branch March 31, 2025 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-pep A new draft PEP submitted for initial review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants