[Python-checkins] Mention that code.co_lnotab is deprecated in what's new for 3.10. (#24902)

markshannon webhook-mailer at python.org
Fri Mar 19 13:30:41 EDT 2021


https://github.com/python/cpython/commit/148bc0584476d836b65d65e158354f15b56d27b5
commit: 148bc0584476d836b65d65e158354f15b56d27b5
branch: master
author: Mark Shannon <mark at hotpy.org>
committer: markshannon <mark at hotpy.org>
date: 2021-03-19T17:30:24Z
summary:

Mention that code.co_lnotab is deprecated in what's new for 3.10. (#24902)

files:
M Doc/whatsnew/3.10.rst

diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst
index 02fe033f56775..51b3331be89e2 100644
--- a/Doc/whatsnew/3.10.rst
+++ b/Doc/whatsnew/3.10.rst
@@ -175,6 +175,8 @@ Tracing events, with the correct line number, are generated for all lines of cod
 
 The ``f_lineo`` attribute of frame objects will always contain the expected line number.
 
+The ``co_lnotab`` attribute of code objects is deprecated and will be removed in 3.12.
+Code that needs to convert from offset to line number should use the new ``co_lines()`` method instead.
 
 PEP 634: Structural Pattern Matching
 ------------------------------------



More information about the Python-checkins mailing list