]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.8] bpo-42630: Improve error reporting in Tkinter for absent default root (GH-23781...
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 19 Dec 2020 14:38:37 +0000 (16:38 +0200)
committerGitHub <noreply@github.com>
Sat, 19 Dec 2020 14:38:37 +0000 (16:38 +0200)
commit80c445cafbdfb16c4a882e3ff6fe28b471aacdfc
treec50f6688e6653e3f0a15db5a4bdd805299c2614a
parentd21d29ab5b8741da056ac09c49c759b6ccbf264a
[3.8] bpo-42630: Improve error reporting in Tkinter for absent default root (GH-23781) (GH-23854)

* 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.

(cherry picked from commit 3d569fd6dccf9f582bafaca04d3535094cae393e)
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