Skip to content

gh-144030: add check that argument is callable to Python version of functools.lru_cache#144031

Merged
vstinner merged 4 commits intopython:mainfrom
cfbolz:gh-144030-functools-lru-cache-python-version-callable-check
Jan 21, 2026
Merged

gh-144030: add check that argument is callable to Python version of functools.lru_cache#144031
vstinner merged 4 commits intopython:mainfrom
cfbolz:gh-144030-functools-lru-cache-python-version-callable-check

Conversation

@cfbolz
Copy link
Copy Markdown
Contributor

@cfbolz cfbolz commented Jan 19, 2026

The C version has this check, the Python version doesn't so far. This PR makes the behaviours agree again

Copy link
Copy Markdown
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit :)

Comment thread Lib/test/test_functools.py Outdated
Co-authored-by: sobolevn <mail@sobolevn.me>
Copy link
Copy Markdown
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread Misc/NEWS.d/next/Library/2026-01-19-12-48-59.gh-issue-144030.7OK_gB.rst Outdated
Comment thread Lib/functools.py
…OK_gB.rst

Co-authored-by: AN Long <aisk@users.noreply.github.com>
@rhettinger rhettinger self-assigned this Jan 20, 2026
@vstinner vstinner merged commit 5db331a into python:main Jan 21, 2026
47 checks passed
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
…n of functools.lru_cache (python#144031)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants