mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
GH-113655: Lower the C recursion limit on various platforms (GH-113944)
This commit is contained in:
parent
6c502ba809
commit
17b73ab99e
13 changed files with 41 additions and 39 deletions
|
@ -1875,8 +1875,14 @@ class TestLRU:
|
|||
return fib(n-1) + fib(n-2)
|
||||
|
||||
if not support.Py_DEBUG:
|
||||
depth = support.Py_C_RECURSION_LIMIT*2//7
|
||||
with support.infinite_recursion():
|
||||
fib(2500)
|
||||
fib(depth)
|
||||
if self.module == c_functools:
|
||||
fib.cache_clear()
|
||||
with support.infinite_recursion():
|
||||
with self.assertRaises(RecursionError):
|
||||
fib(10000)
|
||||
|
||||
|
||||
@py_functools.lru_cache()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue