aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_zoneinfo/test_zoneinfo.py
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2024-10-24 18:09:59 -0400
committerGitHub <noreply@github.com>2024-10-24 18:09:59 -0400
commit332356b880576a1a00b5dc34f03d7d3995dd4512 (patch)
tree1f29a5ca46bb083c99e9d623f2da14a0f523014c /Lib/test/test_zoneinfo/test_zoneinfo.py
parent1306f33c84b2745aa8af5e3e8f680aa80b836c0e (diff)
downloadcpython-332356b880576a1a00b5dc34f03d7d3995dd4512.tar.gz
cpython-332356b880576a1a00b5dc34f03d7d3995dd4512.zip
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.
Diffstat (limited to 'Lib/test/test_zoneinfo/test_zoneinfo.py')
-rw-r--r--Lib/test/test_zoneinfo/test_zoneinfo.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test_zoneinfo/test_zoneinfo.py b/Lib/test/test_zoneinfo/test_zoneinfo.py
index 8bcd6d2e995..84147215557 100644
--- a/Lib/test/test_zoneinfo/test_zoneinfo.py
+++ b/Lib/test/test_zoneinfo/test_zoneinfo.py
@@ -17,7 +17,7 @@ import unittest
from datetime import date, datetime, time, timedelta, timezone
from functools import cached_property
-from test.support import MISSING_C_DOCSTRINGS, requires_gil_enabled
+from test.support import MISSING_C_DOCSTRINGS
from test.test_zoneinfo import _support as test_support
from test.test_zoneinfo._support import OS_ENV_LOCK, TZPATH_TEST_LOCK, ZoneInfoTestBase
from test.support.import_helper import import_module, CleanImport
@@ -1931,7 +1931,6 @@ class ExtensionBuiltTest(unittest.TestCase):
self.assertFalse(hasattr(c_zoneinfo.ZoneInfo, "_weak_cache"))
self.assertTrue(hasattr(py_zoneinfo.ZoneInfo, "_weak_cache"))
- @requires_gil_enabled("gh-117783: types may be immortalized")
def test_gc_tracked(self):
import gc