summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@python.org>2021-05-03 13:06:36 (GMT)
committerGitHub <noreply@github.com>2021-05-03 13:06:36 (GMT)
commitbb2f3ff7a8f0c3565ccc1946dba7e09a3f7dc209 (patch)
tree6fea32214cc39992ce43a29309a1a1076b804ae4 /Doc/reference
parent1536342c4491ffc70adeb540a04381e90ea623d7 (diff)
downloadcpython-bb2f3ff7a8f0c3565ccc1946dba7e09a3f7dc209.zip
cpython-bb2f3ff7a8f0c3565ccc1946dba7e09a3f7dc209.tar.gz
cpython-bb2f3ff7a8f0c3565ccc1946dba7e09a3f7dc209.tar.bz2
bpo-42800: Add audit events for f_code and tb_frame (GH-24182)
Accessing the following attributes will now fire PEP 578 style audit hooks as (object.__getattr__, obj, name): * PyTracebackObject: tb_frame * PyFrameObject: f_code * PyGenObject: gi_code, gi_frame * PyCoroObject: cr_code, cr_frame * PyAsyncGenObject: ag_code, ag_frame
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/datamodel.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 46ee8ec..4030123 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1005,6 +1005,9 @@ Internal types
:attr:`f_lasti` gives the precise instruction (this is an index into the
bytecode string of the code object).
+ Accessing ``f_code`` raises an :ref:`auditing event <auditing>`
+ ``object.__getattr__`` with arguments ``obj`` and ``"f_code"``.
+
.. index::
single: f_trace (frame attribute)
single: f_trace_lines (frame attribute)
@@ -1089,6 +1092,9 @@ Internal types
:keyword:`try` statement with no matching except clause or with a
finally clause.
+ Accessing ``tb_frame`` raises an :ref:`auditing event <auditing>`
+ ``object.__getattr__`` with arguments ``obj`` and ``"tb_frame"``.
+
.. index::
single: tb_next (traceback attribute)