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
11 changes: 0 additions & 11 deletions stdlib/@tests/stubtest_allowlists/win32.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
# ============================================
# TODO: Allowlist entries that should be fixed
# ============================================

# Exists at runtime, but missing from stubs
_winapi.CreateFileMapping
_winapi.MapViewOfFile
_winapi.OpenFileMapping
_winapi.VirtualQuerySize


# ============================================
# Modules that do not exist on Windows systems
# ============================================
Expand Down
9 changes: 9 additions & 0 deletions stdlib/_winapi.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ if sys.platform == "win32":
template_file: int,
/,
) -> int: ...
def CreateFileMapping(
file_handle: int, security_attributes: int, protect: int, max_size_high: int, max_size_low: int, name: str, /
) -> int: ...
def CreateJunction(src_path: str, dst_path: str, /) -> None: ...
def CreateNamedPipe(
name: str,
Expand Down Expand Up @@ -235,6 +238,9 @@ if sys.platform == "win32":
def GetModuleFileName(module_handle: int, /) -> str: ...
def GetStdHandle(std_handle: int, /) -> int: ...
def GetVersion() -> int: ...
def MapViewOfFile(
file_map: int, desired_access: int, file_offset_high: int, file_offset_low: int, number_bytes: int, /
) -> int: ...
def OpenProcess(desired_access: int, inherit_handle: bool, process_id: int, /) -> int: ...
def PeekNamedPipe(handle: int, size: int = 0, /) -> tuple[int, int] | tuple[bytes, int, int]: ...
if sys.version_info >= (3, 10):
Expand All @@ -251,6 +257,7 @@ if sys.platform == "win32":
named_pipe: int, mode: int | None, max_collection_count: int | None, collect_data_timeout: int | None, /
) -> None: ...
def TerminateProcess(handle: int, exit_code: int, /) -> None: ...
def VirtualQuerySize(address: int, /) -> int: ...
def WaitForMultipleObjects(handle_seq: Sequence[int], wait_flag: bool, milliseconds: int = 0xFFFFFFFF, /) -> int: ...
def WaitForSingleObject(handle: int, milliseconds: int, /) -> int: ...
def WaitNamedPipe(name: str, timeout: int, /) -> None: ...
Expand Down Expand Up @@ -281,6 +288,8 @@ if sys.platform == "win32":
def ResetEvent(event: int) -> None: ...
def SetEvent(event: int) -> None: ...

def OpenFileMapping(desired_access: int, inherit_handle: bool, name: str, /) -> int: ...

if sys.version_info >= (3, 12):
def CopyFile2(existing_file_name: str, new_file_name: str, flags: int, progress_routine: int | None = None) -> int: ...
def NeedCurrentDirectoryForExePath(exe_name: str, /) -> bool: ...