Skip to content

gh-101865: Deprecate co_lnotab from code objects as per PEP 626 - #101866

Merged
ambv merged 10 commits into
python:mainfrom
sobolevn:issue-101865
Apr 3, 2023
Merged

gh-101865: Deprecate co_lnotab from code objects as per PEP 626#101866
ambv merged 10 commits into
python:mainfrom
sobolevn:issue-101865

Conversation

@sobolevn

@sobolevnsobolevn commented Feb 13, 2023

Copy link
Copy Markdown
Member

I still have to fix these lines:

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

But, since I have 0 experience with gdb it might take some time.

@sobolevn

Copy link
Copy Markdown
MemberAuthor

I've pushed my naive attempt to fix gdb: since it only needs a current line f->f_lineno seems like a tool for the job. (again, this is my very first time working with gdb)

@sobolevn

Copy link
Copy Markdown
MemberAuthor

@markshannon friendly ping :)

@sobolevnsobolevn changed the title gh-101865: Remove deprecated co_lnotab from code objects as per PEP626gh-101865: Deprecate co_lnotab from code objects as per PEP626Feb 21, 2023
@sobolevn

sobolevn commented Feb 22, 2023

Copy link
Copy Markdown
MemberAuthor

Failures do not seem related 🤔

@arhadthedev

arhadthedev commented Feb 25, 2023

Copy link
Copy Markdown
Member

test_implied_dirs_performance issue was fixed in gh-102225 so merging main should help.

@sobolevn

Copy link
Copy Markdown
MemberAuthor

@markshannon do you have time to re-review this, please? :)

@sobolevn

sobolevn commented Mar 18, 2023

Copy link
Copy Markdown
MemberAuthor

@carljm maybe you can have a look? :)

@markshannonmarkshannon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good in general.
We aren't obliged to remove co_lnotab in 3.14, but we can. Perhaps change the "will"s to "may"s.

Not sure what to do about Misc/gdbinit though.

Comment threadDoc/whatsnew/3.12.rst Outdated
Comment threadMisc/gdbinit Outdated
Comment threadObjects/codeobject.c Outdated
@markshannon

Copy link
Copy Markdown
Member

Perhaps we should discuss the future of Misc/gdbinit in another issue, and not worry about it here.

@sobolevn

Copy link
Copy Markdown
MemberAuthor

@markshannon thanks a lot for your review and for all your hard work on CPython!

  1. I've addressed all your comments
  2. I've opened a new issue about Misc/gdbinit: What to do with Misc/gdbinit? #102809

@hugovk

Copy link
Copy Markdown
Member

Shall we add a .. deprecated-removed: 3.12 3.14 in the main docs, somewhere near https://docs.python.org/3.12/reference/datamodel.html?highlight=co_lnotab ?

@hugovkhugovk changed the title gh-101865: Deprecate co_lnotab from code objects as per PEP626gh-101865: Deprecate co_lnotab from code objects as per PEP 626Mar 18, 2023
@sobolevn

sobolevn commented Mar 19, 2023

Copy link
Copy Markdown
MemberAuthor

@hugovk

Copy link
Copy Markdown
Member

I think that we can add "is deprecated since 3.12 and may be removed in 3.14".

Sure, let's do something like that.

@sobolevn

Copy link
Copy Markdown
MemberAuthor

gdbinit was removed in #102854 🎉

@sobolevn

Copy link
Copy Markdown
MemberAuthor

@markshannon I've solved the merge conflicts. I hope that this is ready to be merged when you have the time :)

@ambv
ambv merged commit 2a72125 into python:mainApr 3, 2023
gaogaotiantian pushed a commit to gaogaotiantian/cpython that referenced this pull request Apr 8, 2023
…26 (python#101866)
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
warsaw pushed a commit to warsaw/cpython that referenced this pull request Apr 11, 2023
…26 (python#101866)
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@sobolevn@arhadthedev@markshannon@hugovk@ambv@bedevere-bot