Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion stubs/pywin32/@tests/stubtest_allowlist_win32.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
11 changes: 3 additions & 8 deletions stubs/pywin32/pythoncom.pyi
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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: ...
Expand All @@ -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: ...
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -448,8 +445,6 @@ VT_VARIANT: int
VT_VECTOR: int
VT_VOID: int

def connect(*args): ... # incomplete

dcom: int
fdexNameCaseInsensitive: int
fdexNameCaseSensitive: int
Expand Down
10 changes: 4 additions & 6 deletions stubs/pywin32/win32comext/axdebug/axdebug.pyi
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -120,5 +120,3 @@ IID_IProvideExpressionContexts: _win32typing.PyIID
IID_IRemoteDebugApplication: _win32typing.PyIID
IID_IRemoteDebugApplicationEvents: _win32typing.PyIID
IID_IRemoteDebugApplicationThread: _win32typing.PyIID

def SetThreadStateTrace(*args): ... # incomplete