Skip to content

Commit

Permalink
pythongh-128058: Fix test_builtin ImmortalTests (python#128068)
Browse files Browse the repository at this point in the history
On 32-bit Free Threading systems, immortal reference count
is 5 << 28, instead of 7 << 28.

Co-authored-by: Peter Bierma <[email protected]>
  • Loading branch information
vstinner and ZeroIntensity authored Dec 20, 2024
1 parent 39e69a7 commit daa260e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Lib/test/test_builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2691,7 +2691,10 @@ def __del__(self):
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

Expand Down

0 comments on commit daa260e

Please sign in to comment.