From c42952aaa450012533137ceffc78c88ac4399381 Mon Sep 17 00:00:00 2001 From: Kumar Aditya Date: Sun, 13 Apr 2025 13:21:42 +0530 Subject: [PATCH 1/3] improve docs of loop.call_exception_handler --- Doc/library/asyncio-eventloop.rst | 3 +++ Lib/asyncio/base_events.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst index fae68803107639..176a8efd5fa7dd 100644 --- a/Doc/library/asyncio-eventloop.rst +++ b/Doc/library/asyncio-eventloop.rst @@ -1442,6 +1442,9 @@ Allows customizing how exceptions are handled in the event loop. * 'socket' (optional): :class:`socket.socket` instance; * 'asyncgen' (optional): Asynchronous generator that caused the exception. + * 'source_traceback' (optional): Traceback of the source; + * 'handle_traceback' (optional): Traceback of the handle; + .. note:: diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index 7b4e92aed682d5..675d75ac21123a 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -1881,6 +1881,8 @@ def call_exception_handler(self, context): - 'socket' (optional): Socket instance; - 'asyncgen' (optional): Asynchronous generator that caused the exception. + - 'source_traceback' (optional): Traceback of the source; + - 'handle_traceback' (optional): Traceback of the handle; New keys maybe introduced in the future. From f6375d2ad8b6ce8d96e9dd68f799ce1b15c44cef Mon Sep 17 00:00:00 2001 From: Kumar Aditya Date: Sun, 13 Apr 2025 13:23:44 +0530 Subject: [PATCH 2/3] fmt --- Doc/library/asyncio-eventloop.rst | 4 ++-- Lib/asyncio/base_events.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst index 176a8efd5fa7dd..7cb4d3c08c2639 100644 --- a/Doc/library/asyncio-eventloop.rst +++ b/Doc/library/asyncio-eventloop.rst @@ -1440,10 +1440,10 @@ Allows customizing how exceptions are handled in the event loop. * 'protocol' (optional): :ref:`Protocol ` instance; * 'transport' (optional): :ref:`Transport ` instance; * 'socket' (optional): :class:`socket.socket` instance; - * 'asyncgen' (optional): Asynchronous generator that caused - the exception. * 'source_traceback' (optional): Traceback of the source; * 'handle_traceback' (optional): Traceback of the handle; + * 'asyncgen' (optional): Asynchronous generator that caused + the exception. .. note:: diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py index 675d75ac21123a..29b872ce00ec81 100644 --- a/Lib/asyncio/base_events.py +++ b/Lib/asyncio/base_events.py @@ -1879,10 +1879,10 @@ def call_exception_handler(self, context): - 'protocol' (optional): Protocol instance; - 'transport' (optional): Transport instance; - 'socket' (optional): Socket instance; - - 'asyncgen' (optional): Asynchronous generator that caused - the exception. - 'source_traceback' (optional): Traceback of the source; - 'handle_traceback' (optional): Traceback of the handle; + - 'asyncgen' (optional): Asynchronous generator that caused + the exception. New keys maybe introduced in the future. From 4221dc7fe7db9891f4413d460ab93ad3b354b65a Mon Sep 17 00:00:00 2001 From: Kumar Aditya Date: Sun, 13 Apr 2025 14:38:42 +0530 Subject: [PATCH 3/3] nl --- Doc/library/asyncio-eventloop.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst index 7cb4d3c08c2639..8f561744fe4981 100644 --- a/Doc/library/asyncio-eventloop.rst +++ b/Doc/library/asyncio-eventloop.rst @@ -1445,7 +1445,6 @@ Allows customizing how exceptions are handled in the event loop. * 'asyncgen' (optional): Asynchronous generator that caused the exception. - .. note:: This method should not be overloaded in subclassed