bpo-41192: Add documentation of undocumented audit events (GH-21308)

This commit is contained in:
Saiyang Gou 2020-10-20 12:23:15 -07:00 committed by GitHub
parent 1d3469988e
commit 3f7e990fd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 56 additions and 2 deletions

View file

@ -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)