summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2024-12-20 07:50:18 (GMT)
committerGitHub <noreply@github.com>2024-12-20 07:50:18 (GMT)
commitdaa260ebb1c1b20321e7f26df7c9dbd35d4edcbf (patch)
treeff2b97280bfe94110e10c0b81f9237f7004d9547 /Lib
parent39e69a7cd54d44c9061db89bb15c460d30fba7a6 (diff)
downloadcpython-daa260ebb1c1b20321e7f26df7c9dbd35d4edcbf.zip
cpython-daa260ebb1c1b20321e7f26df7c9dbd35d4edcbf.tar.gz
cpython-daa260ebb1c1b20321e7f26df7c9dbd35d4edcbf.tar.bz2
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 <zintensitydev@gmail.com>
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_builtin.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py
index a92edad..f981383 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