KEMBAR78
[3.12] gh-116767: fix crash on 'async with' with many context managers (GH-118348) by iritkatriel · Pull Request #118477 · python/cpython · GitHub
Skip to content

Conversation

@iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented May 1, 2024

Account for add_stopiteration_handler pushing a block for async with. To allow generator functions that previously almost hit the CO_MAXBLOCKS limit by nesting non-async blocks, the limit is increased by 1. This increase allows one more block in non-generator functions.

(cherry picked from commit c1bf487)

…pythonGH-118348)

Account for `add_stopiteration_handler` pushing a block for `async with`.
To allow generator functions that previously almost hit the `CO_MAXBLOCKS`
limit by nesting non-async blocks, the limit is increased by 1.
This increase allows one more block in non-generator functions.

(cherry picked from commit c1bf487)
@iritkatriel iritkatriel requested a review from markshannon as a code owner May 1, 2024 14:37
@iritkatriel iritkatriel changed the title gh-116767: fix crash on 'async with' with many context managers (GH-118348) [3.12] gh-116767: fix crash on 'async with' with many context managers (GH-118348) May 1, 2024
@bedevere-app bedevere-app bot added the type-crash A hard crash of the interpreter, possibly with a core dump label May 1, 2024
@iritkatriel iritkatriel merged commit ebef3c5 into python:3.12 May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-crash A hard crash of the interpreter, possibly with a core dump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant