[issue39171] Missing default root in tkinter simpledialog.py

Serhiy Storchaka report at bugs.python.org
Sat Dec 19 12:46:05 EST 2020


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

It is addressed in issue42630. Now a RuntimeError with relevant error message is raised when call askinteger() without explicit parent if there is no default root widget.

Autocreating a top-level root window is not good idea. It pops up an empty window with default size and title and left it open after closing the dialog window. If withdraw it right after creation, it would look less weird, but it may break the following code which calls Tk() and expects it to be set as a default root window.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39171>
_______________________________________


More information about the Python-bugs-list mailing list