From 3df5d0f036f8ff77672bd1d4fd473f5ce816ac6c Mon Sep 17 00:00:00 2001 From: Andrew Svetlov Date: Wed, 16 Jan 2019 09:56:29 +0200 Subject: [PATCH] Dont log exception traceback when TimeoutError is occurred in asyncio transports --- Lib/asyncio/base_events.py | 3 ++- .../next/Library/2019-01-16-09-55-05.bpo-34148.J5A1QC.rst | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Library/2019-01-16-09-55-05.bpo-34148.J5A1QC.rst diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index cec47ce67f3824..ea828c177285e9 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -59,7 +59,8 @@ # Exceptions which must not call the exception handler in fatal error # methods (_fatal_error()) _FATAL_ERROR_IGNORE = (BrokenPipeError, - ConnectionResetError, ConnectionAbortedError) + ConnectionResetError, ConnectionAbortedError, + TimeoutError) if ssl is not None: _FATAL_ERROR_IGNORE = _FATAL_ERROR_IGNORE + (ssl.SSLCertVerificationError,) diff --git a/Misc/NEWS.d/next/Library/2019-01-16-09-55-05.bpo-34148.J5A1QC.rst b/Misc/NEWS.d/next/Library/2019-01-16-09-55-05.bpo-34148.J5A1QC.rst new file mode 100644 index 00000000000000..463fe459857d87 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-01-16-09-55-05.bpo-34148.J5A1QC.rst @@ -0,0 +1,2 @@ +Don't log exception traceback when :exc:`TimeoutError` is occurred in +asyncio transport.