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 gerluijten
Recipients Boris.FELD, ajaksu2, gerluijten, gpolo, roger.serwy, srid, terry.reedy
Date 2013-05-04.10:34:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAEHQZ0zZws46UHPK6brKpkz5RjivoyqQMupQLt66CDGoOirMuQ@mail.gmail.com>
In-reply-to <1366423849.57.0.901019237914.issue5492@psf.upfronthosting.co.za>
Content
Hello Roger,

Thanks for the clear explanation!

Greetings, Ger

2013/4/20 Roger Serwy <report@bugs.python.org>

>
> Roger Serwy added the comment:
>
> Good catch Terry! I've been testing using "python -m idlelib.idle" instead
> of importing it from an interactive prompt. I'll need to remember to
> consider that test vector in the future.
>
> I figured out why those messages are popping up. The Tk event loop remains
> running when in the interactive Python REPL due to a PyOS_InputHook driving
> the Tk loop periodically. Some .after callbacks expire and Tcl tries
> calling into a Python function that no longer exists. The ColorDelegator's
> recolorize() and PyShell's poll_subprocess() are the callbacks. (Adding a
> "print(name, func)" to the after() function in Lib/tkinter/__init__.py
> revealed the link between the Tcl reference name and the Python reference
> name.)
>
> The extra ColorDelegator call is actually a bug, related to #13495. (I
> need to expand it that issue to include this new problem.) Two
> ColorDelegators get loaded, and only one gets its close() method called
> which properly cancels the .after callback into recolorize. The "orphaned"
> ColorDelegator still exists in the delegator chain with an active .after
> callback.
>
> Once both those .after callbacks are canceled, then the error messages
> Terry sees are no longer shown.
>
> The rev1 patch includes extra code to handle cancellation of the
> poll_subprocess .after callback. I'll be posting the multi-color delegator
> fix to #13495.
>
> ----------
> dependencies: +IDLE: Regressions - Two ColorDelegator instances loaded and
> -e no longer edits new files.
> Added file: http://bugs.python.org/file29945/issue5492_rev1.patch
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue5492>
> _______________________________________
>
History
Date User Action Args
2013-05-04 10:34:40gerluijtensetrecipients: + gerluijten, terry.reedy, ajaksu2, gpolo, roger.serwy, srid, Boris.FELD
2013-05-04 10:34:40gerluijtenlinkissue5492 messages
2013-05-04 10:34:39gerluijtencreate