Skip to content

Commit daa260e

Browse files
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 <[email protected]>
1 parent 39e69a7 commit daa260e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/test/test_builtin.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -2691,7 +2691,10 @@ def __del__(self):
26912691
class ImmortalTests(unittest.TestCase):
26922692

26932693
if sys.maxsize < (1 << 32):
2694-
IMMORTAL_REFCOUNT = 7 << 28
2694+
if support.Py_GIL_DISABLED:
2695+
IMMORTAL_REFCOUNT = 5 << 28
2696+
else:
2697+
IMMORTAL_REFCOUNT = 7 << 28
26952698
else:
26962699
IMMORTAL_REFCOUNT = 3 << 30
26972700

0 commit comments

Comments
 (0)