[issue25507] IDLE: user code 'import tkinter; tkinter.font' should fail

Terry J. Reedy report at bugs.python.org
Fri Jul 15 17:03:35 EDT 2016


Terry J. Reedy added the comment:

In #27515, Nick Coughlin said that 'del a.b', would work if sys.modules('a.b') is also deleted -- unless a.b objects to being reloaded.  This seems not a problem for the current 8 tkinter submodules.  The attached tkimports.py runs without error.

I am not going to patch 2.7, which does not have the bug, just for the import reduction.  The last patch could be applied to 3.5 since it does not remove anything from PyShell.  Putting the three warning functions in a class and making the warning global a class attribute (a future issue) would be a different matter.

----------
versions:  -Python 2.7
Added file: http://bugs.python.org/file43736/tkimports.py

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


More information about the Python-bugs-list mailing list