-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
gh-125900: Clean-up logic around immortalization in free-threading #125901
gh-125900: Clean-up logic around immortalization in free-threading #125901
Conversation
* Remove `@suppress_immortalization` decorator * Make suppression flag per-thread instead of per-interpreter * Suppress immortalization in `eval()` to avoid refleaks in three tests (test_datetime.test_roundtrip, test_logging.test_config8_ok, and test_random.test_after_fork). * frozenset() is constant, but not a singleton. When run multiple times, the test could fail due to constant interning.
@@ -141,9 +141,7 @@ | |||
ctypes = None | |||
from test.support import (cpython_only, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that there are too many imports in the current line. Maybe it can be split. See line 146.
This suggestion applies to all changes (maybe I don't like to import too much from the from statement, so it's better to use * directly
(In this way, this ()
can be removed. Yes, it's still)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine. I don't think the PR should do a broader import cleanup -- just undo the changes related @suppress_immortalization
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@suppress_immortalization
decoratoreval()
to avoid refleaks in three tests (test_datetime.test_roundtrip, test_logging.test_config8_ok, and test_random.test_after_fork).@suppress_immortalization
#125900