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/os.rst b/Doc/library/os.rst
index 45ce643..ee3c35c 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -851,7 +851,7 @@
most *length* bytes in size. As of Python 3.3, this is equivalent to
``os.truncate(fd, length)``.
- .. audit-event:: os.truncate "fd length"
+ .. audit-event:: os.truncate fd,length os.ftruncate
.. availability:: Unix, Windows.
@@ -938,7 +938,7 @@
This function can support :ref:`paths relative to directory descriptors
<dir_fd>` with the *dir_fd* parameter.
- .. audit-event:: open "path mode flags"
+ .. audit-event:: open path,mode,flags os.open
.. versionchanged:: 3.4
The new file descriptor is now non-inheritable.
@@ -1806,7 +1806,7 @@
This function can also support :ref:`specifying a file descriptor
<path_fd>`; the file descriptor must refer to a directory.
- .. audit-event:: os.listdir path
+ .. audit-event:: os.listdir path os.listdir
.. note::
To encode ``str`` filenames to ``bytes``, use :func:`~os.fsencode`.
@@ -2185,7 +2185,7 @@
This function can also support :ref:`specifying a file descriptor
<path_fd>`; the file descriptor must refer to a directory.
- .. audit-event:: os.scandir path
+ .. audit-event:: os.scandir path os.scandir
The :func:`scandir` iterator supports the :term:`context manager` protocol
and has the following method:
@@ -2793,7 +2793,7 @@
This function can support :ref:`specifying a file descriptor <path_fd>`.
- .. audit-event:: os.truncate "path length"
+ .. audit-event:: os.truncate path,length os.truncate
.. availability:: Unix, Windows.
@@ -3799,7 +3799,7 @@
to using this function. See the :ref:`subprocess-replacements` section in
the :mod:`subprocess` documentation for some helpful recipes.
- .. audit-event:: os.system command
+ .. audit-event:: os.system command os.system
.. availability:: Unix, Windows.