[3.8] bpo-42800: Add audit events for f_code and tb_frame (GH-24182) by miss-islington · Pull Request #25849 · python/cpython

@zooba @miss-islington

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
(cherry picked from commit bb2f3ff)

Co-authored-by: Steve Dower <steve.dower@python.org>