[issue18141] tkinter.Image.__del__ can throw an exception if module globals are destroyed in the wrong order
Serhiy Storchaka
report at bugs.python.org
Wed May 28 22:48:56 CEST 2014
Serhiy Storchaka added the comment:
1. 3.3 is in security fixes only mode and shutdowning mechanism was changed in
3.4.
2. Looks as some Tk root was not explicitly destroyed and deleted during
shutdown stage.
3. Tk.destroy does nothing with images, it destroys only subcomponents and
commands. In any case it destroys only Tcl/Tk objects, not Python objects
which wrap them.
4. I think we shouldn't use _default_root outside the tkinter package. This is
implementation detail.
5. Agree, we could patch Variable/Image.__del__, and proposed patch looks
correct (other way is pass TclError as default value for optional parameter:
"def __del__(self, TclError=TclError)", both ways are widely used). But I
prefer first try to reproduce this in tests.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18141>
_______________________________________
More information about the Python-bugs-list
mailing list