From ed1aa1f324f9eb32aba9bff0240e2514eb051f70 Mon Sep 17 00:00:00 2001 From: Zhikang Yan <2951256653@qq.com> Date: Fri, 28 Aug 2026 17:13:31 +0800 Subject: [PATCH 1/2] gh-125763: Remove the broken spacebar quit binding in `turtledemo.sorting_animate` (#126583) Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Stan Ulbrych --- Lib/turtledemo/sorting_animate.py | 3 +-- .../Library/2024-11-08-18-39-50.gh-issue-125763.F2p5_U.rst | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2024-11-08-18-39-50.gh-issue-125763.F2p5_U.rst diff --git a/Lib/turtledemo/sorting_animate.py b/Lib/turtledemo/sorting_animate.py index e0a2877cd5d621a..8bfaa74b719c6b5 100644 --- a/Lib/turtledemo/sorting_animate.py +++ b/Lib/turtledemo/sorting_animate.py @@ -178,7 +178,6 @@ def enable_keys(): onkey(start_ssort, "s") onkey(start_qsort, "q") onkey(randomize, "r") - onkey(bye, "space") def main(): getscreen().clearscreen() @@ -191,7 +190,7 @@ def main(): return "EVENTLOOP" instructions1 = "press i for insertion sort, s for selection sort, q for quicksort" -instructions2 = "spacebar to quit, r to randomize" +instructions2 = "r to randomize" if __name__=="__main__": msg = main() diff --git a/Misc/NEWS.d/next/Library/2024-11-08-18-39-50.gh-issue-125763.F2p5_U.rst b/Misc/NEWS.d/next/Library/2024-11-08-18-39-50.gh-issue-125763.F2p5_U.rst new file mode 100644 index 000000000000000..3dda03b977499f1 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2024-11-08-18-39-50.gh-issue-125763.F2p5_U.rst @@ -0,0 +1 @@ +Remove the broken spacebar quit binding from :mod:`turtledemo`\s ``sorting_animate`` example. From 0e2976849375fa455934246f78386740074d83b5 Mon Sep 17 00:00:00 2001 From: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Date: Fri, 28 Aug 2026 11:25:52 +0100 Subject: [PATCH 2/2] gh-156466: fix cleanup on error in codegen_function_annotations (#156502) --- Python/codegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/codegen.c b/Python/codegen.c index df52f2c734e69ae..ce577314d49fb0d 100644 --- a/Python/codegen.c +++ b/Python/codegen.c @@ -1196,7 +1196,7 @@ codegen_function_annotations(compiler *c, location loc, RETURN_IF_ERROR_IN_SCOPE( c, codegen_annotations_in_scope(c, loc, args, returns, &annotations_len) ); - ADDOP_I(c, loc, BUILD_MAP, annotations_len); + ADDOP_I_IN_SCOPE(c, loc, BUILD_MAP, annotations_len); RETURN_IF_ERROR(codegen_leave_annotations_scope(c, loc)); return MAKE_FUNCTION_ANNOTATE; }