[3.14] gh-70758: Fix creating a turtle screen after closing one (GH-30355) (GH-155450)
serhiy-storchaka <[email protected]> Sun, 09 Aug 2026 17:28:11 -0400 (EDT)
| Newsgroups | gmane.comp.python.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://github.com/python/cpython/commit/518f7439d3891fad1d94840e7c30c95cfe03e146 commit: 518f7439d3891fad1d94840e7c30c95cfe03e146 branch: 3.14 author: Miss Islington (bot) <[email protected]> committer: serhiy-storchaka <[email protected]> date: 2026-08-09T21:27:58Z summary: [3.14] gh-70758: Fix creating a turtle screen after closing one (GH-30355) (GH-155450) 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 db38a5a23581a7f..ba3a97db1b71127 100644 --- a/Lib/turtle.py +++ b/Lib/turtle.py @@ -1002,6 +1002,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 000000000000000..c59f6fed93fd630 --- /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]