From 8a716bc62c8205bb9deeda17422b7e69204b6897 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 23 Feb 2022 20:20:03 +0100 Subject: bpo-40421: What's New in Python 3.11: PyFrameObject.f_lasti (GH-31536) Suggest replacing PyCode_Addr2Line() with PyFrame_GetLineNumber(). --- Doc/whatsnew/3.11.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 34642e3..9744051 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -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: -- cgit v0.12