Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
Currently, a root window is created implicitly only when you create a Tkinter or Ttk widget. i.e. things which should be visible to user. When you create image, variable, or use global utility function like getbool() or mainloop() or image_types() it raises an error: AttributeError or NamedError, or sometimes RuntimeError with error message like "Too early to create image: no default root window". With PR 23781 it will always raise RuntimeError instead of AttributeError or NamedError with corresponding error message. "no default root window" is correct. There is no yet default root window required by the function. After you create it, explicitly or implicitly, you could use that function. It could be odd if image_type() will successfully return a result with a side effect of popping up a window. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42630> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com