Skip to content

PEP 843: Export Statement for DRY Re-exports - #5078

Merged
ZeroIntensity merged 3 commits into
python:mainfrom
NeilGirdhar:main
Aug 21, 2026
Merged

PEP 843: Export Statement for DRY Re-exports#5078
ZeroIntensity merged 3 commits into
python:mainfrom
NeilGirdhar:main

Conversation

@NeilGirdhar

@NeilGirdhar NeilGirdhar commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

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
    • Tip: find the next available number with pepotron — run uvx pepotron next (or pipx install pepotron then pep next)
  • 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
    • Specification
    • Rationale
    • Backwards Compatibility
    • Security Implications
    • How to Teach This
    • Reference Implementation
    • Rejected Ideas
    • Open Issues
    • Acknowledgements
    • Footnotes
    • Change History
  • 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

@read-the-docs-community

read-the-docs-community Bot commented Aug 5, 2026

Copy link
Copy Markdown

Comment thread peps/pep-0843.rst Outdated
Comment thread peps/pep-0843.rst
Comment thread peps/pep-0843.rst Outdated
Comment thread peps/pep-0843.rst Outdated
Comment thread peps/pep-0843.rst Outdated
Comment thread .github/CODEOWNERS Outdated
Comment thread peps/pep-0843.rst
Comment thread peps/pep-0843.rst
Comment thread peps/pep-0843.rst Outdated
Comment thread peps/pep-0843.rst Outdated
Comment thread peps/pep-0843.rst Outdated
Comment thread peps/pep-0843.rst Outdated
@NeilGirdhar
NeilGirdhar force-pushed the main branch 2 times, most recently from 0995a62 to 14dda0d Compare August 6, 2026 01:22
@hugovk hugovk changed the title Add PEP 843: Export Statement for DRY Re-exports PEP 843: Export Statement for DRY Re-exports Aug 6, 2026
@hugovk

hugovk commented Aug 6, 2026

Copy link
Copy Markdown
Member

Please add the new PEP checklist to the top post, and start checking things off:

https://github.com/python/peps/blob/main/.github/PULL_REQUEST_TEMPLATE/Add%20a%20new%20PEP.md

@vstinner

vstinner commented Aug 6, 2026

Copy link
Copy Markdown
Member

It would be better to get a sponsor for your PEP and merge the PR before mentioning your PEP on a public discussion: https://discuss.python.org/t/export-statement-for-dry-re-exports/108444.

@NeilGirdhar

Copy link
Copy Markdown
Contributor Author

It would be better to get a sponsor for your PEP and merge the PR before mentioning your PEP on a public discussion: https://discuss.python.org/t/export-statement-for-dry-re-exports/108444.

Fair point, I'm definitely looking for a sponsor!

@brianschubert brianschubert added the new-pep A new draft PEP submitted for initial review label Aug 6, 2026
@warsaw

warsaw commented Aug 6, 2026

Copy link
Copy Markdown
Member

I can't find the comment in the review now, but via email I saw this comment from @ZeroIntensity:

You should mark this as Replaces: 842. If this PEP is accepted, PEP 842 will be marked as "Superseded".

I don't think that's quite right though. Replaces and Superseded are really there to relate a new PEP that replaces an existing approved PEP. Since 842 isn't approved (yet), I wouldn't expect those headers to be added to this one.

Of 842, 843, and 844, I would expect whatever combination gets approved would just be marked Approved and the others (if any) would be marked Rejected. There's nothing to replace or supersede.

Maybe we need to clarify this in PEP 12?

@ZeroIntensity

ZeroIntensity commented Aug 6, 2026

Copy link
Copy Markdown
Member

Yes, Jelle disagreed with me as well.

I still think Replaces/Superseded is the best choice for 842 if we merge this, because this PEP is just a subset of 842. If it becomes clear that 842 is doing too much, then I'll withdraw it and sponsor this -- hence why I think it "replaces" 842.

@hugovk

hugovk commented Aug 7, 2026

Copy link
Copy Markdown
Member

Yeah, let's be careful about sticking to the boring old processes for stuff like this, better to have a broader discussion elsewhere if we want to change it.

PEP 12 says:

Add a Replaces header if your PEP obsoletes an earlier PEP. The value of this header is the number of the PEP that your new PEP is replacing. Only add this header if the older PEP is in “final” form, i.e. is either Accepted, Final, or Rejected. You aren’t replacing an older open PEP if you’re submitting a competing idea.

(Now I remember I've also suggested Replaced/Superseded-by on a non-final PEP before, so it's good the authors didn't take me up on the idea! 😅)

If PEP 842 is withdrawn: a withdrawal notice at the top is useful, and this can include some prose with reasoning and link to 843.

@ZeroIntensity

Copy link
Copy Markdown
Member

Given the accumulating contention surrounding PEP 842, I would like to confirm my sponsorship of PEP 843.

Comment thread peps/pep-0843.rst Outdated
Comment thread peps/pep-0843.rst Outdated
Comment thread peps/pep-0843.rst
@gvanrossum

Copy link
Copy Markdown
Member

Please don’t force-push. It will be squashed when merged.

Comment thread peps/pep-0843.rst
Comment thread peps/pep-0843.rst Outdated
Comment thread peps/pep-0843.rst
Comment thread peps/pep-0843.rst

@ZeroIntensity ZeroIntensity left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This generally looks good. Let's try to get this up soon, since some people have been confused about why PEP 844 references a PEP that doesn't seem to exist.

Comment thread peps/pep-0843.rst Outdated
Comment thread peps/pep-0843.rst
@ZeroIntensity

Copy link
Copy Markdown
Member

Please also fix the merge conflicts.

Peter Bierma (ZeroIntensity) offered to sponsor PEP 843 and asked to
be listed as its CODEOWNERS reviewer, so add both. He also flagged
that several section headers had underlines longer than their titles;
fix all of those to satisfy strict RST underline-length checking.

@ZeroIntensity ZeroIntensity left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. If you're ready to start the discussion, I can merge this.

@NeilGirdhar

Copy link
Copy Markdown
Contributor Author

Sounds great, thanks for speedy review

@ZeroIntensity

Copy link
Copy Markdown
Member

If any of the other reviewers see something they'd like changed, feel free to send a follow-up.

@ZeroIntensity
ZeroIntensity merged commit bc12a08 into python:main Aug 21, 2026
5 checks passed
pull Bot pushed a commit to NOUIY/peps that referenced this pull request Aug 21, 2026
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.

9 participants