Python/flowgraph.c:528: all_exits_have_lineno: Assertion `0' failed · Issue #124746 · python/cpython (original) (raw)

Bug report

Bug description:

The following code causes an assertion in a debug build:

def name_4(): try: pass except* name_3: pass else: return {} finally: try: pass except* name_1: pass

output (Python 3.13.0rc2+):

python3: Python/flowgraph.c:528: all_exits_have_lineno: Assertion `0' failed.

This bug can be reproduced with the current 3.13 branch (80de976).
I bisected the issue down to 7e49f27.
@iritkatriel I think this is one for you again.

CPython versions tested on:

3.13

Operating systems tested on:

No response

Linked PRs