| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Switch more _Py_IsImmortal(...) assertions to _Py_IsImmortalLoose(...) The remaining calls to _Py_IsImmortal are in free-threaded-only code, initialization of core objects, tests, and guards that fall back to code that works with mortal objects.
Remaining calls: $ git grep 'assert.*Py_IsImmortal'|grep -v Loose
Include/internal/pycore_stackref.h: assert(_Py_IsImmortal(obj));
Modules/_testcapi/immortal.c: assert(_Py_IsImmortal(object));
Objects/codeobject.c: assert(_Py_IsImmortal(entry->value));
Objects/object.c: assert(!_Py_IsImmortal(op));
Objects/object.c: assert(_Py_IsImmortal(constants[i]));
Objects/structseq.c: assert(_Py_IsImmortal(type));
Objects/typeobject.c: assert(_Py_IsImmortal((PyObject *)self));
Objects/unicodeobject.c: assert(!_Py_IsImmortal(s));
Programs/_testembed.c: assert(_Py_IsImmortal(str1));
Python/crossinterp.c: assert(_Py_IsImmortal((PyObject *)type));
Python/crossinterp.c: assert(_Py_IsImmortal((PyObject *)info->builtin));
Python/optimizer_symbols.c: assert(_Py_IsImmortal(val_42));
Python/optimizer_symbols.c: assert(_Py_IsImmortal(val_43)); |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM. IMO it should be backported to 3.13.
Sorry, something went wrong.
|
Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, something went wrong.
|
Sorry, @encukou, I could not cleanly backport this to 3.13 due to a conflict. cherry_picker 57c471a6880956338549380fc5fb35c986937901 3.13 |
Sorry, something went wrong.
Switch more _Py_IsImmortal(...) assertions to _Py_IsImmortalLoose(...) The remaining calls to _Py_IsImmortal are in free-threaded-only code, initialization of core objects, tests, and guards that fall back to code that works with mortal objects. (cherry picked from commit 57c471a)
|
GH-123622 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
Switch more _Py_IsImmortal(...) assertions to _Py_IsImmortalLoose(...) The remaining calls to _Py_IsImmortal are in free-threaded-only code, initialization of core objects, tests, and guards that fall back to code that works with mortal objects. (cherry picked from commit 57c471a)
Switch more _Py_IsImmortal(...) assertions to _Py_IsImmortalLoose(...) The remaining calls to _Py_IsImmortal are in free-threaded-only code, initialization of core objects, tests, and guards that fall back to code that works with mortal objects. (For this 3.12 backport commit, I re-checked all calls to _Py_IsImmortal; the changed calls are different from the commits to 3.13 & 3.14.)
| Back | FazBrowse Home | New Git URL |
Switch more _Py_IsImmortal(...) assertions to _Py_IsImmortalLoose(...), to account for stable-ABI extensions changing the refcount of immortal objects (similar to the _Py_IMMORTAL_BIT/_Py_IMMORTAL_REFCNT design that was approved in PEP-683 but never implemented).
The remaining calls to _Py_IsImmortal are in free-threaded-only code, initialization of core objects, tests, and guards that fall back to code that works with mortal objects.