From: Victor Stinner Date: Fri, 20 Dec 2024 07:50:18 +0000 (+0100) Subject: gh-128058: Fix test_builtin ImmortalTests (#128068) X-Git-Tag: v3.14.0a4~229 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=daa260ebb1c1b20321e7f26df7c9dbd35d4edcbf;p=thirdparty%2FPython%2Fcpython.git gh-128058: Fix test_builtin ImmortalTests (#128068) On 32-bit Free Threading systems, immortal reference count is 5 << 28, instead of 7 << 28. Co-authored-by: Peter Bierma --- diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index a92edad86839..f98138391bc1 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -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