mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
gh-101865: Deprecate co_lnotab
from code objects as per PEP 626 (#101866)
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
This commit is contained in:
parent
e6f7d35be7
commit
2a721258a1
5 changed files with 22 additions and 1 deletions
|
@ -1921,6 +1921,11 @@ static PyMemberDef code_memberlist[] = {
|
|||
static PyObject *
|
||||
code_getlnotab(PyCodeObject *code, void *closure)
|
||||
{
|
||||
if (PyErr_WarnEx(PyExc_DeprecationWarning,
|
||||
"co_lnotab is deprecated, use co_lines instead.",
|
||||
1) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
return decode_linetable(code);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue