-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
PEP 789: Preventing task-cancellation bugs by limiting yield in async generators #3782
Conversation
Hmm, the docs build failed, but the output is quite hard to read. The actual error is hidden away and you have to scroll to the right to fix it - but there's no scroll bar. This is really an infrastructure note rather than a comment about this PR specifically (I'm sure you're already aware of it and working on that); how hard would it be to catch docutils.utils.SystemMessage and print out the message in a more useful manner? |
4258809
to
f80e2f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PEP number is assigned, here's a few comments on the text.
Please add @njsmith to the CODEOWNERS file. There's also a "New PEP" checklist at https://github.com/python/peps/blob/main/.github/PULL_REQUEST_TEMPLATE/Add%20a%20new%20PEP.md you could copy into the OP. |
because the term "block" is overloaded in this context.
2408999
to
d40352a
Compare
You've gotten PEP numbers 678 and 789, well planned. Probably you should just reserve 890 now. |
For expedience I'm using sphinxcontrib-mermaid here; we can easily embed .png versions before merging if preferred.
0194208
to
f8d6b8c
Compare
@JelleZijlstra I'm happy to call this draft substantively done, and merge it + open a Discuss thread. Based on discussions at the PyCon language summit and sprints, my impression is that the PEP is likely to be accepted if an implementation with satisfactory performance is available. Next steps are therefore to produce such an implementation! A solid prototype will give us more basis to disucss the remaining todo items, as well as whether and when to use it in the standard library, so I anticipate a quiet period for a few months. |
I'm happy with the text, but @njsmith as the sponsor should also confirm that they're OK with merging this. |
I had so much fun working on PEP-678 that I'm back again, this time with a proposal to mitigate an extremely nasty interaction between async generators and 'cancel scope' context managers (such as
asyncio.timeout
andasyncio.TaskGroup
).It's co-authored with @njsmith based on this discuss thread, and I'm aiming to discuss this at the language summit I'm posting this draft despite a few open questions and placeholders for a worked example.
and... if it's not too cheeky, can I ask @python/pep-editors to grant this PEP number 789? It'd be a cute sequel to my last 馃榿
(huh, that's the tag suggested in PEP 1, but it's not hyperlinked. @JelleZijlstra then?)
馃摎 Documentation preview 馃摎: https://pep-previews--3782.org.readthedocs.build/pep-0789/