]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40421: What's New in Python 3.11: PyFrameObject.f_lasti (GH-31536)
authorVictor Stinner <vstinner@python.org>
Wed, 23 Feb 2022 19:20:03 +0000 (20:20 +0100)
committerGitHub <noreply@github.com>
Wed, 23 Feb 2022 19:20:03 +0000 (20:20 +0100)
Suggest replacing PyCode_Addr2Line() with PyFrame_GetLineNumber().

Doc/whatsnew/3.11.rst

index 34642e320dd18271189a3833358c9ed38c36cd02..9744051ede6bb157249ccd862d5170f31397026f 100644 (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: