[3.10] GH-94329: Don't raise on excessive stack consumption (GH-94421) (#94448)

This commit is contained in:
Mark Shannon 2022-07-11 13:21:17 +01:00 committed by GitHub
parent 30015de723
commit b87d03d355
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 7 deletions

View file

@ -1035,6 +1035,12 @@ class TestExpressionStackSize(unittest.TestCase):
code += " x and x\n" * self.N
self.check_stack_size(code)
def test_stack_3050(self):
M = 3050
code = "x," * M + "=t"
# This raised on 3.10.0 to 3.10.5
compile(code, "<foo>", "single")
class TestStackSizeStability(unittest.TestCase):
# Check that repeating certain snippets doesn't increase the stack size