Title: turtle regression in 3.5
Type: behavior Stage: patch review
Components: Library (Lib) Versions: Python 3.5
Status: open Resolution:
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: Ellison Marks, Robert Harder, ethan.furman, furkanonder, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2016-03-16 04:59 by Ellison Marks, last changed 2020-04-11 13:31 by furkanonder.

Pull Requests
URL Status Linked Edit
PR 19465 open furkanonder, 2020-04-10 23:06
Messages (5)
msg261840 - (view) Author: Ellison Marks (Ellison Marks) Date: 2016-03-16 04:59
I noticed some odd behaviour when running some turtle code I wrote using python 3.5. A simplified example:

>>> from turtle import Turtle
>>> t = Turtle()
>>> t.getscreen().bye() # or manually close the turtle window
>>> t2 = Turtle()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.5/", line 3816, in __init__
  File "/usr/lib64/python3.5/", line 2557, in __init__
  File "/usr/lib64/python3.5/", line 2660, in _update
  File "/usr/lib64/python3.5/", line 2646, in _update_data
  File "/usr/lib64/python3.5/", line 1292, in _incrementudc
    raise Terminator

This code works under 3.4, opening a new turtle window the second time Turtle() is called. Under 3.5, a blank white window opens.

This seems to be related to, as the only point that raises Terminator is guarded by a check for `if not TurtleScreen._RUNNING:`
msg263589 - (view) Author: Ellison Marks (Ellison Marks) Date: 2016-04-16 21:22
Just as an update, I've been working around this by manually setting TurtleScreen._RUNNING to True before calling Turtle() again, which produces the desired behaviour in both 3.4 and 3.5. Haven't noticed any bad effects so far.
msg273190 - (view) Author: Ethan Furman (ethan.furman) * (Python committer) Date: 2016-08-20 07:10
Serhiy, is this a quick fix you can get in?
msg279343 - (view) Author: Robert Harder (Robert Harder) Date: 2016-10-24 22:23
Thanks for pointing out the workaround.  Was driving me crazy.  Possible fix is to add TurtleScreen._RUNNING = True ~line 967 in, in TurtleScreen.__init__ function.
msg366212 - (view) Author: Furkan Onder (furkanonder) * Date: 2020-04-11 13:31
PR has been sent.
Date User Action Args
2020-04-11 13:31:54furkanondersetmessages: + msg366212
2020-04-10 23:06:14furkanondersetkeywords: + patch
nosy: + furkanonder

pull_requests: + pull_request18820
stage: needs patch -> patch review
2018-06-16 15:40:09willingcsetstage: needs patch
2016-10-24 22:23:44Robert Hardersetnosy: + Robert Harder
messages: + msg279343
2016-08-20 07:10:04ethan.furmansetmessages: + msg273190
2016-04-16 21:22:20Ellison Markssetmessages: + msg263589
2016-03-16 07:17:33serhiy.storchakasetassignee: serhiy.storchaka

nosy: + serhiy.storchaka
2016-03-16 07:13:52ethan.furmansetnosy: + ethan.furman
2016-03-16 04:59:15Ellison Markscreate