gh-125900: Clean-up logic around immortalization in free-threading#125901
Merged
colesbury merged 5 commits intopython:mainfrom Oct 24, 2024
Merged
gh-125900: Clean-up logic around immortalization in free-threading#125901colesbury merged 5 commits intopython:mainfrom
colesbury merged 5 commits intopython:mainfrom
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.
rruuaanng
reviewed
Oct 24, 2024
rruuaanng
reviewed
Oct 24, 2024
| @@ -141,9 +141,7 @@ | |||
| ctypes = None | |||
| from test.support import (cpython_only, | |||
Contributor
There was a problem hiding this comment.
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)
Contributor
Author
There was a problem hiding this comment.
I think this is fine. I don't think the PR should do a broader import cleanup -- just undo the changes related @suppress_immortalization.
mpage
reviewed
Oct 24, 2024
mpage
reviewed
Oct 24, 2024
Eclips4
approved these changes
Oct 24, 2024
ebonnal
pushed a commit
to ebonnal/cpython
that referenced
this pull request
Jan 12, 2025
…ing (python#125901) * 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@suppress_immortalizationdecoratoreval()to avoid refleaks in three tests (test_datetime.test_roundtrip, test_logging.test_config8_ok, and test_random.test_after_fork).@suppress_immortalization#125900