mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
GH-112215: Increase C recursion limit for non debug builds (GH-113397)
This commit is contained in:
parent
5f665e99e0
commit
45e09f921b
7 changed files with 33 additions and 21 deletions
|
@ -1862,6 +1862,20 @@ class TestLRU:
|
|||
self.assertEqual(str(Signature.from_callable(lru.cache_info)), '()')
|
||||
self.assertEqual(str(Signature.from_callable(lru.cache_clear)), '()')
|
||||
|
||||
@support.skip_on_s390x
|
||||
@unittest.skipIf(support.is_wasi, "WASI has limited C stack")
|
||||
def test_lru_recursion(self):
|
||||
|
||||
@self.module.lru_cache
|
||||
def fib(n):
|
||||
if n <= 1:
|
||||
return n
|
||||
return fib(n-1) + fib(n-2)
|
||||
|
||||
if not support.Py_DEBUG:
|
||||
with support.infinite_recursion():
|
||||
fib(2500)
|
||||
|
||||
|
||||
@py_functools.lru_cache()
|
||||
def py_cached_func(x, y):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue