Skip to content

gh-156466: Fix additional compiler scope cleanup errors - #156547

Merged
iritkatriel merged 1 commit into
python:mainfrom
JelleZijlstra:codex/compiler-scope-cleanup
Aug 29, 2026
Merged

gh-156466: Fix additional compiler scope cleanup errors#156547
iritkatriel merged 1 commit into
python:mainfrom
JelleZijlstra:codex/compiler-scope-cleanup

Conversation

@JelleZijlstra

@JelleZijlstra JelleZijlstra commented Aug 29, 2026

Copy link
Copy Markdown
Member

Two small cleanup bugs:

  • codegen_class_body was missing an IN_SCOPE
  • _PyCompile_CodeGen could exit a scope that was never entered in the path where metadata failed allocation

@iritkatriel iritkatriel added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Aug 29, 2026
@iritkatriel
iritkatriel merged commit f4874f3 into python:main Aug 29, 2026
65 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @JelleZijlstra for the PR, and @iritkatriel for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Aug 29, 2026

Copy link
Copy Markdown

GH-156571 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Aug 29, 2026
@miss-islington-app

Copy link
Copy Markdown

Sorry, @JelleZijlstra and @iritkatriel, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker f4874f381c1ef9a3e0e17fde870f2d38d89e043b 3.13

@bedevere-app

bedevere-app Bot commented Aug 29, 2026

Copy link
Copy Markdown

GH-156572 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Aug 29, 2026
@iritkatriel

Copy link
Copy Markdown
Member

I marked as needs back port, but not sure about 3.13.

iritkatriel pushed a commit that referenced this pull request Aug 29, 2026
…6547) (#156572)

gh-156466: Fix additional compiler scope cleanup errors (GH-156547)
(cherry picked from commit f4874f3)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
@JelleZijlstra

Copy link
Copy Markdown
Member Author

I think the codegen.c code is new in 3.14 but the compile.c one probably also needs fixing in 3.13, let me take a look.

@bedevere-app

bedevere-app Bot commented Aug 29, 2026

Copy link
Copy Markdown

GH-156582 is a backport of this pull request to the 3.13 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants