Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ambv merged 10 commits intopython:mainfromsobolevn:issue-101865
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Address review
  • Loading branch information
@sobolevn
sobolevn committedMar 18, 2023
commit2fc556ec54b53a61b0d348ee13aa322567965fc0
2 changes: 1 addition & 1 deletionDoc/whatsnew/3.12.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -526,7 +526,7 @@ Pending Removal in Python 3.14
* Accessing ``co_lnotab`` was deprecated in :pep:`626` since 3.10
and was planned to be removed in 3.12
but it only got a proper :exc:`DeprecationWarning` in 3.12.
Remove it in 3.14.
May be removed in 3.14.
(Contributed by Nikita Sobolev in :gh:`101866`.)

Pending Removal in Future Versions
Expand Down
20 changes: 19 additions & 1 deletionMisc/gdbinit
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -54,7 +54,25 @@ end
# A rewrite of the Python interpreter's line number calculator in GDB's
# command language
define lineno
printf "%d", f->f_lineno
set $__continue = 1
set $__co = f->f_code
set $__lasti = f->f_lasti
set $__sz = ((PyVarObject *)$__co->co_lnotab)->ob_size/2
set $__p = (unsigned char *)((PyBytesObject *)$__co->co_lnotab)->ob_sval
set $__li = $__co->co_firstlineno
set $__ad = 0
while ($__sz-1 >= 0 && $__continue)
set $__sz = $__sz - 1
set $__ad = $__ad + *$__p
set $__p = $__p + 1
if ($__ad > $__lasti)
set $__continue = 0
else
set $__li = $__li + *$__p
set $__p = $__p + 1
end
end
printf "%d", $__li
end

define pyframev
Expand Down
2 changes: 1 addition & 1 deletionObjects/codeobject.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1886,7 +1886,7 @@ code_getlnotab(PyCodeObject *code, void *closure)
{
if (PyErr_WarnEx(PyExc_DeprecationWarning,
"co_lnotab is deprecated since Python 3.12 "
"andwill be removed in Python 3.14, "
"andmay be removed in Python 3.14, "
"use co_lines instead.",
1) < 0) {
return NULL;
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp