mirror of
https://github.com/python/cpython.git
synced 2025-10-28 01:00:34 +00:00
gh-125900: Clean-up logic around immortalization in free-threading (#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 commit is contained in:
parent
1306f33c84
commit
332356b880
23 changed files with 36 additions and 137 deletions
|
|
@ -10,7 +10,7 @@ import sys
|
|||
import weakref
|
||||
|
||||
from test import support
|
||||
from test.support import import_helper, suppress_immortalization
|
||||
from test.support import import_helper
|
||||
from test.support.script_helper import assert_python_ok
|
||||
from test.support.testcase import ComplexesAreIdenticalMixin
|
||||
|
||||
|
|
@ -697,7 +697,6 @@ class StructTest(ComplexesAreIdenticalMixin, unittest.TestCase):
|
|||
self.assertIn(b"Exception ignored in:", stderr)
|
||||
self.assertIn(b"C.__del__", stderr)
|
||||
|
||||
@suppress_immortalization()
|
||||
def test__struct_reference_cycle_cleaned_up(self):
|
||||
# Regression test for python/cpython#94207.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue