From: Jelle Zijlstra Date: Mon, 2 Oct 2023 15:03:53 +0000 (-0700) Subject: gh-110178: Use fewer weakrefs in test_typing.py (#110194) X-Git-Tag: v3.13.0a1~183 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=732ad44cec971be5255b1accbac6555d3615c2bf;p=thirdparty%2FPython%2Fcpython.git gh-110178: Use fewer weakrefs in test_typing.py (#110194) Confirmed that without the C changes from #108517, this test still segfaults with only 10 weakrefs. --- diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index 9e891f113840..9559e35e9f02 100644 --- a/Lib/test/test_typing.py +++ b/Lib/test/test_typing.py @@ -550,7 +550,7 @@ class TypeVarTests(BaseTestCase): with self.subTest(cls=cls): vals = weakref.WeakValueDictionary() - for x in range(100000): + for x in range(10): vals[x] = cls(str(x)) del vals