Skip to content

Conversation

@iritkatriel
Copy link
Member

@iritkatrieliritkatriel 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)
@iritkatrieliritkatriel 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-appbedevere-appbot added the type-crash A hard crash of the interpreter, possibly with a core dump label May 1, 2024
@iritkatrieliritkatriel merged commit ebef3c5 into python:3.12May 1, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-crashA 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

@iritkatriel