Skip to content

Conversation

@tungol
Copy link
Contributor

@tungoltungol 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.

@tungoltungol changed the title gh: 127930: use explicit imports in tkinter.simpledialoggh-127930: use explicit imports in tkinter.simpledialogDec 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).

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

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

tungoland 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

@picnixzpicnixz left a comment

Choose a reason for hiding this comment

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

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

LGTM. 👍

@tungoltungol 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@tungol@picnixz@serhiy-storchaka@hugovk