[issue11998] test_signal cannot test blocked signals if _tkinter is loaded

STINNER Victor report at bugs.python.org
Wed May 4 13:05:50 CEST 2011


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

As suggested by Antoine, here is a patch to call Tcl_Finalize() in test_signal.

You can call create a Tcl/Tk window, destroy it, call _tkinter._finalize(), and then create a new Tcl/Tk window. But call _tkinter._finalize() crashes if there is still a running Tcl/Tk window.

We should add a safety test checking that there is no more running widget. If it is not possible to implement this, the function should only be compiled in debug mode. If it is possible, it would be nice to call _tkinter._finalize() when the last widget is destroyed and/or at Python exit.

----------
keywords: +patch
nosy: +gpolo
Added file: http://bugs.python.org/file21882/tkinter_finalize.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11998>
_______________________________________


More information about the Python-bugs-list mailing list