-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
Clean-up use of @suppress_immortalization
#125900
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
Labels
Comments
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Oct 23, 2024
* 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.
colesbury
added a commit
that referenced
this issue
Oct 24, 2024
…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.
ebonnal
pushed a commit
to ebonnal/cpython
that referenced
this issue
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
As a temporary measure, we immortalized a number of objects in the 3.13 free threading build. To work around refleak test failures, we added a
@test.support.suppress_immortalization()
decorator that suppressed the behavior.Now that we have deferred reference counting, that behavior is mostly gone and we can get rid of the decorator. We still want to suppress immortalization of code constants in a few places (like
compile()
), but that logic can be simpler and doesn't have to be exposed to Python.Linked PRs
The text was updated successfully, but these errors were encountered: