René's URL Explorer Experiment


Title: PEP 789 – Preventing task-cancellation bugs by limiting yield in async generators | peps.python.org

Open Graph Title: PEP 789 – Preventing task-cancellation bugs by limiting yield in async generators | peps.python.org

Description: Structured concurrency is increasingly popular in Python. Interfaces such as the asyncio.TaskGroup and asyncio.timeout context managers support compositional reasoning, and allow developers to clearly scope the lifetimes of concurrent tasks. However, u...

Open Graph Description: Structured concurrency is increasingly popular in Python. Interfaces such as the asyncio.TaskGroup and asyncio.timeout context managers support compositional reasoning, and allow developers to clearly scope the lifetimes of concurrent tasks. However, u...

Opengraph URL: https://peps.python.org/pep-0789/

direct link

Domain: peps.python.org

color-schemelight dark
og:typewebsite
og:site_namePython Enhancement Proposals (PEPs)
og:imagehttps://peps.python.org/_static/og-image.png
og:image:altPython PEPs
og:image:width200
og:image:height200
theme-color#3776ab

Links:

Pythonhttps://www.python.org/
PEP Indexhttps://peps.python.org/
Discourse threadhttps://discuss.python.org/t/preventing-yield-inside-certain-context-managers/1091
Abstracthttps://peps.python.org/789#abstract
Backgroundhttps://peps.python.org/789#background
Problem statementhttps://peps.python.org/789#problem-statement
Motivating exampleshttps://peps.python.org/789#motivating-examples
Leaking a timeout to the outer scopehttps://peps.python.org/789#leaking-a-timeout-to-the-outer-scope
Leaking background tasks (breaks cancellation and exception handling)https://peps.python.org/789#leaking-background-tasks-breaks-cancellation-and-exception-handling
In a user-defined context managerhttps://peps.python.org/789#in-a-user-defined-context-manager
Specificationhttps://peps.python.org/789#specification
Implementation - tracking frameshttps://peps.python.org/789#implementation-tracking-frames
Worked exampleshttps://peps.python.org/789#worked-examples
No-yield examplehttps://peps.python.org/789#no-yield-example
Attempts-to-yield examplehttps://peps.python.org/789#attempts-to-yield-example
Allowed-to-yield examplehttps://peps.python.org/789#allowed-to-yield-example
Allowing yield for context managershttps://peps.python.org/789#allowing-yield-for-context-managers
Behavior if sys.prevent_yields is misusedhttps://peps.python.org/789#behavior-if-sys-prevent-yields-is-misused
Anticipated useshttps://peps.python.org/789#anticipated-uses
Backwards Compatibilityhttps://peps.python.org/789#backwards-compatibility
How widespread is this bug?https://peps.python.org/789#how-widespread-is-this-bug
How to Teach Thishttps://peps.python.org/789#how-to-teach-this
Rejected alternativeshttps://peps.python.org/789#rejected-alternatives
PEP 533, deterministic cleanup for iteratorshttps://peps.python.org/789#pep-533-deterministic-cleanup-for-iterators
Deprecate async generators entirelyhttps://peps.python.org/789#deprecate-async-generators-entirely
Can’t we just deliver exceptions to the right place?https://peps.python.org/789#can-t-we-just-deliver-exceptions-to-the-right-place
Alternative implementation - inspecting bytecodehttps://peps.python.org/789#alternative-implementation-inspecting-bytecode
Footnoteshttps://peps.python.org/789#footnotes
Copyrighthttps://peps.python.org/789#copyright
Abstracthttps://peps.python.org/789#abstract
Structured concurrencyhttps://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/
Backgroundhttps://peps.python.org/789#background
asynciohttps://docs.python.org/3/library/asyncio.html#module-asyncio
[1]https://peps.python.org/789#trio-cancel-scope
[2]https://peps.python.org/789#tg-cs
Problem statementhttps://peps.python.org/789#problem-statement
Can’t we just deliver exceptions to the right place?https://peps.python.org/789#just-deliver
Motivating exampleshttps://peps.python.org/789#motivating-examples
Leaking a timeout to the outer scopehttps://peps.python.org/789#leaking-a-timeout-to-the-outer-scope
Leaking background tasks (breaks cancellation and exception handling)https://peps.python.org/789#leaking-background-tasks-breaks-cancellation-and-exception-handling
perhaps the queue itselfhttps://github.com/python/cpython/issues/119154
In a user-defined context managerhttps://peps.python.org/789#in-a-user-defined-context-manager
[3]https://peps.python.org/789#redirected
flake8-asynchttps://pypi.org/project/flake8-async/
Specificationhttps://peps.python.org/789#specification
[4]https://peps.python.org/789#also-sync
Implementation - tracking frameshttps://peps.python.org/789#implementation-tracking-frames
Worked exampleshttps://peps.python.org/789#worked-examples
No-yield examplehttps://peps.python.org/789#no-yield-example
https://peps.python.org/_images/pep-789-example-no-yield.png
Attempts-to-yield examplehttps://peps.python.org/789#attempts-to-yield-example
https://peps.python.org/_images/pep-789-example-yield-errors.png
Allowed-to-yield examplehttps://peps.python.org/789#allowed-to-yield-example
https://peps.python.org/_images/pep-789-example-yield-allowed.png
Allowing yield for context managershttps://peps.python.org/789#allowing-yield-for-context-managers
Behavior if sys.prevent_yields is misusedhttps://peps.python.org/789#behavior-if-sys-prevent-yields-is-misused
Anticipated useshttps://peps.python.org/789#anticipated-uses
Backwards Compatibilityhttps://peps.python.org/789#backwards-compatibility
How widespread is this bug?https://peps.python.org/789#how-widespread-is-this-bug
used static analysishttps://flake8-async.readthedocs.io/en/latest/
How to Teach Thishttps://peps.python.org/789#how-to-teach-this
developing with asynciohttps://docs.python.org/3/library/asyncio-dev.html
[5]https://peps.python.org/789#exp-report
PEP 533https://peps.python.org/pep-0533/
Rejected alternativeshttps://peps.python.org/789#rejected-alternatives
PEP 533, deterministic cleanup for iteratorshttps://peps.python.org/789#pep-533-deterministic-cleanup-for-iterators
PEP 533https://peps.python.org/pep-0533/
Deprecate async generators entirelyhttps://peps.python.org/789#deprecate-async-generators-entirely
[5]https://peps.python.org/789#exp-report
Can’t we just deliver exceptions to the right place?https://peps.python.org/789#can-t-we-just-deliver-exceptions-to-the-right-place
PEP 568https://peps.python.org/pep-0568/
PEP 550https://peps.python.org/pep-0550/
PEP 533https://peps.python.org/pep-0533/
Alternative implementation - inspecting bytecodehttps://peps.python.org/789#alternative-implementation-inspecting-bytecode
sketched an alternativehttps://gist.github.com/JelleZijlstra/a53b17417c5189b487316628acc5555f
Footnoteshttps://peps.python.org/789#footnotes
1https://peps.python.org/789#id1
trio.fail_after()https://trio.readthedocs.io/en/latest/reference-core.html#trio.fail_after
trio.open_nursery()https://trio.readthedocs.io/en/latest/reference-core.html#trio.open_nursery
trio.CancelScopehttps://trio.readthedocs.io/en/latest/reference-core.html#trio.CancelScope
2https://peps.python.org/789#id2
Can’t we just deliver exceptions to the right place?https://peps.python.org/789#just-deliver
3https://peps.python.org/789#id3
4https://peps.python.org/789#id4
trio.fail_after()https://trio.readthedocs.io/en/latest/reference-core.html#trio.fail_after
1https://peps.python.org/789#id5
2https://peps.python.org/789#id6
Zac’s experience report herehttps://discuss.python.org/t/using-exceptiongroup-at-anthropic-experience-report/20888
Copyrighthttps://peps.python.org/789#copyright
Abstracthttps://peps.python.org/789#abstract
Backgroundhttps://peps.python.org/789#background
Problem statementhttps://peps.python.org/789#problem-statement
Motivating exampleshttps://peps.python.org/789#motivating-examples
Leaking a timeout to the outer scopehttps://peps.python.org/789#leaking-a-timeout-to-the-outer-scope
Leaking background tasks (breaks cancellation and exception handling)https://peps.python.org/789#leaking-background-tasks-breaks-cancellation-and-exception-handling
In a user-defined context managerhttps://peps.python.org/789#in-a-user-defined-context-manager
Specificationhttps://peps.python.org/789#specification
Implementation - tracking frameshttps://peps.python.org/789#implementation-tracking-frames
Worked exampleshttps://peps.python.org/789#worked-examples
No-yield examplehttps://peps.python.org/789#no-yield-example
Attempts-to-yield examplehttps://peps.python.org/789#attempts-to-yield-example
Allowed-to-yield examplehttps://peps.python.org/789#allowed-to-yield-example
Allowing yield for context managershttps://peps.python.org/789#allowing-yield-for-context-managers
Behavior if sys.prevent_yields is misusedhttps://peps.python.org/789#behavior-if-sys-prevent-yields-is-misused
Anticipated useshttps://peps.python.org/789#anticipated-uses
Backwards Compatibilityhttps://peps.python.org/789#backwards-compatibility
How widespread is this bug?https://peps.python.org/789#how-widespread-is-this-bug
How to Teach Thishttps://peps.python.org/789#how-to-teach-this
Rejected alternativeshttps://peps.python.org/789#rejected-alternatives
PEP 533, deterministic cleanup for iteratorshttps://peps.python.org/789#pep-533-deterministic-cleanup-for-iterators
Deprecate async generators entirelyhttps://peps.python.org/789#deprecate-async-generators-entirely
Can’t we just deliver exceptions to the right place?https://peps.python.org/789#can-t-we-just-deliver-exceptions-to-the-right-place
Alternative implementation - inspecting bytecodehttps://peps.python.org/789#alternative-implementation-inspecting-bytecode
Footnoteshttps://peps.python.org/789#footnotes
Copyrighthttps://peps.python.org/789#copyright
Page Source (GitHub)https://github.com/python/peps/blob/main/peps/pep-0789.rst?plain=1
https://github.com/python/peps/blob/main/peps/pep-0789.rsthttps://github.com/python/peps/blob/main/peps/pep-0789.rst
2024-06-04 01:45:13 UTChttps://github.com/python/peps/commits/main/peps/pep-0789.rst

Viewport: width=device-width, initial-scale=1.0


URLs of crawlers that visited me.