From dd4efac7d269feebc8fe9fc0e2c9bf02c28d462a Mon Sep 17 00:00:00 2001 From: Yuki Kobayashi Date: Tue, 17 Dec 2024 09:10:34 +0000 Subject: [PATCH 1/3] gh-118915: Add document of `PY_MONITORING_IS_INSTRUMENTED_EVENT` --- Doc/c-api/monitoring.rst | 6 ++++++ Doc/library/sys.monitoring.rst | 2 ++ 2 files changed, 8 insertions(+) diff --git a/Doc/c-api/monitoring.rst b/Doc/c-api/monitoring.rst index 51d866cfd47469..ccfb9def696689 100644 --- a/Doc/c-api/monitoring.rst +++ b/Doc/c-api/monitoring.rst @@ -190,3 +190,9 @@ would typically correspond to a python function. .. c:function:: int PyMonitoring_ExitScope(void) Exit the last scope that was entered with :c:func:`!PyMonitoring_EnterScope`. + + +.. c:function:: int PY_MONITORING_IS_INSTRUMENTED_EVENT(uint8_t ev) + + Return true if the event corresponding to event ID *ev* is + a :ref:`local event `. diff --git a/Doc/library/sys.monitoring.rst b/Doc/library/sys.monitoring.rst index f7140af2494898..3b016cedb48ef4 100644 --- a/Doc/library/sys.monitoring.rst +++ b/Doc/library/sys.monitoring.rst @@ -165,6 +165,8 @@ events, use the expression ``PY_RETURN | PY_START``. Events are divided into three groups: +.. _monitoring-event-local: + Local events '''''''''''' From 77cfaaa837109e380c28865781f0f62844a2a67a Mon Sep 17 00:00:00 2001 From: Yuki Kobayashi Date: Tue, 24 Dec 2024 19:44:56 +0900 Subject: [PATCH 2/3] Update monitoring.rst --- Doc/c-api/monitoring.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/c-api/monitoring.rst b/Doc/c-api/monitoring.rst index ccfb9def696689..0cdb4404c973be 100644 --- a/Doc/c-api/monitoring.rst +++ b/Doc/c-api/monitoring.rst @@ -194,5 +194,5 @@ would typically correspond to a python function. .. c:function:: int PY_MONITORING_IS_INSTRUMENTED_EVENT(uint8_t ev) - Return true if the event corresponding to event ID *ev* is + Return true if the event corresponding to the event ID *ev* is a :ref:`local event `. From c5d776ac08c94712cfb86b4301de6d3c6a03d44d Mon Sep 17 00:00:00 2001 From: Yuki Kobayashi Date: Tue, 11 Mar 2025 01:38:12 +0900 Subject: [PATCH 3/3] Update Doc/c-api/monitoring.rst Co-authored-by: Petr Viktorin --- Doc/c-api/monitoring.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Doc/c-api/monitoring.rst b/Doc/c-api/monitoring.rst index 0cdb4404c973be..d7b53ab8f23926 100644 --- a/Doc/c-api/monitoring.rst +++ b/Doc/c-api/monitoring.rst @@ -196,3 +196,9 @@ would typically correspond to a python function. Return true if the event corresponding to the event ID *ev* is a :ref:`local event `. + + .. versionadded:: 3.13 + + .. deprecated:: next + + This function is :term:`soft deprecated`.