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 — `co_lnotab` must be removed in 3.12 according to PEP 626 · Issue #101865 · python/cpython

co_lnotab must be removed in 3.12 according to PEP 626 #101865

New issue
Copy link
New issue
Copy link
Closed
Closed
co_lnotab must be removed in 3.12 according to PEP 626#101865
Copy link
Assignees
sobolevn
Labels
3.12only security fixesonly 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 Feb 13, 2023
Issue body actions

The co_lnotab attribute will be deprecated in 3.10 and removed in 3.12.

https://peps.python.org/pep-0626/#backwards-compatibility

It was documented as deprecated in 3.10 and to-be-removed in 3.12: https://docs.python.org/3/whatsnew/3.10.html#pep-626-precise-line-numbers-for-debugging-and-other-tools

Original issue: #86412

Right now CPython does not use co_lnotab in its source code.
But, there are two mentions of it:

  1. In gdb:

    cpython/Misc/gdbinit

    Lines 60 to 61 in 6ef6915

    set $__sz = ((PyVarObject *)$__co->co_lnotab)->ob_size/2
    set $__p = (unsigned char *)((PyBytesObject *)$__co->co_lnotab)->ob_sval
    And I have no idea how it works! Some weird mix of C and some kind of a DSL / scripting language
  2. In clinic.test:

    cpython/Lib/test/clinic.test

    Line 3575 in 6ef6915

    co_lnotab: PyBytesObject(c_default="(PyBytesObject *)self->co_lnotab") = None
    But, this is just a string-based test. So, I think it can stay there

If that's fine - I would like to do the honours.

CC @markshannon

Linked PRs

  • gh-101865: Deprecate co_lnotab from code objects as per PEP 626 #101866
  • gh-101865: Docs: Keep co_lnotab deprecation for at least 3.14 #126392
  • [3.13] gh-101865: Docs: Keep co_lnotab deprecation for at least 3.14 (GH-126392) #126403
  • [3.12] gh-101865: Docs: Keep co_lnotab deprecation for at least 3.14 (GH-126392) #126404

Activity

  1. 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.12only security fixesonly security fixes
    on Feb 13, 2023
  2. sobolevn
    self-assigned this
    on Feb 13, 2023
  3. sobolevn
    added a commit that references this issue on Feb 13, 2023

    pythongh-101865: Remove deprecated `co_lnotab` from code objects as p…

    808950a
  4. markshannon commented on Feb 21, 2023

    @markshannon
    markshannon
    on Feb 21, 2023
    Member
    More actions

    I don't get any warning when using co_lnotab in 3.11, so I don't think we can remove it yet.
    Don't assume everyone has read PEP 626.

    We should at least warn when using it for a couple of versions, before removing it.

    It isn't causing us any problems either, so there is not rush to remove it. It can wait for 3.14 or so.

  5. sobolevn commented on Feb 21, 2023

    @sobolevn
    sobolevn
    on Feb 21, 2023
    MemberAuthor
    More actions

    Ok then, so DeprecationWarning it is! 👍

  6. sobolevn
    added 2 commits that reference this issue on Feb 21, 2023

    pythongh-101865: Remove deprecated `co_lnotab` from code objects as p…

    06a79d9

    Revert "pythongh-101865: Remove deprecated `co_lnotab` from code obje…

    dd65849
  7. hugovk
    changed the title [-]`co_lnotab` must be removed in 3.12 according to PEP626[/-] [+]`co_lnotab` must be removed in 3.12 according to PEP 626[/+] on Mar 18, 2023
  8. ambv
    added a commit that references this issue on Apr 3, 2023

    gh-101865: Deprecate `co_lnotab` from code objects as per PEP 626 (#1…

    2a72125
  9. iritkatriel
    closed this as completedon Apr 4, 2023
  10. gaogaotiantian
    added a commit that references this issue on Apr 8, 2023

    pythongh-101865: Deprecate `co_lnotab` from code objects as per PEP 6…

    726a56e
  11. warsaw
    added a commit that references this issue on Apr 11, 2023

    pythongh-101865: Deprecate `co_lnotab` from code objects as per PEP 6…

    2db2a84
  12. hugovk
    added 5 commits that reference this issue on Nov 4, 2024

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

    eac41c5

    [3.13] pythongh-101865: Docs: Keep co_lnotab deprecation for at least…

    5ee730c

    [3.12] pythongh-101865: Docs: Keep co_lnotab deprecation for at least…

    5e90e7f

    [3.13] gh-101865: Docs: Keep co_lnotab deprecation for at least 3.14 (G…

    cccc066

    [3.12] gh-101865: Docs: Keep co_lnotab deprecation for at least 3.14 (G…

    94423b6
  13. picnixz
    added a commit that references this issue on Dec 8, 2024

    pythongh-101865: Docs: Keep co_lnotab deprecation for at least 3.14 (p…

    d0fd8f0
  14. ebonnal
    added a commit that references this issue on Jan 12, 2025

    pythongh-101865: Docs: Keep co_lnotab deprecation for at least 3.14 (p…

    f24d2e6
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.12only security fixesonly 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.