You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
turtledemo: clean up start and stop, fix warning #66252
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/terryjreedy'closed_at=<Date2014-07-23.21:29:21.494>created_at=<Date2014-07-23.21:24:33.025>labels= ['type-bug']
title='turtledemo: clean up start and stop, fix warning'updated_at=<Date2014-08-15.04:57:26.157>user='https://github.com/terryjreedy'
The patch adds a main function with the minimum needed to start the mainloop. It omits the 'while RUN' loop and development code for catching exceptions while running. They should never happen, and silently suppressing tracebacks is a bad idea.
The patch also deletes the unneeded sys.exit() call from _destroy. In 3.x debug builds, this call results in the following clipped warning being printed in the startup console.
while executing
"46111032_destroy"
(command for "WM_DELETE_WINDOW" window manager protocol)
Removal of 'demo' as a global name disabled help callbacks. I could have added 'global demo' to main(), but I decided to refactor and remove duplicate code instead. For 3.5, however, refactor would not merge because of bpo-10291, so I made the simplest fix pending a decision on what to do.
After backporting 004fe3449193 (bpo-10921 3.5 patch) with changes as 7708f80940b0, forward port to 3.5 the 3.4 patch c26862955342 that did not merge before. The 3.4 and 3.5 files are identical.
Activity
terryjreedy commentedon Jul 23, 2014
The patch adds a main function with the minimum needed to start the mainloop. It omits the 'while RUN' loop and development code for catching exceptions while running. They should never happen, and silently suppressing tracebacks is a bad idea.
The patch also deletes the unneeded sys.exit() call from _destroy. In 3.x debug builds, this call results in the following clipped warning being printed in the startup console.
"46111032_destroy"
(command for "WM_DELETE_WINDOW" window manager protocol)
These no longer occur when sys.exit() is removed.
Turtledemo works fine with these changes.
python-dev commentedon Jul 23, 2014
New changeset 823f5507bd86 by Terry Jan Reedy in branch '2.7':
Issue bpo-22053: Cleanup turtledemo start and stop and fix debug shutdown warning.
http://hg.python.org/cpython/rev/823f5507bd86
New changeset 57531d65cdd4 by Terry Jan Reedy in branch '3.4':
Issue bpo-22053: Cleanup turtledemo start and stop and fix debug shutdown warning.
http://hg.python.org/cpython/rev/57531d65cdd4
python-dev commentedon Jul 25, 2014
New changeset 7a55b34f1db2 by Terry Jan Reedy in branch '2.7':
Issue bpo-22053: Make help work, after previous patch for this issue disabled it
http://hg.python.org/cpython/rev/7a55b34f1db2
New changeset c26862955342 by Terry Jan Reedy in branch '3.4':
Issue bpo-22053: Make help work, after previous patch for this issue disabled it
http://hg.python.org/cpython/rev/c26862955342
New changeset 8c972d528f06 by Terry Jan Reedy in branch 'default':
Issue bpo-22053: Make help work, after previous patch for this issue disabled it
http://hg.python.org/cpython/rev/8c972d528f06
terryjreedy commentedon Jul 25, 2014
Removal of 'demo' as a global name disabled help callbacks. I could have added 'global demo' to main(), but I decided to refactor and remove duplicate code instead. For 3.5, however, refactor would not merge because of bpo-10291, so I made the simplest fix pending a decision on what to do.
terryjreedy commentedon Aug 15, 2014
After backporting 004fe3449193 (bpo-10921 3.5 patch) with changes as 7708f80940b0, forward port to 3.5 the 3.4 patch c26862955342 that did not merge before. The 3.4 and 3.5 files are identical.
Misdirected changeset notices:
New changeset 4349bbc21ca7 by Terry Jan Reedy in branch 'default':
Issue bpo-22065: forward port the changes in c26862955342, update docstring with
http://hg.python.org/cpython/rev/4349bbc21ca7
New changeset 59cc3bfdac4b by Terry Jan Reedy in branch 'default':
Issue bpo-22065: Try the delete demohelp.txt part again.
http://hg.python.org/cpython/rev/59cc3bfdac4b
python-dev commentedon Aug 15, 2014
New changeset 5aa3f4863dda by Terry Jan Reedy in branch '3.4':
bpo-22053: actually remove .txt files from 3.4.
http://hg.python.org/cpython/rev/5aa3f4863dda