Skip to content

Commit 99cb36a

Browse files
authored
pywin32: Complete modules using stubgen & stubtest (#8866)
Complete modules using stubgen & stubtest
1 parent 4579094 commit 99cb36a

File tree

197 files changed

+13514
-568
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+13514
-568
lines changed
Lines changed: 72 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,75 @@
11
# Not available at runtime. Contains type definitions that are otherwise not exposed
22
_win32typing
3-
win32comext.mapi.exchdapi
4-
win32.winxptheme
5-
win32.wincerapi
6-
7-
# incomplete
8-
pythoncom.*
3+
win32com(ext)?.mapi._exchdapi
4+
win32._wincerapi
5+
# PyWin tool / debugger
96
pythonwin.pywin.*
10-
win32.lib.pywintypes.*
11-
win32.lib.ntsecuritycon.*
12-
win32.lib.sspicon.*
13-
win32.lib.win2kras.*
14-
win32.lib.win32con.*
15-
win32.lib.win32cryptcon.*
16-
win32.lib.win32inetcon.*
17-
win32.lib.win32netcon.*
18-
win32.lib.winioctlcon.*
19-
win32.win32pdh.*
20-
win32.win32ras.*
21-
win32.win32wnet.*
22-
win32comext.adsi.*
23-
win32comext.mapi.exchange.*
24-
win32comext.shell.shell.*
25-
win32comext.directsound.directsound.*
26-
27-
win32comext.axdebug.axdebug
28-
win32comext.internet.internet
29-
win32comext.adsi.adsicon
30-
win32comext.axdebug.adb
31-
win32comext.axdebug.codecontainer
32-
win32comext.axdebug.contexts
33-
win32comext.axdebug.debugger
34-
win32comext.axdebug.documents
35-
win32comext.axdebug.dump
36-
win32comext.axdebug.expressions
37-
win32comext.axdebug.gateways
38-
win32comext.axdebug.stackframe
39-
win32comext.axdebug.util
40-
win32comext.axscript.asputil
41-
win32comext.axscript.client.*
42-
win32comext.axscript.server.*
43-
win32comext.directsound.test.*
44-
win32comext.ifilter.ifiltercon
45-
win32comext.internet.inetcon
46-
win32comext.mapi.emsabtags
47-
win32comext.mapi.mapitags
48-
win32comext.mapi.mapiutil
49-
win32comext.propsys.pscon
50-
win32comext.shell.shellcon
7+
win32com.client.combrowse
8+
win32com.client.tlbrowse
9+
# Utilities to generate python bindings
10+
win32com.client.build
11+
win32com.client.CLSIDToClass
12+
win32com.client.connect
13+
# Necessary for mypy to not throw AssertionError
14+
win32com.client.dynamic.*
15+
win32com.client.gencache
16+
win32com.client.genpy
17+
win32com.client.makepy
18+
win32com.client.selecttlb
19+
win32com.client.util
20+
win32com.makegw.*
21+
# COM object servers scripts
22+
win32com.server.factory
23+
win32com.server.localserver
24+
win32com.server.register
25+
win32com.servers.*
26+
# Active X Scripts
27+
win32com(ext)?.axscript.client.framework
28+
win32com(ext)?.axscript.client.pyscript_rexec
29+
# Necessary for mypy to not fail
30+
win32com(ext)?.axscript.client.pyscript.*
31+
win32com(ext)?.axscript.client.scriptdispatch
32+
# Other scripts
33+
isapi.install
34+
win32.scripts.*
35+
win32.lib.netbios
36+
win32.lib.sspi
37+
win32.lib.win32pdhutil
38+
win32.lib.win32rcparser
39+
win32.lib.win32serviceutil
40+
win32.lib.win32traceutil
41+
win32.lib.verstamp
42+
# Demos, tests and debugging
43+
win32.lib.pywin32_testutil
44+
win32.lib.rasutil
45+
win32.lib.win32gui_struct
46+
win32com.demos.*
47+
win32com.servers.test_pycomtest
48+
win32com.test.*
49+
win32com(ext)?.axdebug.codecontainer
50+
win32com(ext)?.axdebug.dump
51+
win32com(ext)?.axdebug.debugger
52+
win32com(ext)?.axscript.client.pydumper
53+
win32com(ext)?.directsound.test.*
54+
# Deprecated and obsolete
55+
pythoncom.MakeIID
56+
pythoncom.MakeTime
57+
win32.lib.dbi
58+
win32.lib.win32pdhquery.Query.addperfcounter
59+
win32.win32gui.PyMakeBuffer
60+
# Also a script
61+
win32.lib.regcheck
62+
# failed to import, ImportError: DLL load failed while importing axdebug: The specified module could not be found.
63+
# https://github.com/python/mypy/issues/13822
64+
win32com.axdebug.axdebug
65+
win32com(ext)?.axdebug.adb
66+
win32com(ext)?.axdebug.codecontainer
67+
# failed to import, SystemError: CoInternetCreateSecurityManager() method: bad call flags
68+
win32com(ext)?.internet.internet
69+
# failed to import, ModuleNotFoundError: No module named '...'
70+
win32com(ext)?.axdebug.contexts
71+
win32com(ext)?.axdebug.debugger
72+
win32com(ext)?.axdebug.documents
73+
win32com(ext)?.axdebug.expressions
74+
win32com(ext)?.axdebug.stackframe
75+
win32com(ext)?.axscript.client.debug

stubs/pywin32/METADATA.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
version = "304.*"
2-
32
[tool.stubtest]
43
# The library only works on Windows; we currently only run stubtest on Ubuntu for third-party stubs in CI.
54
# See #8660

stubs/pywin32/_win32typing.pyi

Lines changed: 101 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,99 @@
22
from _typeshed import Incomplete
33
from typing_extensions import final
44

5-
class PyDSCAPSType: ...
6-
class PyDSCBCAPSType: ...
7-
class PyDSCCAPSType: ...
8-
class PyNCB: ...
5+
class ArgNotFound: ...
6+
class PyOleEmpty: ...
7+
class PyOleMissing: ...
8+
class PyOleNothing: ...
9+
10+
class PyDSCAPSType:
11+
@property
12+
def dwFlags(self): ...
13+
@property
14+
def dwFreeHw3DAllBuffers(self): ...
15+
@property
16+
def dwFreeHw3DStaticBuffers(self): ...
17+
@property
18+
def dwFreeHw3DStreamingBuffers(self): ...
19+
@property
20+
def dwFreeHwMemBytes(self): ...
21+
@property
22+
def dwFreeHwMixingAllBuffers(self): ...
23+
@property
24+
def dwFreeHwMixingStaticBuffers(self): ...
25+
@property
26+
def dwFreeHwMixingStreamingBuffers(self): ...
27+
@property
28+
def dwMaxContigFreeHwMemBytes(self): ...
29+
@property
30+
def dwMaxHw3DAllBuffers(self): ...
31+
@property
32+
def dwMaxHw3DStaticBuffers(self): ...
33+
@property
34+
def dwMaxHw3DStreamingBuffers(self): ...
35+
@property
36+
def dwMaxHwMixingAllBuffers(self): ...
37+
@property
38+
def dwMaxHwMixingStaticBuffers(self): ...
39+
@property
40+
def dwMaxHwMixingStreamingBuffers(self): ...
41+
@property
42+
def dwMaxSecondarySampleRate(self): ...
43+
@property
44+
def dwMinSecondarySampleRate(self): ...
45+
@property
46+
def dwPlayCpuOverheadSwBuffers(self): ...
47+
@property
48+
def dwPrimaryBuffers(self): ...
49+
@property
50+
def dwTotalHwMemBytes(self): ...
51+
@property
52+
def dwUnlockTransferRateHwBuffers(self): ...
53+
54+
class PyDSCBCAPSType:
55+
@property
56+
def dwBufferBytes(self): ...
57+
@property
58+
def dwFlags(self): ...
59+
60+
class PyDSCCAPSType:
61+
@property
62+
def dwChannels(self): ...
63+
@property
64+
def dwFlags(self): ...
65+
@property
66+
def dwFormats(self): ...
67+
68+
@final
69+
class PyNCB:
70+
@property
71+
def Bufflen(self): ...
72+
@property
73+
def Callname(self): ...
74+
@property
75+
def Cmd_cplt(self): ...
76+
@property
77+
def Command(self): ...
78+
@property
79+
def Event(self): ...
80+
@property
81+
def Lana_num(self): ...
82+
@property
83+
def Lsn(self): ...
84+
@property
85+
def Name(self): ...
86+
@property
87+
def Num(self): ...
88+
@property
89+
def Post(self): ...
90+
def Reset(self, *args, **kwargs): ... # incomplete
91+
@property
92+
def Retcode(self): ...
93+
@property
94+
def Rto(self): ...
95+
@property
96+
def Sto(self): ...
97+
998
class COMMTIMEOUTS: ...
1099
class CopyProgressRoutine: ...
11100

@@ -1080,6 +1169,7 @@ class PyLUID_AND_ATTRIBUTES: ...
10801169
class PyLsaLogon_HANDLE: ...
10811170
class PyMSG: ...
10821171

1172+
@final
10831173
class PyNETRESOURCE:
10841174
@property
10851175
def dwScope(self) -> int: ...
@@ -1090,13 +1180,13 @@ class PyNETRESOURCE:
10901180
@property
10911181
def dwUsage(self) -> int: ...
10921182
@property
1093-
def localName(self) -> str: ...
1183+
def lpComment(self): ...
10941184
@property
1095-
def remoteName(self) -> str: ...
1185+
def lpLocalName(self): ...
10961186
@property
1097-
def comment(self) -> str: ...
1187+
def lpProvider(self): ...
10981188
@property
1099-
def provider(self) -> str: ...
1189+
def lpRemoteName(self): ...
11001190

11011191
class PyNET_VALIDATE_AUTHENTICATION_INPUT_ARG: ...
11021192
class PyNET_VALIDATE_PASSWORD_CHANGE_INPUT_ARG: ...
@@ -2617,11 +2707,11 @@ class PyDSBCAPS:
26172707
@property
26182708
def dwFlags(self) -> int: ...
26192709
@property
2620-
def nChannels(self) -> int: ...
2621-
@property
26222710
def dwUnlockTransferRate(self) -> int: ...
26232711
@property
2624-
def nAvgBytesPerSec(self) -> int: ...
2712+
def dwBufferBytes(self): ...
2713+
@property
2714+
def dwPlayCpuOverhead(self): ...
26252715

26262716
class PyDSBUFFERDESC:
26272717
@property

stubs/pywin32/afxres.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from win32.lib.afxres import *

stubs/pywin32/commctrl.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from win32.lib.commctrl import *

stubs/pywin32/dde.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from pythonwin.dde import *

stubs/pywin32/isapi/__init__.pyi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from _typeshed import Incomplete
2+
3+
class ISAPIError(Exception):
4+
errno: Incomplete
5+
strerror: Incomplete
6+
funcname: Incomplete
7+
def __init__(self, errno, strerror: Incomplete | None = ..., funcname: Incomplete | None = ...) -> None: ...
8+
9+
class FilterError(ISAPIError): ...
10+
class ExtensionError(ISAPIError): ...
11+
class InternalReloadException(Exception): ...

stubs/pywin32/isapi/isapicon.pyi

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
from _typeshed import Incomplete
2+
3+
HTTP_CONTINUE: int
4+
HTTP_SWITCHING_PROTOCOLS: int
5+
HTTP_PROCESSING: int
6+
HTTP_OK: int
7+
HTTP_CREATED: int
8+
HTTP_ACCEPTED: int
9+
HTTP_NON_AUTHORITATIVE: int
10+
HTTP_NO_CONTENT: int
11+
HTTP_RESET_CONTENT: int
12+
HTTP_PARTIAL_CONTENT: int
13+
HTTP_MULTI_STATUS: int
14+
HTTP_MULTIPLE_CHOICES: int
15+
HTTP_MOVED_PERMANENTLY: int
16+
HTTP_MOVED_TEMPORARILY: int
17+
HTTP_SEE_OTHER: int
18+
HTTP_NOT_MODIFIED: int
19+
HTTP_USE_PROXY: int
20+
HTTP_TEMPORARY_REDIRECT: int
21+
HTTP_BAD_REQUEST: int
22+
HTTP_UNAUTHORIZED: int
23+
HTTP_PAYMENT_REQUIRED: int
24+
HTTP_FORBIDDEN: int
25+
HTTP_NOT_FOUND: int
26+
HTTP_METHOD_NOT_ALLOWED: int
27+
HTTP_NOT_ACCEPTABLE: int
28+
HTTP_PROXY_AUTHENTICATION_REQUIRED: int
29+
HTTP_REQUEST_TIME_OUT: int
30+
HTTP_CONFLICT: int
31+
HTTP_GONE: int
32+
HTTP_LENGTH_REQUIRED: int
33+
HTTP_PRECONDITION_FAILED: int
34+
HTTP_REQUEST_ENTITY_TOO_LARGE: int
35+
HTTP_REQUEST_URI_TOO_LARGE: int
36+
HTTP_UNSUPPORTED_MEDIA_TYPE: int
37+
HTTP_RANGE_NOT_SATISFIABLE: int
38+
HTTP_EXPECTATION_FAILED: int
39+
HTTP_UNPROCESSABLE_ENTITY: int
40+
HTTP_INTERNAL_SERVER_ERROR: int
41+
HTTP_NOT_IMPLEMENTED: int
42+
HTTP_BAD_GATEWAY: int
43+
HTTP_SERVICE_UNAVAILABLE: int
44+
HTTP_GATEWAY_TIME_OUT: int
45+
HTTP_VERSION_NOT_SUPPORTED: int
46+
HTTP_VARIANT_ALSO_VARIES: int
47+
HSE_STATUS_SUCCESS: int
48+
HSE_STATUS_SUCCESS_AND_KEEP_CONN: int
49+
HSE_STATUS_PENDING: int
50+
HSE_STATUS_ERROR: int
51+
SF_NOTIFY_SECURE_PORT: int
52+
SF_NOTIFY_NONSECURE_PORT: int
53+
SF_NOTIFY_READ_RAW_DATA: int
54+
SF_NOTIFY_PREPROC_HEADERS: int
55+
SF_NOTIFY_AUTHENTICATION: int
56+
SF_NOTIFY_URL_MAP: int
57+
SF_NOTIFY_ACCESS_DENIED: int
58+
SF_NOTIFY_SEND_RESPONSE: int
59+
SF_NOTIFY_SEND_RAW_DATA: int
60+
SF_NOTIFY_LOG: int
61+
SF_NOTIFY_END_OF_REQUEST: int
62+
SF_NOTIFY_END_OF_NET_SESSION: int
63+
SF_NOTIFY_ORDER_HIGH: int
64+
SF_NOTIFY_ORDER_MEDIUM: int
65+
SF_NOTIFY_ORDER_LOW: int
66+
SF_NOTIFY_ORDER_DEFAULT: int
67+
SF_NOTIFY_ORDER_MASK: Incomplete
68+
SF_STATUS_REQ_FINISHED: int
69+
SF_STATUS_REQ_FINISHED_KEEP_CONN: Incomplete
70+
SF_STATUS_REQ_NEXT_NOTIFICATION: Incomplete
71+
SF_STATUS_REQ_HANDLED_NOTIFICATION: Incomplete
72+
SF_STATUS_REQ_ERROR: Incomplete
73+
SF_STATUS_REQ_READ_NEXT: Incomplete
74+
HSE_IO_SYNC: int
75+
HSE_IO_ASYNC: int
76+
HSE_IO_DISCONNECT_AFTER_SEND: int
77+
HSE_IO_SEND_HEADERS: int
78+
HSE_IO_NODELAY: int
79+
HSE_IO_FINAL_SEND: int
80+
HSE_IO_CACHE_RESPONSE: int
81+
HSE_EXEC_URL_NO_HEADERS: int
82+
HSE_EXEC_URL_IGNORE_CURRENT_INTERCEPTOR: int
83+
HSE_EXEC_URL_IGNORE_VALIDATION_AND_RANGE: int
84+
HSE_EXEC_URL_DISABLE_CUSTOM_ERROR: int
85+
HSE_EXEC_URL_SSI_CMD: int
86+
HSE_EXEC_URL_HTTP_CACHE_ELIGIBLE: int

stubs/pywin32/isapi/simple.pyi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
from _typeshed import Incomplete
2+
3+
class SimpleExtension:
4+
def GetExtensionVersion(self, vi) -> None: ...
5+
def HttpExtensionProc(self, control_block) -> None: ...
6+
def TerminateExtension(self, status) -> None: ...
7+
8+
class SimpleFilter:
9+
filter_flags: Incomplete
10+
def GetFilterVersion(self, fv) -> None: ...
11+
def HttpFilterProc(self, fc) -> None: ...
12+
def TerminateFilter(self, status) -> None: ...

0 commit comments

Comments
 (0)