diff options
author | Ryan Hileman <lunixbochs@gmail.com> | 2021-04-29 23:15:55 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-29 23:15:55 (GMT) |
commit | 9a2c2a9ec3140b6c54c9ef9d994311f114128ee3 (patch) | |
tree | fbc87fa594de1ab3f8151dc74786add7eac3e1b3 /Python | |
parent | 088a15c49d99ecb4c3bef93f8f40dd513c6cae3b (diff) | |
download | cpython-9a2c2a9ec3140b6c54c9ef9d994311f114128ee3.zip cpython-9a2c2a9ec3140b6c54c9ef9d994311f114128ee3.tar.gz cpython-9a2c2a9ec3140b6c54c9ef9d994311f114128ee3.tar.bz2 |
bpo-42800: add audit hooks 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
Add an AUDIT_READ attribute flag aliased to READ_RESTRICTED.
Update obsolete flag documentation.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/traceback.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/traceback.c b/Python/traceback.c index 6c0cdfa..5fa6e50 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|AUDIT_READ}, {"tb_lasti", T_INT, OFF(tb_lasti), READONLY}, {"tb_lineno", T_INT, OFF(tb_lineno), READONLY}, {NULL} /* Sentinel */ |