From b24a22c359ad0b49aca499360a20b38c7bd9fe9e Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Sun, 30 Oct 2022 16:42:32 +0300 Subject: [PATCH] asyncore: improve bytes handling (#9034) --- stdlib/asyncore.pyi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/asyncore.pyi b/stdlib/asyncore.pyi index 0025ec3f9..565deb4d1 100644 --- a/stdlib/asyncore.pyi +++ b/stdlib/asyncore.pyi @@ -1,5 +1,5 @@ import sys -from _typeshed import FileDescriptorLike +from _typeshed import FileDescriptorLike, ReadableBuffer from socket import socket from typing import Any, overload from typing_extensions import TypeAlias @@ -45,7 +45,7 @@ class dispatcher: def bind(self, addr: tuple[Any, ...] | str) -> None: ... def connect(self, address: tuple[Any, ...] | str) -> None: ... def accept(self) -> tuple[_Socket, Any] | None: ... - def send(self, data: bytes) -> int: ... + def send(self, data: ReadableBuffer) -> int: ... def recv(self, buffer_size: int) -> bytes: ... def close(self) -> None: ... def log(self, message: Any) -> None: ...