From 8e6b5162110419e3f114023d26573ea8e25ce29e Mon Sep 17 00:00:00 2001 From: Tian Gao Date: Thu, 17 Jul 2025 10:17:07 -0700 Subject: [PATCH 1/2] Use the standard audit event format for sys.monitoring docs --- Doc/library/sys.monitoring.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Doc/library/sys.monitoring.rst b/Doc/library/sys.monitoring.rst index 0674074b8c0df6..7f8a5619041c02 100644 --- a/Doc/library/sys.monitoring.rst +++ b/Doc/library/sys.monitoring.rst @@ -335,14 +335,13 @@ To register a callable for events call it is unregistered and returned. Otherwise :func:`register_callback` returns ``None``. + .. audit-event:: sys.monitoring.register_callback func sys.monitoring.register_callback Functions can be unregistered by calling ``sys.monitoring.register_callback(tool_id, event, None)``. Callback functions can be registered and unregistered at any time. -Registering or unregistering a callback function will generate a :func:`sys.audit` event. - Callback function arguments ''''''''''''''''''''''''''' From 180abe7fa4d5202d4ed27ac28a8d9568a3c1b905 Mon Sep 17 00:00:00 2001 From: Tian Gao Date: Thu, 17 Jul 2025 10:24:19 -0700 Subject: [PATCH 2/2] Update sys.monitoring.rst --- Doc/library/sys.monitoring.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Doc/library/sys.monitoring.rst b/Doc/library/sys.monitoring.rst index f8d45246f54ceb..0f986aa580b3c9 100644 --- a/Doc/library/sys.monitoring.rst +++ b/Doc/library/sys.monitoring.rst @@ -345,6 +345,7 @@ globally and locally. As such, if an event could be turned on for both global and local events by your code then the callback needs to be written to handle either trigger. + Callback function arguments '''''''''''''''''''''''''''