From 46e69576a96e200ed8e6c94c43864b3dc17f30a6 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Mon, 2 Oct 2023 10:15:30 -0700 Subject: [PATCH] [3.12] gh-110178: Use fewer weakrefs in test_typing.py (GH-110194) (#110224) gh-110178: Use fewer weakrefs in test_typing.py (GH-110194) Confirmed that without the C changes from GH-108517, this test still segfaults with only 10 weakrefs. (cherry picked from commit 732ad44cec971be5255b1accbac6555d3615c2bf) Co-authored-by: Jelle Zijlstra --- Lib/test/test_typing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_typing.py b/Lib/test/test_typing.py index eb7617737b8..83f25402d87 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