Skip to content

Conversation

@tungol
Copy link
Contributor

@tungol tungol commented Dec 13, 2024

simpledialog was overlooked when all the other tkinter submodules were updated to use explicit imports in #14864. This MR fixes that.

This is relevant to typeshed, where stubtest detects the extra constants imported into tkinter.simpledialog and emits a warning that they're not present in the stubs. Star imports in the stdlib usually indicate an intention to re-export.

I don't think this is user-facing enough to need a NEWS entry, but I'm happy to add one if anyone thinks otherwise.

@tungol tungol changed the title gh: 127930: use explicit imports in tkinter.simpledialog gh-127930: use explicit imports in tkinter.simpledialog Dec 13, 2024
@picnixz
Copy link
Member

picnixz commented Dec 14, 2024

I hope, no one does from tkinter.simpledialog import SOMETHING_THAT_WAS_STAR_IMPORTED or from tkinter.simpledialog import *. Otherwise, LGTM. What you can do is perhaps add a __all__ for this module? (in which case, you should perhaps have a NEWS entry).

@tungol tungol marked this pull request as draft December 15, 2024 03:44
@tungol tungol marked this pull request as ready for review December 15, 2024 03:52
@tungol
Copy link
Contributor Author

tungol commented Dec 15, 2024

I added __all__. All the other tkinter.* submodules have one, so that keeps this consistent.

tungol and others added 2 commits December 15, 2024 03:06
…sGnh9.rst

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

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

@hugovk hugovk merged commit 81bfcf1 into python:main Dec 14, 2025
44 checks passed
@serhiy-storchaka
Copy link
Member

LGTM. 👍

@tungol tungol deleted the simpledialog branch December 15, 2025 01:27
fatelei pushed a commit to fatelei/cpython that referenced this pull request Dec 16, 2025
…#127931)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants