Skip to content

Remove deprecated co_lnotab from CodeType #134690

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sobolevn opened this issue May 26, 2025 · 1 comment
Open

Remove deprecated co_lnotab from CodeType #134690

sobolevn opened this issue May 26, 2025 · 1 comment
Assignees
Labels
3.15 new features, bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@sobolevn
Copy link
Member

sobolevn commented May 26, 2025

Feature or enhancement

co_lnotab was deprecated in the docs in 3.10, deprecation warning was added in 3.12 and now it is time to remove it.

cpython/Objects/codeobject.c

Lines 2620 to 2630 in cf8941c

static PyObject *
code_getlnotab(PyObject *self, void *closure)
{
PyCodeObject *code = _PyCodeObject_CAST(self);
if (PyErr_WarnEx(PyExc_DeprecationWarning,
"co_lnotab is deprecated, use co_lines instead.",
1) < 0) {
return NULL;
}
return decode_linetable(code);
}

Refs #101865

Linked PRs

@sobolevn sobolevn self-assigned this May 26, 2025
@sobolevn sobolevn added type-feature A feature request or enhancement interpreter-core (Objects, Python, Grammar, and Parser dirs) 3.15 new features, bugs and security fixes labels May 26, 2025
sobolevn added a commit to sobolevn/cpython that referenced this issue May 26, 2025
@picnixz
Copy link
Member

picnixz commented May 26, 2025

I had a PR for that somewhere but Irit wasn't very convinced by the removal at that time: #119665 and #119664.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.15 new features, bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants