summaryrefslogtreecommitdiffstats
path: root/Doc/library/sys.rst
diff options
context:
space:
mode:
authorMiss Skeleton (bot) <31488909+miss-islington@users.noreply.github.com>2019-10-26 20:09:35 (GMT)
committerGitHub <noreply@github.com>2019-10-26 20:09:35 (GMT)
commit11f0f11c4859f5ca201cd40b379b13c65f05ec91 (patch)
treed0587370cf024203e1bcc4cff1cd47bf540374f2 /Doc/library/sys.rst
parent4992dc6610fb354e36c0012a47ea9613b61c9038 (diff)
downloadcpython-11f0f11c4859f5ca201cd40b379b13c65f05ec91.zip
cpython-11f0f11c4859f5ca201cd40b379b13c65f05ec91.tar.gz
cpython-11f0f11c4859f5ca201cd40b379b13c65f05ec91.tar.bz2
bpo-38434: Fixes some audit event documentation (GH-16932)
(cherry picked from commit 894e30ce0bcc1c509eb01c8ffa9ba6d7701aeaaf) Co-authored-by: Steve Dower <steve.dower@python.org>
Diffstat (limited to 'Doc/library/sys.rst')
-rw-r--r--Doc/library/sys.rst19
1 files changed, 11 insertions, 8 deletions
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index a698ecb..34b8084 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -33,18 +33,21 @@ always available.
tuple of arguments. Native hooks added by :c:func:`PySys_AddAuditHook` are
called first, followed by hooks added in the current interpreter.
- Calling this function will trigger an event for all existing hooks, and if
- any raise an exception derived from :class:`Exception`, the add will be
- silently ignored. As a result, callers cannot assume that their hook has been
- added unless they control all existing hooks.
+ .. audit-event:: sys.addaudithook "" sys.addaudithook
+
+ Raises a auditing event ``sys.addaudithook`` with no arguments. If any
+ existing hooks raise an exception derived from :class:`Exception`, the
+ new hook will not be added and the exception suppressed. As a result,
+ callers cannot assume that their hook has been added unless they control
+ all existing hooks.
.. versionadded:: 3.8
.. impl-detail::
- When tracing is enabled, Python hooks are only traced if the callable has
- a ``__cantrace__`` member that is set to a true value. Otherwise, trace
- functions will not see the hook.
+ When tracing is enabled (see :func:`settrace`), Python hooks are only
+ traced if the callable has a ``__cantrace__`` member that is set to a
+ true value. Otherwise, trace functions will skip the hook.
.. data:: argv
@@ -87,7 +90,7 @@ always available.
native function is preferred when possible.
See the :ref:`audit events table <audit-events>` for all events raised by
- ``CPython``.
+ CPython.
.. versionadded:: 3.8