]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.9] bpo-42630: Improve error reporting in Tkinter for absent default root (GH-23781...
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 19 Dec 2020 11:08:07 +0000 (13:08 +0200)
committerGitHub <noreply@github.com>
Sat, 19 Dec 2020 11:08:07 +0000 (13:08 +0200)
commit87e7a14ee3bd7dc495e51166598453114342d0bf
tree294f115bf28022c9a25b174684cc5dfbe6e7fde9
parentd458d8dab0abaf781c923f80f8eb832d0c683e88
[3.9] bpo-42630: Improve error reporting in Tkinter for absent default root (GH-23781) (GH-23853)

* 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