GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove deprecated `co_lnotab` from `CodeType` · Issue #134690 · python/cpython

Remove deprecated co_lnotab from CodeType #134690

New issue
Copy link
New issue
Copy link
Closed
Closed
Remove deprecated co_lnotab from CodeType#134690
Copy link
Assignees
sobolevn
Labels
3.15bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement

Description

@sobolevn
sobolevn
opened on May 26, 2025
Issue body actions

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

  • gh-134690: Removed deprecated codetype.co_lnotab #134691

Activity

  1. sobolevn
    self-assigned this
    on May 26, 2025
  2. sobolevn
    added
    type-featureA feature request or enhancementA feature request or enhancement
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    3.15bugs and security fixesbugs and security fixes
    on May 26, 2025
  3. sobolevn
    added a commit that references this issue on May 26, 2025

    pythongh-134690: Removed deprecated `codetype.co_lnotab`

    f892097
  4. picnixz commented on May 26, 2025

    @picnixz
    picnixz
    on May 26, 2025
    Member
    More actions

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

  5. hugovk
    marked PEP 626: outdated timeline for co_lnotab deprecation/removal #146361 as a duplicate of this issue on Mar 24, 2026
  6. hugovk commented on Mar 24, 2026

    @hugovk
    hugovk
    on Mar 24, 2026
    Member
    More actions

    We're six weeks out from the 3.15 feature freeze, do we want to do this for 3.15 or update the docs to aim for 3.16?

    In November 2024, we bumped "may be removed in 3.14" to "may be removed in 3.15":

    • gh-101865: Docs: Keep co_lnotab deprecation for at least 3.14 #126392

    At that time, pytorch and huggingface were called out as still using it, but they've now been updated:

    • DeprecationWarning: remove co_lnotab in favor of co_lines() pytorch/pytorch#158833
    • Add meta-data to the HANS dataset huggingface/datasets#760
  7. sobolevn commented on Mar 24, 2026

    @sobolevn
    sobolevn
    on Mar 24, 2026
    MemberAuthor
    More actions

    I've updated #134691
    I am always in favor of removing stuff when possible :)

    Reacted by Hugo van Kemenade
  8. hugovk
    added a commit that references this issue on Apr 25, 2026

    gh-134690: Removed deprecated `codetype.co_lnotab` (#134691)

    85d3bcd
  9. hugovk
    closed this as completedon Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @sobolevn
    sobolevn

Labels

3.15bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancementA feature request or enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.