Skip to content

turtledemo: clean up start and stop, fix warning #66252

Closed

Description

@terryjreedy
BPO 22053
Nosy @terryjreedy
Files
  • turdemo_start_stop.diff
  • 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 = <Date 2014-07-23.21:29:21.494>
    created_at = <Date 2014-07-23.21:24:33.025>
    labels = ['type-bug']
    title = 'turtledemo: clean up start and stop, fix warning'
    updated_at = <Date 2014-08-15.04:57:26.157>
    user = 'https://github.com/terryjreedy'

    bugs.python.org fields:

    activity = <Date 2014-08-15.04:57:26.157>
    actor = 'python-dev'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2014-07-23.21:29:21.494>
    closer = 'terry.reedy'
    components = []
    creation = <Date 2014-07-23.21:24:33.025>
    creator = 'terry.reedy'
    dependencies = []
    files = ['36051']
    hgrepos = []
    issue_num = 22053
    keywords = ['patch']
    message_count = 6.0
    messages = ['223780', '223781', '223920', '223921', '225334', '225336']
    nosy_count = 2.0
    nosy_names = ['terry.reedy', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue22053'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5']

    Activity

    1. terryjreedy commented on Jul 23, 2014

      @terryjreedy
      MemberAuthor

      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)

      These no longer occur when sys.exit() is removed.

      Turtledemo works fine with these changes.

    2. self-assigned this
      on Jul 23, 2014
    3. python-dev commented on Jul 23, 2014

      python-devmannequin
      Mannequin

      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

    4. python-dev commented on Jul 25, 2014

      python-devmannequin
      Mannequin

      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

    5. terryjreedy commented on Jul 25, 2014

      @terryjreedy
      MemberAuthor

      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.

    6. terryjreedy commented on Aug 15, 2014

      @terryjreedy
      MemberAuthor

      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

    7. python-dev commented on Aug 15, 2014

      python-devmannequin
      Mannequin

      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

    8. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions