[7.x] Reraise RecursionError in Transport.perform_request()
This commit is contained in:
@@ -303,10 +303,9 @@ class AIOHttpConnection(AsyncConnection):
|
||||
raw_data = await response.text()
|
||||
duration = self.loop.time() - start
|
||||
|
||||
# We want to reraise a cancellation.
|
||||
except asyncio.CancelledError:
|
||||
# We want to reraise a cancellation or recursion error.
|
||||
except (asyncio.CancelledError, RecursionError):
|
||||
raise
|
||||
|
||||
except Exception as e:
|
||||
self.log_request_fail(
|
||||
method,
|
||||
|
||||
@@ -166,6 +166,8 @@ class RequestsHttpConnection(Connection):
|
||||
response = self.session.send(prepared_request, **send_kwargs)
|
||||
duration = time.time() - start
|
||||
raw_data = response.content.decode("utf-8", "surrogatepass")
|
||||
except RecursionError:
|
||||
raise
|
||||
except Exception as e:
|
||||
self.log_request_fail(
|
||||
method,
|
||||
|
||||
@@ -253,6 +253,8 @@ class Urllib3HttpConnection(Connection):
|
||||
)
|
||||
duration = time.time() - start
|
||||
raw_data = response.data.decode("utf-8", "surrogatepass")
|
||||
except RecursionError:
|
||||
raise
|
||||
except Exception as e:
|
||||
self.log_request_fail(
|
||||
method, full_url, url, orig_body, time.time() - start, exception=e
|
||||
|
||||
Reference in New Issue
Block a user