diff --git a/stdlib/mmap.pyi b/stdlib/mmap.pyi index 093199806..9a213a8b8 100644 --- a/stdlib/mmap.pyi +++ b/stdlib/mmap.pyi @@ -28,7 +28,7 @@ if sys.platform != "win32": PROT_READ: int PROT_WRITE: int - PAGESIZE: int +PAGESIZE: int class mmap(Iterable[int], Sized): if sys.platform == "win32": diff --git a/stdlib/msvcrt.pyi b/stdlib/msvcrt.pyi index aa44a53c7..d41bfca21 100644 --- a/stdlib/msvcrt.pyi +++ b/stdlib/msvcrt.pyi @@ -1,8 +1,9 @@ import sys -from typing_extensions import Literal +from typing_extensions import Final, Literal # This module is only available on Windows if sys.platform == "win32": + CRT_ASSEMBLY_VERSION: Final[str] LK_UNLCK: Literal[0] LK_LOCK: Literal[1] LK_NBLCK: Literal[2] diff --git a/stdlib/signal.pyi b/stdlib/signal.pyi index 72c78f1b6..b0d1e4417 100644 --- a/stdlib/signal.pyi +++ b/stdlib/signal.pyi @@ -10,10 +10,8 @@ NSIG: int class Signals(IntEnum): SIGABRT: int - SIGEMT: int SIGFPE: int SIGILL: int - SIGINFO: int SIGINT: int SIGSEGV: int SIGTERM: int @@ -23,6 +21,8 @@ class Signals(IntEnum): CTRL_C_EVENT: int CTRL_BREAK_EVENT: int else: + SIGEMT: int + SIGINFO: int SIGALRM: int SIGBUS: int SIGCHLD: int @@ -77,10 +77,8 @@ else: def signal(__signalnum: _SIGNUM, __handler: _HANDLER) -> _HANDLER: ... SIGABRT: Signals -SIGEMT: Signals SIGFPE: Signals SIGILL: Signals -SIGINFO: Signals SIGINT: Signals SIGSEGV: Signals SIGTERM: Signals @@ -90,6 +88,8 @@ if sys.platform == "win32": CTRL_C_EVENT: Signals CTRL_BREAK_EVENT: Signals else: + SIGINFO: Signals + SIGEMT: Signals SIGALRM: Signals SIGBUS: Signals SIGCHLD: Signals diff --git a/stdlib/winsound.pyi b/stdlib/winsound.pyi index 9b2b57a38..aa04fdc27 100644 --- a/stdlib/winsound.pyi +++ b/stdlib/winsound.pyi @@ -4,6 +4,7 @@ from typing import overload from typing_extensions import Literal if sys.platform == "win32": + SND_APPLICATION: Literal[128] SND_FILENAME: Literal[131072] SND_ALIAS: Literal[65536] SND_LOOP: Literal[8] diff --git a/tests/stubtest_allowlists/win32.txt b/tests/stubtest_allowlists/win32.txt index e0f9d4d76..a556ceacf 100644 --- a/tests/stubtest_allowlists/win32.txt +++ b/tests/stubtest_allowlists/win32.txt @@ -1,16 +1,11 @@ ctypes.GetLastError # Is actually a pointer locale.[A-Z0-9_]+ # Constants that should be moved to _locale and re-exported conditionally locale.nl_langinfo # Function that should be moved to _locale and re-exported conditionally -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.text.dirname -msvcrt.CRT_ASSEMBLY_VERSION selectors.KqueueSelector -signal.SIGEMT -signal.SIGINFO -winsound.SND_APPLICATION # Exists at runtime, but missing from stubs _msi.MSIError