Skip to content

PEP 780: ABI features as environment markers #4315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 71 commits into from
Mar 25, 2025

Conversation

zklaus
Copy link
Contributor

@zklaus zklaus commented Mar 21, 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--4315.org.readthedocs.build/

Discussions-To: https://discuss.python.org/t/60007
Status: Draft
Type: Standards Track
Topic: Packaging
Copy link
Member

Choose a reason for hiding this comment

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

@pfmoore question from a governance perspective, as PEP-0776 is to be split into two parts (packaging & non-packaging). Do you have similar thoughts here? The PEP proposes both a new sys.abi_features attribute and a new sys_abi_features environment marker.

Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately, I think it does.

It may be possible to handle the new marker without a second PEP - I'd be willing to support adding sys_abi_features to the marker spec as a simple update to the specification. It would still need raising on the packaging Discourse, though. And there would be questions about how tools running under versions of Python without the new sys attribute should handle the marker, so it's not completely uncontroversial.

Copy link
Member

Choose a reason for hiding this comment

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

Looking at the PEP itself, I see that it introduces the idea of markers which are set objects. That's something that PEP 751 also introduces - the PEP authors here should probably look at PEP 751 (which is currently being reviewed for approval by me) to ensure they don't contradict what's being said there. I think it's compatible, but I haven't checked thoroughly.

Copy link
Member

Choose a reason for hiding this comment

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

It might make sense to treat this only as a packaging PEP, since the changes to CPython itself seem small enough to be handled without a PEP. So the approval process would be a packaging PEP for the new markers, plus standard core dev consensus for the related CPython changes.

Copy link
Member

Choose a reason for hiding this comment

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

That's also a reasonable approach.

Taking the last few comments to their extreme, we could make the core change without a PEP, and agree the packaging spec change can be done without a PEP as well. I think that's probably going a bit too far, though 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback, that makes sense!

Shall we then discuss this as a packaging PEP and once we have community agreement on names and content make the necessary additions to CPython?

Copy link
Contributor

Choose a reason for hiding this comment

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

It'd be nice to unresolve this comment, since it was just brought up again on Discourse.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
zklaus and others added 3 commits March 24, 2025 10:39
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
@zklaus zklaus requested a review from AA-Turner March 24, 2025 14:32
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.

A few final editorial comments (prefixed as such) and two remaining questions -- but these could be taken to the Discourse thread, so don't let it block getting the PR merged.

Thank you!

A

@AA-Turner
Copy link
Member

@zklaus anything outstanding before merging?

@zklaus
Copy link
Contributor Author

zklaus commented Mar 25, 2025

@zklaus anything outstanding before merging?

No. I think this is ready.

Thanks for all the reviews everyone, @pfmoore, and particularly @AA-Turner! I really think it improved the PEP a lot!

@AA-Turner AA-Turner merged commit 0b971b4 into python:main Mar 25, 2025
5 checks passed
@AA-Turner
Copy link
Member

AA-Turner commented Mar 25, 2025

@zklaus please now create a discussion thread for the PEP on Discourse, and then open a follow-up PR here to update Post-History and Discussions-To. The PEP has been rendered and is online at https://peps.python.org/pep-0780/.

Thank you!

A

@zklaus zklaus deleted the new-environment-markers branch March 26, 2025 10:47
@zklaus
Copy link
Contributor Author

zklaus commented Mar 26, 2025

@zklaus please now create a discussion thread for the PEP on Discourse, and then open a follow-up PR here to update Post-History and Discussions-To.

Done. The follow-up PR is #4324, the discussion is here.

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.

8 participants