multiprocessing: improve bytes handling (#9085)

This commit is contained in:
Jelle Zijlstra
2022-11-04 02:58:58 -07:00
committed by GitHub
parent 3ac147cf67
commit 7299b07790

View File

@@ -1,7 +1,7 @@
import socket
import sys
import types
from _typeshed import Self
from _typeshed import ReadableBuffer, Self
from collections.abc import Iterable
from typing import Any, Union
from typing_extensions import SupportsIndex, TypeAlias
@@ -21,7 +21,7 @@ class _ConnectionBase:
def writable(self) -> bool: ... # undocumented
def fileno(self) -> int: ...
def close(self) -> None: ...
def send_bytes(self, buf: bytes, offset: int = ..., size: int | None = ...) -> None: ...
def send_bytes(self, buf: ReadableBuffer, offset: int = ..., size: int | None = ...) -> None: ...
def send(self, obj: Any) -> None: ...
def recv_bytes(self, maxlength: int | None = ...) -> bytes: ...
def recv_bytes_into(self, buf: Any, offset: int = ...) -> int: ...