bpo-37390: Add audit event table to documentations (GH-14406)
Also updates some (unreleased) event names to be consistent with the others.
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index ea1f358..131aea0 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -86,6 +86,9 @@
The native equivalent of this function is :c:func:`PySys_Audit`. Using the
native function is preferred when possible.
+ See the :ref:`audit events table <audit-events>` for all events raised by
+ ``CPython``.
+
.. versionadded:: 3.8
@@ -166,7 +169,7 @@
This function should be used for internal and specialized purposes only.
- .. audit-event:: sys._current_frames
+ .. audit-event:: sys._current_frames "" sys._current_frames
.. function:: breakpointhook()
@@ -667,7 +670,7 @@
that is deeper than the call stack, :exc:`ValueError` is raised. The default
for *depth* is zero, returning the frame at the top of the call stack.
- .. audit-event:: sys._getframe
+ .. audit-event:: sys._getframe "" sys._getframe
.. impl-detail::
@@ -1167,7 +1170,7 @@
``'return'``, ``'c_call'``, ``'c_return'``, or ``'c_exception'``. *arg* depends
on the event type.
- .. audit-event:: sys.setprofile
+ .. audit-event:: sys.setprofile "" sys.setprofile
The events have the following meaning:
@@ -1289,7 +1292,7 @@
For more information on code and frame objects, refer to :ref:`types`.
- .. audit-event:: sys.settrace
+ .. audit-event:: sys.settrace "" sys.settrace
.. impl-detail::
@@ -1311,9 +1314,9 @@
first time. The *finalizer* will be called when an asynchronous generator
is about to be garbage collected.
- .. audit-event:: sys.set_asyncgen_hooks_firstiter
+ .. audit-event:: sys.set_asyncgen_hooks_firstiter "" sys.set_asyncgen_hooks
- .. audit-event:: sys.set_asyncgen_hooks_finalizer
+ .. audit-event:: sys.set_asyncgen_hooks_finalizer "" sys.set_asyncgen_hooks
Two auditing events are raised because the underlying API consists of two
calls, each of which must raise its own event.