Add a few missing things on Windows, py310+ (#10817)

This commit is contained in:
Alex Waygood
2023-10-01 23:30:44 +01:00
committed by GitHub
parent 3eb9ff7f65
commit efa7a51d09
6 changed files with 13 additions and 14 deletions

View File

@@ -255,3 +255,4 @@ if sys.platform == "win32":
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: ...

View File

@@ -60,6 +60,10 @@ if sys.platform == "win32":
async def connect_pipe(self, address: str) -> windows_utils.PipeHandle: ...
def wait_for_handle(self, handle: windows_utils.PipeHandle, timeout: int | None = None) -> bool: ...
def close(self) -> None: ...
if sys.version_info >= (3, 11):
def recvfrom_into(
self, conn: socket.socket, buf: WriteableBuffer, flags: int = 0
) -> tuple[int, socket._RetAddress]: ...
SelectorEventLoop = _WindowsSelectorEventLoop
class WindowsSelectorEventLoopPolicy(events.BaseDefaultEventLoopPolicy):

View File

@@ -26,3 +26,5 @@ if sys.platform == "win32":
def ungetch(__char: bytes | bytearray) -> None: ...
def ungetwch(__unicode_char: str) -> None: ...
def heapmin() -> None: ...
if sys.version_info >= (3, 10):
def GetErrorMode() -> int: ... # undocumented