[ssl] Deprecate read and write methods (#15285)

This commit is contained in:
Semyon Moroz
2026-01-15 10:11:02 +00:00
committed by GitHub
parent 4372b1d733
commit 3ecbf2ff9b
+2
View File
@@ -291,7 +291,9 @@ class SSLSocket(socket.socket):
@overload
def sendto(self, data: ReadableBuffer, flags_or_addr: int, addr: socket._Address) -> int: ...
def shutdown(self, how: int) -> None: ...
@deprecated("Deprecated since Python 3.6. Use `SSLSocket.recv` method instead.")
def read(self, len: int = 1024, buffer: bytearray | None = None) -> bytes: ...
@deprecated("Deprecated since Python 3.6. Use `SSLSocket.send` method instead.")
def write(self, data: ReadableBuffer) -> int: ...
def do_handshake(self, block: bool = False) -> None: ... # block is undocumented
@overload