-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Update stubinfo.py
for recent typeshed changes
#14265
Conversation
Python 3.10.7 (tags/v3.10.7:6cc6b13, Sep 5 2022, 14:08:36) [MSC v.1933 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import isapi
>>> import pythonwin
>>> import win32
>>> import win32com
>>> import win32comext
>>> import afxres
>>> import commctrl
>>> import win32ui
>>> import dde
>>> import mmapfile
>>> import mmsystem
>>> import ntsecuritycon
>>> import odbc
>>> import perfmon
>>> import pythoncom
>>> import pywintypes
>>> import regutil
>>> import servicemanager
>>> import sspicon
>>> import timer
>>> import win2kras
>>> import win32api
>>> import win32clipboard
>>> import win32con
>>> import win32console
>>> import win32cred
>>> import win32crypt
>>> import win32cryptcon
>>> import win32event
>>> import win32evtlog
>>> import win32evtlogutil
>>> import win32file
>>> import win32gui
>>> import win32gui_struct
>>> import win32help
>>> import win32inet
>>> import win32inetcon
>>> import win32job
>>> import win32lz
>>> import win32net
>>> import win32netcon
>>> import win32pdh
>>> import win32pdhquery
>>> import win32pipe
>>> import win32print
>>> import win32process
>>> import win32profile
>>> import win32ras
>>> import win32security
>>> import win32service
>>> import win32serviceutil
>>> import win32timezone
>>> import win32trace
>>> import win32transaction
>>> import win32ts
>>> import win32uiole
>>> import winerror
>>> import winioctlcon
>>> import winnt
>>> import winperf
>>> import winxpgui
>>> import winxptheme Stubs for all of ^those modules are now available if you |
This comment has been minimized.
This comment has been minimized.
Do the suggested type stubs have to live in the typeshed repository? If not, there would also be the pandas stubs: https://github.com/pandas-dev/pandas-stubs |
They don't necessarily, but because |
Diff from mypy_primer, showing the effect of this PR on open source code: apprise (https://github.com/caronc/apprise)
- setup.py:36: note: (or run "mypy --install-types" to install all missing stub packages)
- apprise/plugins/NotifyWindows.py:42: error: Cannot find implementation or library stub for module named "win32api" [import]
- apprise/plugins/NotifyWindows.py:43: error: Cannot find implementation or library stub for module named "win32con" [import]
- apprise/plugins/NotifyWindows.py:44: error: Cannot find implementation or library stub for module named "win32gui" [import]
+ apprise/plugins/NotifyWindows.py:42: error: Library stubs not installed for "win32api" [import]
+ apprise/plugins/NotifyWindows.py:42: note: Hint: "python3 -m pip install types-pywin32"
+ apprise/plugins/NotifyWindows.py:43: error: Library stubs not installed for "win32con" [import]
+ apprise/plugins/NotifyWindows.py:44: error: Library stubs not installed for "win32gui" [import]
- apprise/plugins/NotifyMQTT.py:50: error: Cannot find implementation or library stub for module named "paho.mqtt.client" [import]
- apprise/plugins/NotifyMQTT.py:50: error: Cannot find implementation or library stub for module named "paho.mqtt" [import]
+ apprise/plugins/NotifyMQTT.py:50: error: Library stubs not installed for "paho.mqtt.client" [import]
+ apprise/plugins/NotifyMQTT.py:50: note: Hint: "python3 -m pip install types-paho-mqtt"
+ apprise/plugins/NotifyMQTT.py:50: note: (or run "mypy --install-types" to install all missing stub packages)
+ apprise/plugins/NotifyMQTT.py:50: error: Library stubs not installed for "paho.mqtt" [import]
comtypes (https://github.com/enthought/comtypes)
- comtypes/test/test_win32com_interop.py:13: error: Cannot find implementation or library stub for module named "pythoncom" [import]
+ comtypes/test/test_win32com_interop.py:13: error: Library stubs not installed for "pythoncom" [import]
- comtypes/test/test_win32com_interop.py:14: error: Cannot find implementation or library stub for module named "win32com.client" [import]
+ comtypes/test/test_win32com_interop.py:14: error: Library stubs not installed for "win32com.client" [import]
- comtypes/test/test_win32com_interop.py:14: error: Cannot find implementation or library stub for module named "win32com" [import]
+ comtypes/test/test_win32com_interop.py:14: error: Library stubs not installed for "win32com" [import]
- comtypes/test/test_safearray.py:239: error: Cannot find implementation or library stub for module named "pythoncom" [import]
+ comtypes/test/test_safearray.py:239: error: Library stubs not installed for "pythoncom" [import]
- comtypes/test/test_dispinterface.py:21: error: Cannot find implementation or library stub for module named "win32com.client.gencache" [import]
+ comtypes/test/test_dispinterface.py:21: error: Library stubs not installed for "win32com.client.gencache" [import]
- comtypes/test/test_dispinterface.py:47: error: Cannot find implementation or library stub for module named "win32com.client.dynamic" [import]
+ comtypes/test/test_dispinterface.py:47: error: Library stubs not installed for "win32com.client.dynamic" [import]
- comtypes/test/test_comserver.py:100: error: Cannot find implementation or library stub for module named "win32com.client" [import]
+ comtypes/test/test_comserver.py:100: error: Library stubs not installed for "win32com.client" [import]
+ comtypes/test/test_comserver.py:100: note: Hint: "python3 -m pip install types-pywin32"
+ comtypes/test/test_comserver.py:100: note: (or run "mypy --install-types" to install all missing stub packages)
prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/orion/utilities/encryption.py:7: error: Library stubs not installed for "cryptography.fernet" [import]
+ src/prefect/orion/utilities/encryption.py:7: error: Cannot find implementation or library stub for module named "cryptography.fernet" [import]
- src/prefect/orion/utilities/encryption.py:7: note: Hint: "python3 -m pip install types-cryptography"
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this!
I guess I have some vague concerns, but they all sort of boil down to "we should improve --install-types"
`atomicwrites` is archived and deprecated (refer python/mypy#14265 and python/typeshed#8925)
`atomicwrites` is archived and deprecated (refer python/mypy#14265 and python/typeshed#8925)
`types-atomicwrites` is archived and deprecated (refer python/mypy#14265 and python/typeshed#8925)
`types-atomicwrites` is archived and deprecated (refer python/mypy#14265 and python/typeshed#8925) Signed-off-by: Vikram Narayanan <vikram186@gmail.com>
`types-atomicwrites` is archived and deprecated (refer python/mypy#14265 and python/typeshed#8925) Signed-off-by: Vikram Narayanan <vikram186@gmail.com>
Removals from
stubinfo.py
:atomicwrites
is archived and deprecated at runtime; stubs were removed from typeshed in Remove stubs foratomicwrites
typeshed#8925attrs
has had inline types for a very long time nowchardet
recently cut a release with inline types; typeshed's stubs were marked obsolete in [stubsabot] Mark chardet as obsolete since 5.1.0 typeshed#9318cryptography
has had inline types for a very long time now; the only reason why it's still in typeshed is because other typeshed packages needtypes-cryptography
as a dependency, and our testing infrastructure therefore can't currently cope with it being removed from typeshed.emoji
recently cut a release bundling stubs with the runtime package; typeshed's stubs were marked obsolete in [stubsabot] Mark emoji as obsolete since 2.2.0 typeshed#9051termcolor
recently cut a release with inline types; typeshed's stubs were marked obsolete in [stubsabot] Mark termcolor as obsolete since 2.0.0 typeshed#8746prettytable
recently cut a release with inline types; typeshed's stubs were marked obsolete in [stubsabot] Mark prettytable as obsolete since 3.5.0 typeshed#9023Additions:
Xlib
were added in Added complete Xlib stubs typeshed#9279consolemenu
were added in Add type stubs for package console-menu. typeshed#8820dockerfile_parse
were added in Add stubs for dockerfile-parse typeshed#9305flask_migrate
were added in Add stubs for flask-migrate typeshed#8967paho.mqtt
were added in Add paho-mqtt stubs typeshed#8853pycocotools
were added in Add stubs for pycocotools typeshed#9086pywin32
modules were added in Addpywin32
type stubs from microsoft/python-type-stubs and mhammond/pywin32 typeshed#8825, and multiple follow-up PRspyscreeze
were added in Add pyscreeze stubs typeshed#8823