Skip to content

[3.13] gh-123091: Use more _Py_IsImmortalLoose() (GH-123602) - #123622

Merged
encukou merged 1 commit into
python:3.13from
encukou:backport-57c471a-3.13
Sep 3, 2024
Merged

encukou merged 1 commit into
python:3.13from
encukou:backport-57c471a-3.13

Conversation

@encukou

@encukou encukou commented Sep 3, 2024 •

Copy link
Copy Markdown
Member

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.

(cherry picked from commit 57c471a)
@encukou

encukou commented Sep 3, 2024

Copy link
Copy Markdown
Member Author

@Yhg1s, consider this last-minute fix, a workaround for the fact that the _Py_IMMORTAL_BIT/_Py_IMMORTAL_REFCNT mechanism from PEP-683 was never implemented.
It only loosens assertions.

@vstinner vstinner 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.

LGTM

@encukou
encukou merged commit d655c65 into python:3.13 Sep 3, 2024
@encukou
encukou deleted the backport-57c471a-3.13 branch September 3, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants