aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_sys_settrace.py
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-01-16 09:32:01 +0000
committerGitHub <noreply@github.com>2024-01-16 09:32:01 +0000
commit17b73ab99ef12f89d41acec7500a244e68b1aaa4 (patch)
treebcde8fca4dc4dae4f9ed5369a4ea23bb825f15bb /Lib/test/test_sys_settrace.py
parent6c502ba809ff662a5eebf8c6778dec6bd28918fb (diff)
downloadcpython-17b73ab99ef12f89d41acec7500a244e68b1aaa4.tar.gz
cpython-17b73ab99ef12f89d41acec7500a244e68b1aaa4.zip
GH-113655: Lower the C recursion limit on various platforms (GH-113944)
Diffstat (limited to 'Lib/test/test_sys_settrace.py')
-rw-r--r--Lib/test/test_sys_settrace.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/test_sys_settrace.py b/Lib/test/test_sys_settrace.py
index fc5ca72236b..ae6e192a7ab 100644
--- a/Lib/test/test_sys_settrace.py
+++ b/Lib/test/test_sys_settrace.py
@@ -3037,10 +3037,8 @@ class TestExtendedArgs(unittest.TestCase):
self.assertEqual(counts, {'call': 1, 'line': 301, 'return': 1})
def test_trace_lots_of_globals(self):
- count = 1000
- if _testinternalcapi is not None:
- remaining = _testinternalcapi.get_c_recursion_remaining()
- count = min(count, remaining)
+
+ count = min(1000, int(support.Py_C_RECURSION_LIMIT * 0.8))
code = """if 1:
def f():