From: Victor Stinner Date: Wed, 23 Feb 2022 19:20:03 +0000 (+0100) Subject: bpo-40421: What's New in Python 3.11: PyFrameObject.f_lasti (GH-31536) X-Git-Tag: v3.11.0a6~113 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8a716bc62c8205bb9deeda17422b7e69204b6897;p=thirdparty%2FPython%2Fcpython.git bpo-40421: What's New in Python 3.11: PyFrameObject.f_lasti (GH-31536) Suggest replacing PyCode_Addr2Line() with PyFrame_GetLineNumber(). --- diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 34642e320dd1..9744051ede6b 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: