Skip to content

Commit 8a2d915

Browse files
committed
@ B Fix MRO errors for TimeoutError under py311
1 parent 4840eb2 commit 8a2d915

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bravado/http_future.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ def _raise_error(self, base_exception_class, class_name_suffix, exception):
8484

8585
def _raise_timeout_error(self, exception):
8686
# type: (BaseException) -> typing.NoReturn
87+
88+
# CORESERV-13799
89+
# In py3.11, concurrent.future.TimeoutError is aliased to TimeoutError
90+
# If a future adapter throws TimeoutError, we can directly raise BravadoTimeError
91+
if isinstance(exception, TimeoutError):
92+
raise BravadoTimeoutError()
8793
self._raise_error(BravadoTimeoutError, 'Timeout', exception)
8894

8995
def _raise_connection_error(self, exception):

0 commit comments

Comments
 (0)