Skip to content

3.12 setrecursionlimit is ignored in connection with @functools.cache#112215

@PeterLuschny

Description

@PeterLuschny

Bug report

A minimal example:

# fib.py importsyssys.setrecursionlimit(2000) fromfunctoolsimportcache@cachedeffib(n): ifn<1: return0ifn==1: return1returnfib(n-1) +fib(n-2) print(fib(500))

CPython versions tested on:

CPython main branch

Operating systems tested on:

Windows

Edit: This (simpler) example is from @dimpase .

Linked PRs

Metadata

Metadata

Assignees

Labels

3.12only security fixes3.13bugs and security fixes3.14bugs and security fixesextension-modulesC modules in the Modules dirstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions