Skip to content

Commit 6971fed

Browse files
committed
back to tuple type
1 parent 16d3cc3 commit 6971fed

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

pymongo/network_layer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
_UNPACK_COMPRESSION_HEADER = struct.Struct("<iiB").unpack
6868
_POLL_TIMEOUT = 0.5
6969
# Errors raised by sockets (and TLS sockets) when in non-blocking mode.
70-
BLOCKING_IO_ERRORS = (BlockingIOError, BLOCKING_IO_LOOKUP_ERROR, *ssl_support.BLOCKING_IO_ERRORS)
70+
BLOCKING_IO_ERRORS = (BlockingIOError, *BLOCKING_IO_LOOKUP_ERROR, *ssl_support.BLOCKING_IO_ERRORS)
7171

7272

7373
# These socket-based I/O methods are for KMS requests and any other network operations that do not use

pymongo/ssl_support.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,16 @@
5757
if HAVE_PYSSL:
5858
PYSSLError: Any = _pyssl.SSLError
5959
BLOCKING_IO_ERRORS: tuple = _ssl.BLOCKING_IO_ERRORS + _pyssl.BLOCKING_IO_ERRORS
60-
BLOCKING_IO_READ_ERROR: Any = Union[
61-
_pyssl.BLOCKING_IO_READ_ERROR, _ssl.BLOCKING_IO_READ_ERROR
62-
]
63-
BLOCKING_IO_WRITE_ERROR: Any = Union[
64-
_pyssl.BLOCKING_IO_WRITE_ERROR, _ssl.BLOCKING_IO_WRITE_ERROR
65-
]
60+
BLOCKING_IO_READ_ERROR: tuple = (_pyssl.BLOCKING_IO_READ_ERROR, _ssl.BLOCKING_IO_READ_ERROR)
61+
BLOCKING_IO_WRITE_ERROR: tuple = (
62+
_pyssl.BLOCKING_IO_WRITE_ERROR,
63+
_ssl.BLOCKING_IO_WRITE_ERROR,
64+
)
6665
else:
6766
PYSSLError = _ssl.SSLError
6867
BLOCKING_IO_ERRORS = _ssl.BLOCKING_IO_ERRORS
69-
BLOCKING_IO_READ_ERROR = _ssl.BLOCKING_IO_READ_ERROR
70-
BLOCKING_IO_WRITE_ERROR = _ssl.BLOCKING_IO_WRITE_ERROR
68+
BLOCKING_IO_READ_ERROR = (_ssl.BLOCKING_IO_READ_ERROR,)
69+
BLOCKING_IO_WRITE_ERROR = (_ssl.BLOCKING_IO_WRITE_ERROR,)
7170
SSLError = _ssl.SSLError
7271
BLOCKING_IO_LOOKUP_ERROR = BLOCKING_IO_READ_ERROR
7372

0 commit comments

Comments
 (0)