diff options
author | Mark Shannon <mark@hotpy.org> | 2022-03-31 16:13:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-31 16:13:25 (GMT) |
commit | 74b95d86e0f14603f878c4df3133bc8a93f8f80a (patch) | |
tree | bdd3f8b2a671bfa2458c1a4e34098ff70fa6e36b /Doc/whatsnew | |
parent | 44e915028d75f7cef141aa1aada962465a5907d6 (diff) | |
download | cpython-74b95d86e0f14603f878c4df3133bc8a93f8f80a.zip cpython-74b95d86e0f14603f878c4df3133bc8a93f8f80a.tar.gz cpython-74b95d86e0f14603f878c4df3133bc8a93f8f80a.tar.bz2 |
bpo-40421: Add missing getters for frame object attributes to C-API. (GH-32114)
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/3.11.rst | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 1bd9587..16715c3 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -868,6 +868,9 @@ New Features :c:func:`PyFloat_Unpack8`. (Contributed by Victor Stinner in :issue:`46906`.) +* Add new functions to get frame object attributes: + :c:func:`PyFrame_GetBuiltins`, :c:func:`PyFrame_GetGenerator`, + :c:func:`PyFrame_GetGlobals`. Porting to Python 3.11 ---------------------- @@ -985,13 +988,13 @@ Porting to Python 3.11 * ``f_back``: use :c:func:`PyFrame_GetBack`. * ``f_blockstack``: removed. - * ``f_builtins``: use ``PyObject_GetAttrString((PyObject*)frame, "f_builtins")``. + * ``f_builtins``: use :c:func:`PyFrame_GetBuiltins`. * ``f_code``: use :c:func:`PyFrame_GetCode`. - * ``f_gen``: removed. - * ``f_globals``: use ``PyObject_GetAttrString((PyObject*)frame, "f_globals")``. + * ``f_gen``: use :c:func:`PyFrame_GetGenerator`. + * ``f_globals``: use :c:func:`PyFrame_GetGlobals`. * ``f_iblock``: removed. * ``f_lasti``: use ``PyObject_GetAttrString((PyObject*)frame, "f_lasti")``. - Code using ``f_lasti`` with ``PyCode_Addr2Line()`` must use + Code using ``f_lasti`` with ``PyCode_Addr2Line()`` should use :c:func:`PyFrame_GetLineNumber` instead. * ``f_lineno``: use :c:func:`PyFrame_GetLineNumber` * ``f_locals``: use :c:func:`PyFrame_GetLocals`. |