Skip to content

Commit e1639ad

Browse files
committed
1 parent 2712bc5 commit e1639ad

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

stdlib/@tests/stubtest_allowlists/win32.txt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
# ============================================
2-
# TODO: Allowlist entries that should be fixed
3-
# ============================================
4-
5-
# Exists at runtime, but missing from stubs
6-
_winapi.CreateFileMapping
7-
_winapi.MapViewOfFile
8-
_winapi.OpenFileMapping
9-
_winapi.VirtualQuerySize
10-
11-
121
# ============================================
132
# Modules that do not exist on Windows systems
143
# ============================================

stdlib/_winapi.pyi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ if sys.platform == "win32":
192192
template_file: int,
193193
/,
194194
) -> int: ...
195+
def CreateFileMapping(
196+
file_handle: int, security_attributes: int, protect: int, max_size_high: int, max_size_low: int, name: str, /
197+
) -> int: ...
195198
def CreateJunction(src_path: str, dst_path: str, /) -> None: ...
196199
def CreateNamedPipe(
197200
name: str,
@@ -235,6 +238,9 @@ if sys.platform == "win32":
235238
def GetModuleFileName(module_handle: int, /) -> str: ...
236239
def GetStdHandle(std_handle: int, /) -> int: ...
237240
def GetVersion() -> int: ...
241+
def MapViewOfFile(
242+
file_map: int, desired_access: int, file_offset_high: int, file_offset_low: int, number_bytes: int, /
243+
) -> int: ...
238244
def OpenProcess(desired_access: int, inherit_handle: bool, process_id: int, /) -> int: ...
239245
def PeekNamedPipe(handle: int, size: int = 0, /) -> tuple[int, int] | tuple[bytes, int, int]: ...
240246
if sys.version_info >= (3, 10):
@@ -251,6 +257,7 @@ if sys.platform == "win32":
251257
named_pipe: int, mode: int | None, max_collection_count: int | None, collect_data_timeout: int | None, /
252258
) -> None: ...
253259
def TerminateProcess(handle: int, exit_code: int, /) -> None: ...
260+
def VirtualQuerySize(address: int, /) -> int: ...
254261
def WaitForMultipleObjects(handle_seq: Sequence[int], wait_flag: bool, milliseconds: int = 0xFFFFFFFF, /) -> int: ...
255262
def WaitForSingleObject(handle: int, milliseconds: int, /) -> int: ...
256263
def WaitNamedPipe(name: str, timeout: int, /) -> None: ...
@@ -281,6 +288,8 @@ if sys.platform == "win32":
281288
def ResetEvent(event: int) -> None: ...
282289
def SetEvent(event: int) -> None: ...
283290

291+
def OpenFileMapping(desired_access: int, inherit_handle: bool, name: str, /) -> int: ...
292+
284293
if sys.version_info >= (3, 12):
285294
def CopyFile2(existing_file_name: str, new_file_name: str, flags: int, progress_routine: int | None = None) -> int: ...
286295
def NeedCurrentDirectoryForExePath(exe_name: str, /) -> bool: ...

0 commit comments

Comments
 (0)