From 824ac88f8b760ebd027b177d724d175be6d435be Mon Sep 17 00:00:00 2001 From: Pablo Galindo Salgado Date: Sat, 25 Oct 2025 23:30:16 +0100 Subject: [PATCH] Fix eager imports in try/except in global mode --- Python/compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/compile.c b/Python/compile.c index dd4ca1c00bb..b633ab99f69 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -790,7 +790,7 @@ _PyCompile_TopFBlock(compiler *c) bool _PyCompile_InExceptionHandler(compiler *c) { - for (Py_ssize_t i = c->u->u_nfblocks; i < c->u->u_nfblocks; i++) { + for (Py_ssize_t i = 0; i < c->u->u_nfblocks; i++) { fblockinfo *block = &c->u->u_fblock[i]; switch (block->fb_type) { case COMPILE_FBLOCK_TRY_EXCEPT: