mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Fix allowlist entries in asyncio.windows_events (#10824)
And fix the return value of return value of `IocpProactor.recvfrom_into()`, which was incorrect Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import socket
|
||||
import sys
|
||||
from _typeshed import Incomplete, WriteableBuffer
|
||||
from _typeshed import Incomplete, ReadableBuffer, WriteableBuffer
|
||||
from collections.abc import Callable
|
||||
from typing import IO, Any, ClassVar, NoReturn
|
||||
from typing_extensions import Literal
|
||||
@@ -48,6 +48,12 @@ if sys.platform == "win32":
|
||||
def select(self, timeout: int | None = None) -> list[futures.Future[Any]]: ...
|
||||
def recv(self, conn: socket.socket, nbytes: int, flags: int = 0) -> futures.Future[bytes]: ...
|
||||
def recv_into(self, conn: socket.socket, buf: WriteableBuffer, flags: int = 0) -> futures.Future[Any]: ...
|
||||
def recvfrom(
|
||||
self, conn: socket.socket, nbytes: int, flags: int = 0
|
||||
) -> futures.Future[tuple[bytes, socket._RetAddress]]: ...
|
||||
def sendto(
|
||||
self, conn: socket.socket, buf: ReadableBuffer, flags: int = 0, addr: socket._Address | None = None
|
||||
) -> futures.Future[int]: ...
|
||||
def send(self, conn: socket.socket, buf: WriteableBuffer, flags: int = 0) -> futures.Future[Any]: ...
|
||||
def accept(self, listener: socket.socket) -> futures.Future[Any]: ...
|
||||
def connect(
|
||||
@@ -63,7 +69,7 @@ if sys.platform == "win32":
|
||||
if sys.version_info >= (3, 11):
|
||||
def recvfrom_into(
|
||||
self, conn: socket.socket, buf: WriteableBuffer, flags: int = 0
|
||||
) -> tuple[int, socket._RetAddress]: ...
|
||||
) -> futures.Future[tuple[int, socket._RetAddress]]: ...
|
||||
SelectorEventLoop = _WindowsSelectorEventLoop
|
||||
|
||||
class WindowsSelectorEventLoopPolicy(events.BaseDefaultEventLoopPolicy):
|
||||
|
||||
@@ -10,10 +10,6 @@ _winapi.CreateFileMapping
|
||||
_winapi.MapViewOfFile
|
||||
_winapi.OpenFileMapping
|
||||
_winapi.VirtualQuerySize
|
||||
asyncio.IocpProactor.recvfrom
|
||||
asyncio.IocpProactor.sendto
|
||||
asyncio.windows_events.IocpProactor.recvfrom
|
||||
asyncio.windows_events.IocpProactor.sendto
|
||||
msvcrt.SetErrorMode
|
||||
ssl.SSLSocket.recvmsg
|
||||
ssl.SSLSocket.recvmsg_into
|
||||
|
||||
Reference in New Issue
Block a user