diff --git a/stdlib/_msi.pyi b/stdlib/_msi.pyi index ffe53c819..9dda8a598 100644 --- a/stdlib/_msi.pyi +++ b/stdlib/_msi.pyi @@ -46,3 +46,43 @@ if sys.platform == "win32": def FCICreate(__cabname: str, __files: list[str]) -> None: ... def OpenDatabase(__path: str, __persist: int) -> _Database: ... def CreateRecord(__count: int) -> _Record: ... + + MSICOLINFO_NAMES: int + MSICOLINFO_TYPES: int + MSIDBOPEN_CREATE: int + MSIDBOPEN_CREATEDIRECT: int + MSIDBOPEN_DIRECT: int + MSIDBOPEN_PATCHFILE: int + MSIDBOPEN_READONLY: int + MSIDBOPEN_TRANSACT: int + MSIMODIFY_ASSIGN: int + MSIMODIFY_DELETE: int + MSIMODIFY_INSERT: int + MSIMODIFY_INSERT_TEMPORARY: int + MSIMODIFY_MERGE: int + MSIMODIFY_REFRESH: int + MSIMODIFY_REPLACE: int + MSIMODIFY_SEEK: int + MSIMODIFY_UPDATE: int + MSIMODIFY_VALIDATE: int + MSIMODIFY_VALIDATE_DELETE: int + MSIMODIFY_VALIDATE_FIELD: int + MSIMODIFY_VALIDATE_NEW: int + + PID_APPNAME: int + PID_AUTHOR: int + PID_CHARCOUNT: int + PID_CODEPAGE: int + PID_COMMENTS: int + PID_CREATE_DTM: int + PID_KEYWORDS: int + PID_LASTAUTHOR: int + PID_LASTPRINTED: int + PID_LASTSAVE_DTM: int + PID_PAGECOUNT: int + PID_REVNUMBER: int + PID_SECURITY: int + PID_SUBJECT: int + PID_TEMPLATE: int + PID_TITLE: int + PID_WORDCOUNT: int diff --git a/stdlib/msilib/__init__.pyi b/stdlib/msilib/__init__.pyi index 3b4b5ca8a..0e18350b2 100644 --- a/stdlib/msilib/__init__.pyi +++ b/stdlib/msilib/__init__.pyi @@ -5,13 +5,8 @@ from typing import Any from typing_extensions import Literal if sys.platform == "win32": - from _msi import ( - CreateRecord as CreateRecord, - FCICreate as FCICreate, - OpenDatabase as OpenDatabase, - UuidCreate as UuidCreate, - _Database, - ) + from _msi import * + from _msi import _Database AMD64: bool Win64: bool diff --git a/stdlib/msvcrt.pyi b/stdlib/msvcrt.pyi index 35841c62f..0bea8ce22 100644 --- a/stdlib/msvcrt.pyi +++ b/stdlib/msvcrt.pyi @@ -8,6 +8,10 @@ if sys.platform == "win32": LK_NBLCK: Literal[2] LK_RLCK: Literal[3] LK_NBRLCK: Literal[4] + SEM_FAILCRITICALERRORS: int + SEM_NOALIGNMENTFAULTEXCEPT: int + SEM_NOGPFAULTERRORBOX: int + SEM_NOOPENFILEERRORBOX: int def locking(__fd: int, __mode: int, __nbytes: int) -> None: ... def setmode(__fd: int, __mode: int) -> int: ... def open_osfhandle(__handle: int, __flags: int) -> int: ... diff --git a/tests/stubtest_allowlists/win32.txt b/tests/stubtest_allowlists/win32.txt index 93ddfa640..5f33df8f7 100644 --- a/tests/stubtest_allowlists/win32.txt +++ b/tests/stubtest_allowlists/win32.txt @@ -1,5 +1,3 @@ -_msi.MSI[A-Z_]+ -_msi.PID_[A-Z_]+ ctypes.GetLastError # Is actually a pointer distutils.archive_util.getgrnam distutils.archive_util.getpwnam @@ -10,11 +8,8 @@ mmap.PAGESIZE # alias for a class defined elsewhere, # mypy infers the variable has type `(*args) -> DupHandle` but stubtest infers the runtime type as multiprocessing.reduction.AbstractReducer.DupHandle -msilib.MSI[A-Z_]+ msilib.text.dirname -msilib.PID_[A-Z_]+ msvcrt.CRT_ASSEMBLY_VERSION -msvcrt.SEM_[A-Z]+ selectors.KqueueSelector signal.SIGEMT signal.SIGINFO