diff --git a/stubs/pywin32/@tests/stubtest_allowlist_win32.txt b/stubs/pywin32/@tests/stubtest_allowlist_win32.txt index 66ee3be5e..bfd884311 100644 --- a/stubs/pywin32/@tests/stubtest_allowlist_win32.txt +++ b/stubs/pywin32/@tests/stubtest_allowlist_win32.txt @@ -55,6 +55,8 @@ pythoncom.MakeTime # Deprecated and makes a buffer of random junk. Use something like `b"\x00" * bufferSize` instead (win32.)?win(32|xp)gui.PyMakeBuffer +# Axdebug is not built on Python 3.11 anyway: https://github.com/mhammond/pywin32/blob/main/setup.py#L403-L405 +# # failed to import, ImportError: DLL load failed while importing axdebug: The specified module could not be found. win32com.axdebug.axdebug win32com(ext)?.axdebug.codecontainer @@ -66,7 +68,6 @@ win32com(ext)?.axdebug.documents win32com(ext)?.axdebug.expressions # failed to import, ModuleNotFoundError: No module named 'expressions' win32com(ext)?.axdebug.stackframe -# Axdebug is not built on Python 3.11: https://github.com/mhammond/pywin32/blob/main/setup.py#L405 # failed to import, ImportError: cannot import name 'axdebug' from 'win32com.axdebug' win32com.axdebug.gateways win32comext.axdebug.gateways diff --git a/stubs/pywin32/pythoncom.pyi b/stubs/pywin32/pythoncom.pyi index 5c50fc945..2f643fdce 100644 --- a/stubs/pywin32/pythoncom.pyi +++ b/stubs/pywin32/pythoncom.pyi @@ -1,6 +1,3 @@ -# Can't generate with stubgen because: -# "Critical error during semantic analysis: mypy: can't decode file '.venv\Lib\site-packages\pywin32_system32\pythoncom39.dll': 'utf-8' codec can't decode byte 0x90 in position 2: invalid start byte" -# https://github.com/python/mypy/issues/13822 from _typeshed import Incomplete from typing_extensions import TypeAlias @@ -44,11 +41,13 @@ def CoRevokeClassObject(reg, /) -> None: ... def CoTreatAsClass(clsidold: _win32typing.PyIID, clsidnew: _win32typing.PyIID, /) -> None: ... def CoWaitForMultipleHandles(Flags, Timeout, Handles: list[int], /): ... def Connect(cls, /) -> _win32typing.PyIDispatch: ... +def connect(*args): ... # incomplete def CreateGuid() -> _win32typing.PyIID: ... def CreateBindCtx() -> _win32typing.PyIBindCtx: ... def CreateFileMoniker(filename: str, /) -> _win32typing.PyIMoniker: ... def CreateItemMoniker(delim: str, item: str, /) -> _win32typing.PyIMoniker: ... def CreatePointerMoniker(IUnknown: _win32typing.PyIUnknown, /) -> _win32typing.PyIMoniker: ... +def CreateURLMonikerEx(*args): ... # incomplete def CreateTypeLib(): ... def CreateTypeLib2(): ... def CreateStreamOnHGlobal(hGlobal: int | None = ..., DeleteOnRelease: bool = ..., /) -> _win32typing.PyIStream: ... @@ -73,6 +72,7 @@ def MakePyFactory(iid: _win32typing.PyIID, /) -> _win32typing.PyIClassFactory: . def MkParseDisplayName( displayName: str, bindCtx: _win32typing.PyIBindCtx | None = ..., / ) -> tuple[_win32typing.PyIMoniker, Incomplete, _win32typing.PyIBindCtx]: ... +def new(iid: _win32typing.PyIID | str, /): ... def New(cls, /) -> _win32typing.PyIDispatch: ... def ObjectFromAddress(address, iid: _win32typing.PyIID, /) -> _win32typing.PyIUnknown: ... def ObjectFromLresult(lresult, iid: _win32typing.PyIID, wparm, /) -> _win32typing.PyIUnknown: ... @@ -137,8 +137,6 @@ def CoGetCancelObject(riid: _win32typing.PyIID, ThreadID: int = ..., /) -> _win3 def CoSetCancelObject(Unk: _win32typing.PyIUnknown, /) -> None: ... def CoEnableCallCancellation() -> None: ... def CoDisableCallCancellation() -> None: ... -def CreateURLMonikerEx(*args): ... # incomplete -def new(iid: _win32typing.PyIID | str, /): ... ACTIVEOBJECT_STRONG: int ACTIVEOBJECT_WEAK: int @@ -159,7 +157,6 @@ COINIT_MULTITHREADED: int COINIT_SPEED_OVER_MEMORY: int COWAIT_ALERTABLE: int COWAIT_WAITALL: int - DATADIR_GET: int DATADIR_SET: int DESCKIND_FUNCDESC: int @@ -448,8 +445,6 @@ VT_VARIANT: int VT_VECTOR: int VT_VOID: int -def connect(*args): ... # incomplete - dcom: int fdexNameCaseInsensitive: int fdexNameCaseSensitive: int diff --git a/stubs/pywin32/win32comext/axdebug/axdebug.pyi b/stubs/pywin32/win32comext/axdebug/axdebug.pyi index d49581ac7..93651135c 100644 --- a/stubs/pywin32/win32comext/axdebug/axdebug.pyi +++ b/stubs/pywin32/win32comext/axdebug/axdebug.pyi @@ -1,8 +1,11 @@ # Can't generate with stubgen because: # "ImportError: DLL load failed while importing axdebug: The specified module could not be found." -# https://github.com/python/mypy/issues/13822 import _win32typing +def GetStackAddress(*args): ... # incomplete +def GetThreadStateHandle(*args): ... # incomplete +def SetThreadStateTrace(*args): ... # incomplete + APPBREAKFLAG_DEBUGGER_BLOCK: int APPBREAKFLAG_DEBUGGER_HALT: int APPBREAKFLAG_STEP: int @@ -75,9 +78,6 @@ APPBREAKFLAG_STEPTYPE_MACHINE: int APPBREAKFLAG_STEPTYPE_MASK: int APPBREAKFLAG_STEPTYPE_SOURCE: int -def GetStackAddress(*args): ... # incomplete -def GetThreadStateHandle(*args): ... # incomplete - IID_IActiveScriptDebug: _win32typing.PyIID IID_IActiveScriptErrorDebug: _win32typing.PyIID IID_IActiveScriptSiteDebug: _win32typing.PyIID @@ -120,5 +120,3 @@ IID_IProvideExpressionContexts: _win32typing.PyIID IID_IRemoteDebugApplication: _win32typing.PyIID IID_IRemoteDebugApplicationEvents: _win32typing.PyIID IID_IRemoteDebugApplicationThread: _win32typing.PyIID - -def SetThreadStateTrace(*args): ... # incomplete