mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-25 05:11:09 +08:00
Add a few missing things on Windows, py310+ (#10817)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
# Exists at runtime, but missing from stubs
|
||||
msvcrt.GetErrorMode
|
||||
|
||||
# pathlib methods that exist on Windows, but always raise NotImplementedError,
|
||||
# so are omitted from the stub
|
||||
pathlib.Path.is_mount
|
||||
|
||||
@@ -1,8 +1,3 @@
|
||||
# Exists at runtime, missing from the stubs
|
||||
asyncio.IocpProactor.recvfrom_into
|
||||
asyncio.windows_events.IocpProactor.recvfrom_into
|
||||
msvcrt.GetErrorMode
|
||||
|
||||
# pathlib methods that exist on Windows, but always raise NotImplementedError,
|
||||
# so are omitted from the stub
|
||||
pathlib.Path.is_mount
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
_winapi.NeedCurrentDirectoryForExePath
|
||||
asyncio.IocpProactor.finish_socket_func
|
||||
asyncio.IocpProactor.recvfrom_into
|
||||
asyncio.windows_events.IocpProactor.finish_socket_func
|
||||
asyncio.windows_events.IocpProactor.recvfrom_into
|
||||
msvcrt.GetErrorMode
|
||||
# CPython bug; waiting on https://github.com/python/cpython/pull/109790 to be backported
|
||||
ntpath.isdir
|
||||
os.path.isdir
|
||||
|
||||
# Undocumented internal method, not really for public consumption.
|
||||
# (Hard to add types for unless we add stubs for the undocumented _overlapped module...)
|
||||
asyncio.IocpProactor.finish_socket_func
|
||||
asyncio.windows_events.IocpProactor.finish_socket_func
|
||||
|
||||
Reference in New Issue
Block a user