]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-127930: use explicit imports in tkinter.simpledialog (#127931)
authorStephen Morton <git@tungol.org>
Sun, 14 Dec 2025 10:38:42 +0000 (02:38 -0800)
committerGitHub <noreply@github.com>
Sun, 14 Dec 2025 10:38:42 +0000 (12:38 +0200)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Lib/tkinter/simpledialog.py
Misc/NEWS.d/next/Library/2024-12-14-19-51-39.gh-issue-127930.WsGnh9.rst [new file with mode: 0644]

index 6e5b025a9f9d7dfb7518662ec7a46d2bf6fcedad..4f9eb44f034677322f19fa6bb678b229d4a0c736 100644 (file)
@@ -23,9 +23,12 @@ askfloat -- get a float from the user
 askstring -- get a string from the user
 """
 
-from tkinter import *
+from tkinter import Button, Entry, Frame, Label, Message, Tk, Toplevel
 from tkinter import _get_temp_root, _destroy_temp_root
 from tkinter import messagebox
+from tkinter.constants import ACTIVE, BOTH, END, LEFT, RIDGE, W, E
+
+__all__ = ["SimpleDialog", "Dialog", "askinteger", "askfloat", "askstring"]
 
 
 class SimpleDialog:
diff --git a/Misc/NEWS.d/next/Library/2024-12-14-19-51-39.gh-issue-127930.WsGnh9.rst b/Misc/NEWS.d/next/Library/2024-12-14-19-51-39.gh-issue-127930.WsGnh9.rst
new file mode 100644 (file)
index 0000000..0e1e8a9
--- /dev/null
@@ -0,0 +1 @@
+Add ``__all__`` to :mod:`tkinter.simpledialog`.