-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
tkinter: stdlib but not really #5589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This sounds reasonable to me. Tkinter somehow feels like a separate entity from the rest of the stdlib in my mind, even though it's included with CPython. It also has larger stubs than most stdlib packages, so it's perhaps likely that users would like to update tham. Though I rarely use tkinter, so take my opinion with a grain of salt. |
My main worry is that this will be confusing to users who might not understand that tkinter is treated specially by typing. If we make this change, how should we communicate it to users? |
Mypy would likely generate an error and suggest installing |
I am not a big fan of this, after all tkinter is part of the stdlib. A similar rationale could be used for quite a few other stdlib modules, e.g. asyncio, statistics, curses, turtle, ssl. Why should they be part of the stdlib if ssl is not? But this begs another question: Could the stdlib be distributed separately from type checkers, with type checkers declaring a dependency? |
I don’t have a strong opinion. I don’t write a lot of Python these days, much less with tkinter—I use it occasionally when a project calls for it, not on a day-to-day basis. |
Here's another idea: why not auto-upload |
We have some precedence for stubs that can't be installed in a classic manner (ie using Can tkinter even be installed and updated separately from Python ? (in a way that affects stubs) If not, then I say keep it in stdlib, and focus the discussion to #5835 instead. (I've had similar needs with setuptools/distutils and having to wait for my stdlib distutils updates to be live) If yes, is that also the case for
Also this. |
I'd vote to close this. I think mypy releases are a little more regular than they were four years ago and tkinter stubs are much improved and more stable. I'm not aware of mixing and matching tkinter and python versions |
While tkinter is technically stdlib, it feels like a third-party package in a couple ways:
We could consider moving tkinter stubs from
stdlib/
tostubs/
. This would create atypes-tkinter
project on pypi that is auto-updated when pull requests are merged, even though you aren't supposed topip install tkinter
.The text was updated successfully, but these errors were encountered: