GH-125174: Make immortal objects more robust, following design from PEP 683 (GH-125251)

This commit is contained in:
Mark Shannon 2024-10-10 18:19:08 +01:00 committed by GitHub
parent 01fc3b34cc
commit c9014374c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 61 additions and 72 deletions

View file

@ -2574,9 +2574,9 @@ class ShutdownTest(unittest.TestCase):
class ImmortalTests(unittest.TestCase):
if sys.maxsize < (1 << 32):
IMMORTAL_REFCOUNT = (1 << 30) - 1
IMMORTAL_REFCOUNT = 3 << 29
else:
IMMORTAL_REFCOUNT = (1 << 32) - 1
IMMORTAL_REFCOUNT = 3 << 30
IMMORTALS = (None, True, False, Ellipsis, NotImplemented, *range(-5, 257))