]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-111801: set a lower recursion limit for `test_infintely_many_bases()` in `test_isi...
authorBrett Cannon <brett@python.org>
Fri, 12 Jan 2024 23:19:21 +0000 (15:19 -0800)
committerGitHub <noreply@github.com>
Fri, 12 Jan 2024 23:19:21 +0000 (15:19 -0800)
Lib/test/test_isinstance.py
Misc/NEWS.d/next/Tests/2024-01-12-13-19-12.gh-issue-111801.9hh9DY.rst [new file with mode: 0644]

index bf9332e40aeaf2eb8bffaf4ab59598024a9b6b6d..791981b878b1f25a2f0787ec92ae9133f796a8f6 100644 (file)
@@ -344,7 +344,7 @@ class TestIsInstanceIsSubclass(unittest.TestCase):
                     pass
                 A.__getattr__ = B.__getattr__ = X.__getattr__
                 return (A(), B())
-        with support.infinite_recursion():
+        with support.infinite_recursion(25):
             self.assertRaises(RecursionError, issubclass, X(), int)
 
 
diff --git a/Misc/NEWS.d/next/Tests/2024-01-12-13-19-12.gh-issue-111801.9hh9DY.rst b/Misc/NEWS.d/next/Tests/2024-01-12-13-19-12.gh-issue-111801.9hh9DY.rst
new file mode 100644 (file)
index 0000000..660fddd
--- /dev/null
@@ -0,0 +1,3 @@
+Lower the recursion limit in ``test_isinstance`` for
+``test_infinitely_many_bases()``. This prevents a stack overflow on a
+pydebug build of WASI.