summaryrefslogtreecommitdiffstats
path: root/Python
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 /Python
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 'Python')
-rw-r--r--Python/traceback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/traceback.c b/Python/traceback.c
index 5d3a65c..a9a9dd9 100644
--- a/Python/traceback.c
+++ b/Python/traceback.c
@@ -147,7 +147,7 @@ static PyMethodDef tb_methods[] = {
};
static PyMemberDef tb_memberlist[] = {
- {"tb_frame", T_OBJECT, OFF(tb_frame), READONLY},
+ {"tb_frame", T_OBJECT, OFF(tb_frame), READONLY|READ_RESTRICTED},
{"tb_lasti", T_INT, OFF(tb_lasti), READONLY},
{"tb_lineno", T_INT, OFF(tb_lineno), READONLY},
{NULL} /* Sentinel */