[3.8] bpo-42630: Improve error reporting in Tkinter for absent default root (GH-23781) by serhiy-storchaka · Pull Request #23854 · python/cpython

@serhiy-storchaka

…t root (pythonGH-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..
(cherry picked from commit 3d569fd)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>