mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-40421: Add missing getters for frame object attributes to C-API. (GH-32114)
This commit is contained in:
parent
44e915028d
commit
74b95d86e0
7 changed files with 136 additions and 4 deletions
|
@ -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`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue