Skip to content

Commit d45ec1a

Browse files
committed
[ssl] Deprecate read and write methods
Docs: https://docs.python.org/dev/library/ssl.html#ssl.SSLSocket.read
1 parent 4685e27 commit d45ec1a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stdlib/ssl.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,9 @@ class SSLSocket(socket.socket):
291291
@overload
292292
def sendto(self, data: ReadableBuffer, flags_or_addr: int, addr: socket._Address) -> int: ...
293293
def shutdown(self, how: int) -> None: ...
294+
@deprecated("Deprecated since Python 3.6. Use `SSLSocket.recv` method instead.")
294295
def read(self, len: int = 1024, buffer: bytearray | None = None) -> bytes: ...
296+
@deprecated("Deprecated since Python 3.6. Use `SSLSocket.send` method instead.")
295297
def write(self, data: ReadableBuffer) -> int: ...
296298
def do_handshake(self, block: bool = False) -> None: ... # block is undocumented
297299
@overload

0 commit comments

Comments
 (0)