Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-42721: Improve using simple dialogs without root window#23897

Merged
serhiy-storchaka merged 4 commits into
python:masterpython/cpython:masterfrom
serhiy-storchaka:simple-common-dialog-temporary-rootserhiy-storchaka/cpython:simple-common-dialog-temporary-rootCopy head branch name to clipboard
Dec 25, 2020
Merged

bpo-42721: Improve using simple dialogs without root window#23897
serhiy-storchaka merged 4 commits into
python:masterpython/cpython:masterfrom
serhiy-storchaka:simple-common-dialog-temporary-rootserhiy-storchaka/cpython:simple-common-dialog-temporary-rootCopy head branch name to clipboard

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Dec 22, 2020

Copy link
Copy Markdown
Member

When simple query dialogs (tkinter.simpledialog), message boxes
(tkinter.messagebox) or color choose dialog (tkinter.colorchooser)
are created without arguments master and parent, and the default
root window is not yet created, a new temporary hidden root window
will be created automatically. It will not be set as the default root
window and will be destroyed right after closing the dialog window.
It will help to use these simple dialog windows in programs which do
not need other GUI.

Previously, message boxes and color chooser created the blank root
window and left it after closing the dialog window, and query dialogs
just raised an exception.

https://bugs.python.org/issue42721

When simple query dialogs (tkinter.simpledialog), message boxes
(tkinter.messagebox) or color choose dialog (tkinter.colorchooser)
are created without arguments master and parent, and the default
root window is not yet created, a new temporary hidden root window
will be created automatically. It will not be set as the default root
window and will be destroyed right after closing the dialog window.
It will help to use these simple dialog windows in programs which do
not need other GUI.

Previously, message boxes and color chooser created the blank root
window and left it after closing the dialog window, and query dialogs
just raised an exception.
@serhiy-storchaka serhiy-storchaka force-pushed the simple-common-dialog-temporary-root branch from f1e7bfd to 2460120 Compare December 22, 2020 20:56

@terryjreedy terryjreedy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Half of review is on issue.

Comment thread Lib/tkinter/commondialog.py Outdated
Comment thread Misc/NEWS.d/next/Library/2020-12-22-22-47-22.bpo-42721.I5Ai5L.rst
@bedevere-bot

Copy link
Copy Markdown

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@serhiy-storchaka

Copy link
Copy Markdown
Member Author

I have made the requested changes; please review again.

@bedevere-bot

Copy link
Copy Markdown

Thanks for making the requested changes!

@terryjreedy: please review the changes made to this pull request.

Comment thread Lib/tkinter/__init__.py
@serhiy-storchaka serhiy-storchaka merged commit 675c97e into python:master Dec 25, 2020
@serhiy-storchaka serhiy-storchaka deleted the simple-common-dialog-temporary-root branch December 25, 2020 18:19
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
…-23897)

When simple query dialogs (tkinter.simpledialog), message boxes
(tkinter.messagebox) or color choose dialog (tkinter.colorchooser)
are created without arguments master and parent, and the default
root window is not yet created, a new temporary hidden root window
will be created automatically. It will not be set as the default root
window and will be destroyed right after closing the dialog window.
It will help to use these simple dialog windows in programs which do
not need other GUI.

Previously, message boxes and color chooser created the blank root
window and left it after closing the dialog window, and query dialogs
just raised an exception.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
wucke13 added a commit to wucke13/linuxcnc that referenced this pull request May 14, 2026
- Numpy renamed `numpy.core.Inf` -> `numpy.core.inf`.
  - However, `numpy.core` was also deprecated and renamed, hence it
    would be `numpy._core.inf`.
  - But really, `numpy.inf` does work too.
- Avoid closing the `tkinter._default_root`, it's not necessary anymore
  (probably since python/cpython#23897).
  Nowadays, there isn't even a `tkinter._default_root` per default.

Signed-off-by: wucke13 <wucke13+github@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.