Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

encukou
Copy link
Member

@encukou encukou commented Sep 3, 2024

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
Copy link
Member Author

encukou commented Sep 3, 2024

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

Copy link
Member

@vstinner vstinner left a comment

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
38 checks passed
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants