diff options
author | Steve Dower <steve.dower@python.org> | 2019-10-26 20:02:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-26 20:02:30 (GMT) |
commit | 894e30ce0bcc1c509eb01c8ffa9ba6d7701aeaaf (patch) | |
tree | 4bcccc97453da258c43d262aaba971c0a26b287b /Doc/c-api | |
parent | d898d20e8c228229eb68e545f544db13f246f216 (diff) | |
download | cpython-894e30ce0bcc1c509eb01c8ffa9ba6d7701aeaaf.zip cpython-894e30ce0bcc1c509eb01c8ffa9ba6d7701aeaaf.tar.gz cpython-894e30ce0bcc1c509eb01c8ffa9ba6d7701aeaaf.tar.bz2 |
bpo-38434: Fixes some audit event documentation (GH-16932)
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/code.rst | 2 | ||||
-rw-r--r-- | Doc/c-api/sys.rst | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/Doc/c-api/code.rst b/Doc/c-api/code.rst index 3c4f669..45a6b4a 100644 --- a/Doc/c-api/code.rst +++ b/Doc/c-api/code.rst @@ -40,8 +40,6 @@ bound into a function. can bind you to a precise Python version since the definition of the bytecode changes often. - .. audit-event:: code.__new__ code,filename,name,argcount,posonlyargcount,kwonlyargcount,nlocals,stacksize,flags c.PyCode_New - .. c:function:: PyCodeObject* PyCode_NewWithPosOnlyArgs(int argcount, int posonlyargcount, int kwonlyargcount, int nlocals, int stacksize, int flags, PyObject *code, PyObject *consts, PyObject *names, PyObject *varnames, PyObject *freevars, PyObject *cellvars, PyObject *filename, PyObject *name, int firstlineno, PyObject *lnotab) Similar to :c:func:`PyCode_New`, but with an extra "posonlyargcount" for positonal-only arguments. diff --git a/Doc/c-api/sys.rst b/Doc/c-api/sys.rst index 838a97c..87d2bd1 100644 --- a/Doc/c-api/sys.rst +++ b/Doc/c-api/sys.rst @@ -330,7 +330,16 @@ accessible to C code. They all work with the current interpreter thread's See :pep:`578` for a detailed description of auditing. Functions in the runtime and standard library that raise events include the details in each - function's documentation. + function's documentation and listed in the :ref:`audit events table + <audit-events>`. + + .. audit-event:: sys.addaudithook "" c.PySys_AddAuditHook + + If the interpreter is initialized, this function 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 is cleared. As a result, callers cannot assume + that their hook has been added unless they control all existing hooks. .. versionadded:: 3.8 |