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.

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.

2 participants