Skip to content

[3.15] gh-50966: Fix unbounded recursion in turtle drag handlers (GH-152626)#152657

Merged
serhiy-storchaka merged 1 commit into
python:3.15from
miss-islington:backport-6f103fa-3.15
Jun 30, 2026
Merged

[3.15] gh-50966: Fix unbounded recursion in turtle drag handlers (GH-152626)#152657
serhiy-storchaka merged 1 commit into
python:3.15from
miss-islington:backport-6f103fa-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

TurtleScreenBase._update() redraws with cv.update(), which also reprocesses
input events, so a handler that moves the turtle (such as
screen.ondrag(turtle.goto)) reenters _update() for every queued event until
the interpreter crashes. A reentrant _update() now only flushes drawing with
update_idletasks().
(cherry picked from commit 6f103fa)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-authored-by: Claude Opus 4.8 noreply@anthropic.com

…onGH-152626)

TurtleScreenBase._update() redraws with cv.update(), which also reprocesses
input events, so a handler that moves the turtle (such as
screen.ondrag(turtle.goto)) reenters _update() for every queued event until
the interpreter crashes.  A reentrant _update() now only flushes drawing with
update_idletasks().
(cherry picked from commit 6f103fab178c07cbb5f701b8ad97e275b6eb6c4c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@serhiy-storchaka serhiy-storchaka merged commit 86a836a into python:3.15 Jun 30, 2026
55 checks passed
@miss-islington miss-islington deleted the backport-6f103fa-3.15 branch June 30, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants