diff options
author | Saiyang Gou <gousaiyang@163.com> | 2020-10-20 19:23:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-20 19:23:15 (GMT) |
commit | 3f7e990fd49dbabc1dde41ce58c1bdda9f56ead7 (patch) | |
tree | 9618ece119809521ba77c603bfbd4a5c5691694d /Doc/reference | |
parent | 1d3469988e2c1f53ca84ffdc979d548c04ba3906 (diff) | |
download | cpython-3f7e990fd49dbabc1dde41ce58c1bdda9f56ead7.zip cpython-3f7e990fd49dbabc1dde41ce58c1bdda9f56ead7.tar.gz cpython-3f7e990fd49dbabc1dde41ce58c1bdda9f56ead7.tar.bz2 |
bpo-41192: Add documentation of undocumented audit events (GH-21308)
Diffstat (limited to 'Doc/reference')
-rw-r--r-- | Doc/reference/datamodel.rst | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 4396f1b..29e64cb 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -1540,6 +1540,12 @@ access (use of, assignment to, or deletion of ``x.name``) for class instances. result of implicit invocation via language syntax or built-in functions. See :ref:`special-lookup`. + .. audit-event:: object.__getattr__ obj,name object.__getattribute__ + + For certain sensitive attribute accesses, raises an + :ref:`auditing event <auditing>` ``object.__getattr__`` with arguments + ``obj`` and ``name``. + .. method:: object.__setattr__(self, name, value) @@ -1551,12 +1557,24 @@ access (use of, assignment to, or deletion of ``x.name``) for class instances. call the base class method with the same name, for example, ``object.__setattr__(self, name, value)``. + .. audit-event:: object.__setattr__ obj,name,value object.__setattr__ + + For certain sensitive attribute assignments, raises an + :ref:`auditing event <auditing>` ``object.__setattr__`` with arguments + ``obj``, ``name``, ``value``. + .. method:: object.__delattr__(self, name) Like :meth:`__setattr__` but for attribute deletion instead of assignment. This should only be implemented if ``del obj.name`` is meaningful for the object. + .. audit-event:: object.__delattr__ obj,name object.__delattr__ + + For certain sensitive attribute deletions, raises an + :ref:`auditing event <auditing>` ``object.__delattr__`` with arguments + ``obj`` and ``name``. + .. method:: object.__dir__(self) |