diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-05-10 20:50:59 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-10 20:50:59 (GMT) |
commit | cceb758c788adb51ca1660e9d49410c2347feadc (patch) | |
tree | 1021c5c2a1f72b735988f614b9e7b3d545800646 /Lib/test/test_zoneinfo/test_zoneinfo.py | |
parent | b3074f0d5ec4ead75ecce10bf7b7a1459cbf892e (diff) | |
download | cpython-cceb758c788adb51ca1660e9d49410c2347feadc.zip cpython-cceb758c788adb51ca1660e9d49410c2347feadc.tar.gz cpython-cceb758c788adb51ca1660e9d49410c2347feadc.tar.bz2 |
[3.13] gh-118846: Fix free-threading test failures when run sequentially (GH-118864) (#118927)
The free-threaded build currently immortalizes some objects once the
first thread is started. This can lead to test failures depending on the
order in which tests are run. This PR addresses those failures by
suppressing immortalization or skipping the affected tests.
(cherry picked from commit b309c8ebff011f27012367b046ff92eecbdd68a5)
Co-authored-by: Sam Gross <colesbury@gmail.com>
Diffstat (limited to 'Lib/test/test_zoneinfo/test_zoneinfo.py')
-rw-r--r-- | Lib/test/test_zoneinfo/test_zoneinfo.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_zoneinfo/test_zoneinfo.py b/Lib/test/test_zoneinfo/test_zoneinfo.py index 8414721..8bcd6d2 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 +from test.support import MISSING_C_DOCSTRINGS, requires_gil_enabled 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,6 +1931,7 @@ 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 |