]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-128058: Fix test_builtin ImmortalTests (#128068)
authorVictor Stinner <vstinner@python.org>
Fri, 20 Dec 2024 07:50:18 +0000 (08:50 +0100)
committerGitHub <noreply@github.com>
Fri, 20 Dec 2024 07:50:18 +0000 (08:50 +0100)
On 32-bit Free Threading systems, immortal reference count
is 5 << 28, instead of 7 << 28.

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Lib/test/test_builtin.py

index a92edad86839e677dd0a27610df805686690f13b..f98138391bc1a8fc1c0950f81049cbd65535edcf 100644 (file)
@@ -2691,7 +2691,10 @@ class ShutdownTest(unittest.TestCase):
 class ImmortalTests(unittest.TestCase):
 
     if sys.maxsize < (1 << 32):
-        IMMORTAL_REFCOUNT = 7 << 28
+        if support.Py_GIL_DISABLED:
+            IMMORTAL_REFCOUNT = 5 << 28
+        else:
+            IMMORTAL_REFCOUNT = 7 << 28
     else:
         IMMORTAL_REFCOUNT = 3 << 30