summaryrefslogtreecommitdiffstats
path: root/Tools/scripts
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-07-03 05:04:23 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-07-03 05:04:23 (GMT)
commitf488fb422a641aa7c38eb63c09f459e4baff7bc4 (patch)
treef09d64f919af622c0ebf28adb9a3bfec567e47c8 /Tools/scripts
parent27be130ec71fa95e2496bd9e42505aa6c7457682 (diff)
downloadcpython-f488fb422a641aa7c38eb63c09f459e4baff7bc4.zip
cpython-f488fb422a641aa7c38eb63c09f459e4baff7bc4.tar.gz
cpython-f488fb422a641aa7c38eb63c09f459e4baff7bc4.tar.bz2
Issue #19235: Add new RecursionError exception. Patch by Georg Brandl.
Diffstat (limited to 'Tools/scripts')
-rwxr-xr-xTools/scripts/find_recursionlimit.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/scripts/find_recursionlimit.py b/Tools/scripts/find_recursionlimit.py
index 1171146..b2842a6 100755
--- a/Tools/scripts/find_recursionlimit.py
+++ b/Tools/scripts/find_recursionlimit.py
@@ -92,7 +92,7 @@ def test_cpickle(_cache={}):
def test_compiler_recursion():
# The compiler uses a scaling factor to support additional levels
# of recursion. This is a sanity check of that scaling to ensure
- # it still raises RuntimeError even at higher recursion limits
+ # it still raises RecursionError even at higher recursion limits
compile("()" * (10 * sys.getrecursionlimit()), "<single>", "single")
def check_limit(n, test_func_name):
@@ -107,7 +107,7 @@ def check_limit(n, test_func_name):
# AttributeError can be raised because of the way e.g. PyDict_GetItem()
# silences all exceptions and returns NULL, which is usually interpreted
# as "missing attribute".
- except (RuntimeError, AttributeError):
+ except (RecursionError, AttributeError):
pass
else:
print("Yikes!")