]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-42630: Improve error reporting in Tkinter for absent default root (GH-23781)
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 19 Dec 2020 10:17:08 +0000 (12:17 +0200)
committerGitHub <noreply@github.com>
Sat, 19 Dec 2020 10:17:08 +0000 (12:17 +0200)
commit3d569fd6dccf9f582bafaca04d3535094cae393e
tree2468e1823c476391b2abecc79d093e0cbeb96b0c
parent1e27b57dbc8c1b758e37a531487813aef2d111ca
bpo-42630: Improve error reporting in Tkinter for absent default root (GH-23781)

* Tkinter functions and constructors which need a default root window
  raise now RuntimeError with descriptive message instead of obscure
  AttributeError or NameError if it is not created yet or cannot
  be created automatically.

* Add tests for all functions which use default root window.

* Fix import in the pynche script.
19 files changed:
Lib/idlelib/pyshell.py
Lib/test/test_idle.py
Lib/tkinter/__init__.py
Lib/tkinter/commondialog.py
Lib/tkinter/font.py
Lib/tkinter/simpledialog.py
Lib/tkinter/test/support.py
Lib/tkinter/test/test_tkinter/test_font.py
Lib/tkinter/test/test_tkinter/test_images.py
Lib/tkinter/test/test_tkinter/test_misc.py
Lib/tkinter/test/test_tkinter/test_simpledialog.py [new file with mode: 0644]
Lib/tkinter/test/test_tkinter/test_variables.py
Lib/tkinter/test/test_tkinter/test_widgets.py
Lib/tkinter/test/test_ttk/test_extensions.py
Lib/tkinter/test/test_ttk/test_widgets.py
Lib/tkinter/tix.py
Lib/tkinter/ttk.py
Misc/NEWS.d/next/Library/2020-12-15-17-51-27.bpo-42630.jf4jBl.rst [new file with mode: 0644]
Tools/pynche/PyncheWidget.py