bpo-40421: What's New in Python 3.11: PyFrameObject.f_lasti (GH-31536)

Suggest replacing PyCode_Addr2Line() with PyFrame_GetLineNumber().
This commit is contained in:
Victor Stinner 2022-02-23 20:20:03 +01:00 committed by GitHub
parent 281ea9c391
commit 8a716bc62c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -853,6 +853,8 @@ Porting to Python 3.11
use ``PyObject_GetAttrString((PyObject*)frame, "f_locals")``.
* ``f_lasti``: removed,
use ``PyObject_GetAttrString((PyObject*)frame, "f_lasti")``.
Code using ``f_lasti`` with ``PyCode_Addr2Line()`` should use
:c:func:`PyFrame_GetLineNumber` instead.
The following fields were removed entirely, as they were details
of the old implementation: