PEP 806: Mixed sync/async context managers with precise async marking#4581
Merged
JelleZijlstra merged 7 commits intopython:mainfrom Sep 25, 2025
Merged
PEP 806: Mixed sync/async context managers with precise async marking#4581JelleZijlstra merged 7 commits intopython:mainfrom
JelleZijlstra merged 7 commits intopython:mainfrom
Conversation
AA-Turner
reviewed
Sep 8, 2025
with async
AA-Turner
reviewed
Sep 8, 2025
JelleZijlstra
approved these changes
Sep 8, 2025
Member
JelleZijlstra
left a comment
There was a problem hiding this comment.
Looks good, thanks! A couple minor points left.
Are you already working on a reference implementation? I started fiddling with the grammar a bit but not sure I'll have time to fully implement the PEP.
Contributor
Author
|
I'm not working on a reference implementation at the moment, but of course if you want to sponsor the PEP without implementing it that's totally fine! |
ad04138 to
0af6520
Compare
0af6520 to
6859bbf
Compare
Member
|
@Zac-HD please don't force push if you can avoid it. A |
AA-Turner
reviewed
Sep 10, 2025
with thanks to Adam Turner for his detailed review ❤️ Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Liam-DeVoe
reviewed
Sep 11, 2025
hugovk
reviewed
Sep 11, 2025
Member
hugovk
left a comment
There was a problem hiding this comment.
I've added the new PEP checklist from https://github.com/python/peps/blob/main/.github/PULL_REQUEST_TEMPLATE/Add%20a%20new%20PEP.md to the top post, please could you go through it and mark off those that apply?
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Liam DeVoe <orionldevoe@gmail.com>
JelleZijlstra
approved these changes
Sep 25, 2025
zklaus
pushed a commit
to zklaus/peps
that referenced
this pull request
Nov 3, 2025
…python#4581) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Liam DeVoe <orionldevoe@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With thanks to everyone who I've discussed this with; especially to Rob Rolls on Discuss for the ultimate proposal here, and to Jelle for offering to sponsor the PEP here.
Basic requirements (all PEP Types)
pep-NNNN.rst), PR title (PEP 123: <Title of PEP>) andPEPheaderAuthororSponsor, and formally confirmed their approvalAuthor,Status(Draft),TypeandCreatedheaders filled out correctlyPEP-Delegate,Topic,RequiresandReplacesheaders completed if appropriate.github/CODEOWNERSfor the PEPStandards Track requirements
Python-Versionset to valid (pre-beta) future Python version, if relevantDiscussions-ToandPost-History📚 Documentation preview 📚: https://pep-previews--4581.org.readthedocs.build/