Revert "bpo-46110: Add a recursion check to avoid stack overflow in the PEG parser (GH-30177)" (GH-30363)

This reverts commit e9898bf153 temporarily as we want to confirm if this commit is the cause of a slowdown at startup time.
This commit is contained in:
Pablo Galindo Salgado 2022-01-03 18:29:18 +00:00 committed by GitHub
parent c960b191b8
commit 9d35dedc5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 3197 additions and 4602 deletions

View file

@ -1729,14 +1729,6 @@ while 1:
"""
self._check_error(source, "too many statically nested blocks")
@support.cpython_only
def test_error_on_parser_stack_overflow(self):
source = "-" * 100000 + "4"
for mode in ["exec", "eval", "single"]:
with self.subTest(mode=mode):
with self.assertRaises(MemoryError):
compile(source, "<string>", mode)
def load_tests(loader, tests, pattern):
tests.addTest(doctest.DocTestSuite())