Skip to content

Conversation

@encukou
Copy link
Member

@encukou encukou commented Dec 19, 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
  • [n/a] 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 https://discuss.python.org/t/78873 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
  • [n/a] 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--4754.org.readthedocs.build/

@encukou encukou requested a review from a team as a code owner December 19, 2025 16:12
encukou and others added 2 commits December 22, 2025 16:40
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
`Py_slot_invalid` with OPTIONAL can be used as a no-op slot
@AA-Turner AA-Turner added the new-pep A new draft PEP submitted for initial review label Dec 23, 2025
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.

Couple of columns over 80 chars, could optionally reflow.

A

change the details.

Both structures contain a *slots* field – essentially an array of
`tagged unions <https://en.wikipedia.org/wiki/Tagged_union>`_,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
`tagged unions <https://en.wikipedia.org/wiki/Tagged_union>`_,
`tagged unions <https://en.wikipedia.org/wiki/Tagged_union>`__,

Discussions-To: Pending
Status: Draft
Type: Standards Track
Created: 17-Dec-2025
Copy link
Member

Choose a reason for hiding this comment

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

Date of number assignment

Suggested change
Created: 17-Dec-2025
Created: 19-Dec-2025

Comment on lines +111 to +113
...

PyObject *MyClass = PyType_FromSlots(myClass_slots, -1);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
...
PyObject *MyClass = PyType_FromSlots(myClass_slots, -1);
// ...
PyObject *MyClass = PyType_FromSlots(myClass_slots, -1);

- Non-pointers (``basicsize``, ``flags``).
Originally, slots were intended to
only contain *function pointers*; they now contain *data pointers* as well as
integers or flags. This proposal uses an union to handle types cleanly.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
integers or flags. This proposal uses an union to handle types cleanly.
integers or flags. This proposal uses a union to handle types cleanly.

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.

3 participants