mirror of
https://github.com/python/cpython.git
synced 2026-05-06 20:51:17 -04:00
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
This commit is contained in:
+1
-1
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user