Skip to content

Commit 01fde84

Browse files
committed
Document socket.timeout as OSError subclass and TimeoutError alias
socket.timeout has been a subclass of OSError since Python 3.3 and a deprecated alias of TimeoutError since Python 3.10.
1 parent 809dd22 commit 01fde84

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

cheroot/connections.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ def _accept_conn(self, server_socket):
370370
"""Accept the connection."""
371371
try:
372372
sock, addr = server_socket.accept()
373+
# socket.timeout: OSError subclass (3.3+), TimeoutError alias (3.10+)
373374
except socket.timeout:
374375
return None
375376
except OSError as exc:

0 commit comments

Comments
 (0)