]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-137814: Fix __qualname__ of __annotate__ functions in the interpreter ...
authorJelle Zijlstra <jelle.zijlstra@gmail.com>
Thu, 16 Apr 2026 04:52:43 +0000 (21:52 -0700)
committerGitHub <noreply@github.com>
Thu, 16 Apr 2026 04:52:43 +0000 (21:52 -0700)
commit1c9de6bbaab9d909a5f0de7fe6eb19dcce00b305
treeee4ba4bbec1ca72767507c536052cbd6181b3371
parent0a6bc082b7bc32a1f7743d8e0a1d635d5d72c965
[3.14] gh-137814: Fix __qualname__ of __annotate__ functions in the interpreter (#148221)

gh-137814: [3.14] Fix __qualname__ of __annotate__ functions in the interpreter

I'd still like to do #137842 on 3.15+, but that requires changing bytecode and we can't
really afford to do that in 3.14. So to fix this in 3.14, let's patch things up in the
ceval loop instead.

This is safe because the compiler only sets __annotate__ to just-created dedicated
annotate functions.
Include/internal/pycore_opcode_metadata.h
Include/internal/pycore_uop_metadata.h
Lib/test/test_type_annotations.py
Misc/NEWS.d/next/Core_and_Builtins/2026-04-07-07-21-30.gh-issue-137814.6yRTeu.rst [new file with mode: 0644]
Python/bytecodes.c
Python/executor_cases.c.h
Python/generated_cases.c.h