This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients terry.reedy
Date 2017-09-16.20:47:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1505594835.61.0.799118873389.issue31493@psf.upfronthosting.co.za>
In-reply-to
Content
1. Currently, each instance of codecontext.CodeContext creates 2 root.after loops.  There should be at most two loops for the class, and preferably fewer by using the new reload().

2. The loops are never explicitly shut down.  Since conversion to a feature,  the following appears after running test_idle.

.invalid command name "109891384timer_event"
    while executing
"109891384timer_event"
    ("after" script)
invalid command name "109891512font_timer_event"
    while executing
"109891512font_timer_event"
    ("after" script)

This is because of
  File "F:\dev\3x\lib\idlelib\idle_test\test_outwin.py", line 20, in setUpClass
    w = cls.window = outwin.OutputWindow(None, None, None, root)
  File "F:\dev\3x\lib\idlelib\outwin.py", line 78, in __init__
    EditorWindow.__init__(self, *args)
  File "F:\dev\3x\lib\idlelib\editor.py", line 319, in __init__
  text.bind("<<toggle-code-context>>",  # added to traceback
    self.CodeContext(self).toggle_code_context_event)

The statement, which creates an instance, was added as part of the conversion.  However, the outwin tests were merged a week before the conversion, so this message might have started the.  In any case, editor.EditorWindow.load_extension does the same thing in doing the binding.  It is not clear why there is no message from other editor-creating tests. 

I want to fix at least this before next Monday's cutoff for new releases.  I will first try is after_cancel in a __del__ method.
History
Date User Action Args
2017-09-16 20:47:15terry.reedysetrecipients: + terry.reedy
2017-09-16 20:47:15terry.reedysetmessageid: <1505594835.61.0.799118873389.issue31493@psf.upfronthosting.co.za>
2017-09-16 20:47:15terry.reedylinkissue31493 messages
2017-09-16 20:47:15terry.reedycreate