https://github.com/python/cpython/commit/6c577a5d690476de9370896910ca701e874c56c3 commit: 6c577a5d690476de9370896910ca701e874c56c3 branch: 3.15 author: Miss Islington (bot) <[email protected]> committer: serhiy-storchaka <[email protected]> date: 2026-10-10T12:25:46+03:00 summary:
[3.15] gh-70758: Fix creating a turtle screen after closing one (GH-30355) (GH-155449) Creating a new turtle screen after the previous one was closed no longer raises turtle.Terminator on the first turtle command. (cherry picked from commit 1286d4398e505f70f97e50edda6b0341f16ca267) Co-authored-by: williamnavaraj <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]> files: A Misc/NEWS.d/next/Library/2022-01-03-12-50-42.gh-issue-70758.2NjFW_.rst M Lib/turtle.py diff --git a/Lib/turtle.py b/Lib/turtle.py index 73c3e8bd116ac5..e9e4cc5819a961 100644 --- a/Lib/turtle.py +++ b/Lib/turtle.py @@ -953,6 +953,9 @@ def __init__(self, cv, mode=_CFG["mode"], rootwindow.wm_attributes(topmost=True) rootwindow.wm_attributes(topmost=False) + # A new screen means that turtle graphics is running again. + TurtleScreen._RUNNING = True + def clear(self): """Delete all drawings and all turtles from the TurtleScreen. diff --git a/Misc/NEWS.d/next/Library/2022-01-03-12-50-42.gh-issue-70758.2NjFW_.rst b/Misc/NEWS.d/next/Library/2022-01-03-12-50-42.gh-issue-70758.2NjFW_.rst new file mode 100644 index 00000000000000..c59f6fed93fd63 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2022-01-03-12-50-42.gh-issue-70758.2NjFW_.rst @@ -0,0 +1,2 @@ +Creating a new :mod:`turtle` screen after the previous one was closed no +longer raises ``turtle.Terminator`` on the first turtle command. _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
