René's URL Explorer Experiment


Title: Parameters for a call to a function wrapped in a lru_cache are not checked · Issue #16261 · python/mypy · GitHub

Open Graph Title: Parameters for a call to a function wrapped in a lru_cache are not checked · Issue #16261 · python/mypy

X Title: Parameters for a call to a function wrapped in a lru_cache are not checked · Issue #16261 · python/mypy

Description: Bug Report The parameters used in a call to a function which is wrapped in a functools.lru_cache are not checked. To Reproduce from datetime import date from functools import lru_cache @lru_cache def f(v: str, at: date) -> str: return v ...

Open Graph Description: Bug Report The parameters used in a call to a function which is wrapped in a functools.lru_cache are not checked. To Reproduce from datetime import date from functools import lru_cache @lru_cache d...

X Description: Bug Report The parameters used in a call to a function which is wrapped in a functools.lru_cache are not checked. To Reproduce from datetime import date from functools import lru_cache @lru_cache d...

Opengraph URL: https://github.com/python/mypy/issues/16261

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Parameters for a call to a function wrapped in a lru_cache are not checked","articleBody":"**Bug Report**\r\n\r\nThe parameters used in a call to a function which is wrapped in a `functools.lru_cache` are not checked.\r\n\r\n**To Reproduce**\r\n\r\n```python\r\nfrom datetime import date\r\nfrom functools import lru_cache\r\n\r\n@lru_cache\r\ndef f(v: str, at: date) -> str:\r\n    return v\r\n\r\nf()\r\nf(\"abc\")\r\nf(\"abc\", date.today())\r\nf(\"abc\", now=date.today())\r\nf(\"abc\", at=date.today())\r\nf(\"abc\", at=\"wrong_type\")\r\n```\r\n\r\n**Expected Behavior**\r\n\r\nThis should raise several errors about the arguments being wrong. Commenting out the line `@lru_cache` correctly generates the following errors.\r\n\r\n```\r\nlru_cache_type_test.py:8: error: Missing positional arguments \"v\", \"at\" in call to \"f\"  [call-arg]\r\nlru_cache_type_test.py:9: error: Missing positional argument \"at\" in call to \"f\"  [call-arg]\r\nlru_cache_type_test.py:11: error: Unexpected keyword argument \"now\" for \"f\"  [call-arg]\r\nlru_cache_type_test.py:13: error: Argument \"at\" to \"f\" has incompatible type \"str\"; expected \"date\"  [arg-type]\r\n```\r\n\r\n**Actual Behavior**\r\n\r\n`Success: no issues found in 1 source file`\r\n\r\n**Your Environment**\r\n\r\nmypy 1.6.0 running on Python 3.11.6\r\n","author":{"url":"https://github.com/andrewjw","@type":"Person","name":"andrewjw"},"datePublished":"2023-10-13T16:16:00Z","url":"https://github.com/python/mypy/issues/16261"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:590f5788-327f-d57b-c1ff-a09f8e6f81c6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD7CA:5537E:1531E7D:1BD848D:6B000E62
html-safe-nonce2c555eaa2b8e3848a3bd3656cc8591aa4aae7f73eb3a52a1f39043cd470d9111
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEN0NBOjU1MzdFOjE1MzFFN0Q6MUJEODQ4RDo2QjAwMEU2MiIsInZpc2l0b3JfaWQiOiI3ODYwNjM3MzQ0MzY0MjM2Mzg2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac0b344182e735777c9c0d89f7bd06b1f1703020efd4fc391c963f2a8b90c3600f
hovercard-subject-tagissue:1942237973
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/mypy/16261/issue_layout
twitter:imagehttps://opengraph.githubassets.com/73b16d075901850348d1dc6b28eedbca4a60daaac66d9c042dfea54b5b41892e/python/mypy/issues/16261
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/73b16d075901850348d1dc6b28eedbca4a60daaac66d9c042dfea54b5b41892e/python/mypy/issues/16261
og:image:altBug Report The parameters used in a call to a function which is wrapped in a functools.lru_cache are not checked. To Reproduce from datetime import date from functools import lru_cache @lru_cache d...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameandrewjw
hostnamegithub.com
expected-hostnamegithub.com
Nonecf7ee0062053ad9eb05b6e5de57bd96c2055708bcbada4144946b5ec129cf1d7
turbo-cache-controlno-preview
go-importgithub.com/python/mypy git https://github.com/python/mypy.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id7053637
octolytics-dimension-repository_nwopython/mypy
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id7053637
octolytics-dimension-repository_network_root_nwopython/mypy
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9cab7de176a56362d2aabcbb4d1e07e846eba8a0
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/mypy/issues/16261#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F16261
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F16261
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fmypy
Reloadhttps://github.com/python/mypy/issues/16261
Reloadhttps://github.com/python/mypy/issues/16261
Reloadhttps://github.com/python/mypy/issues/16261
pythonhttps://github.com/python
mypyhttps://github.com/python/mypy
Codehttps://github.com/python/mypy
Issues2.7k (2.7k)https://github.com/python/mypy/issues
Pull requests546 (546)https://github.com/python/mypy/pulls
Actionshttps://github.com/python/mypy/actions
Projectshttps://github.com/python/mypy/projects
Wikihttps://github.com/python/mypy/wiki
Security and qualityhttps://github.com/python/mypy/security
Insightshttps://github.com/python/mypy/insights
https://github.com/python/mypy
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/16261
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/16261
#19432https://github.com/python/mypy/pull/19432
Parameters for a call to a function wrapped in a lru_cache are not checkedhttps://github.com/python/mypy/issues/16261#top
#19432https://github.com/python/mypy/pull/19432
bugmypy got something wronghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/andrewjw
andrewjwhttps://github.com/andrewjw
on Oct 13, 2023https://github.com/python/mypy/issues/16261#issue-1942237973
andrewjwhttps://github.com/andrewjw
bugmypy got something wronghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22bug%22
on Oct 13, 2023https://github.com/python/mypy/issues/16261#event-10646145207
andrewjwhttps://github.com/andrewjw
on Oct 13, 2023https://github.com/python/mypy/issues/16261#event-10646149857
https://github.com/Hnasar
Hnasarhttps://github.com/Hnasar
on Oct 16, 2023https://github.com/python/mypy/issues/16261#issuecomment-1765272969
#5107 (comment)https://github.com/python/mypy/issues/5107#issuecomment-1355954910
https://github.com/andrewjw
andrewjwhttps://github.com/andrewjw
on Oct 17, 2023https://github.com/python/mypy/issues/16261#issuecomment-1765883312
machin0rhttps://github.com/machin0r
on Jul 13, 2025https://github.com/python/mypy/issues/16261#event-18606019778
Add functools.lru_cache plugin supporthttps://github.com/machin0r/mypy/commit/c502b02c3804006eff6180f990d5e2cf10121456
c502b02https://github.com/machin0r/mypy/commit/c502b02c3804006eff6180f990d5e2cf10121456
Add functools.lru_cache plugin supporthttps://github.com/machin0r/mypy/commit/a4372e82278318bc0a140f8465df3331a9d00fbe
a4372e8https://github.com/machin0r/mypy/commit/a4372e82278318bc0a140f8465df3331a9d00fbe
Add functools.lru_cache plugin supporthttps://github.com/machin0r/mypy/commit/d9d5d00de64aa3108cf36a6be3e0b35a50e8652e
d9d5d00https://github.com/machin0r/mypy/commit/d9d5d00de64aa3108cf36a6be3e0b35a50e8652e
https://github.com/machin0r
machin0rhttps://github.com/machin0r
on Oct 22, 2025https://github.com/python/mypy/issues/16261#issuecomment-3434452101
#19432https://github.com/python/mypy/pull/19432
machin0rhttps://github.com/machin0r
on Dec 23, 2025https://github.com/python/mypy/issues/16261#event-21728437919
Add functools.lru_cache plugin supporthttps://github.com/machin0r/mypy/commit/671ce92f29a33d88698844c2c97142b10b4825c0
671ce92https://github.com/machin0r/mypy/commit/671ce92f29a33d88698844c2c97142b10b4825c0
Add functools.lru_cache plugin supporthttps://github.com/machin0r/mypy/commit/edfda9b343b5cd2cc64306095e578a0d6e4bf6a2
edfda9bhttps://github.com/machin0r/mypy/commit/edfda9b343b5cd2cc64306095e578a0d6e4bf6a2
Add functools.lru_cache plugin supporthttps://github.com/machin0r/mypy/commit/3e81c9d2bd1b3dea10cf7d0cc82410a83de04ab0
3e81c9dhttps://github.com/machin0r/mypy/commit/3e81c9d2bd1b3dea10cf7d0cc82410a83de04ab0
Add functools.lru_cache plugin supporthttps://github.com/machin0r/mypy/commit/d9466f025c00c7f2ace1398311be64ab8143215c
d9466f0https://github.com/machin0r/mypy/commit/d9466f025c00c7f2ace1398311be64ab8143215c
https://github.com/cj81499
cj81499https://github.com/cj81499
on Jan 9, 2026https://github.com/python/mypy/issues/16261#issuecomment-3729620109
#19291 (comment)https://github.com/python/mypy/issues/19291#issuecomment-3729601276
https://mypy-play.net/?mypy=latest&python=3.14&flags=strict&gist=d555423c3f7f92b172480b0eefbf2de4https://mypy-play.net/?mypy=latest&python=3.14&flags=strict&gist=d555423c3f7f92b172480b0eefbf2de4
ilevkivskyihttps://github.com/ilevkivskyi
Add full support for functools.lru_cache #19291https://github.com/python/mypy/issues/19291
on Jan 27, 2026https://github.com/python/mypy/issues/16261#event-22303606174
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/mypy/issues/16261
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/mypy/issues/16261
bugmypy got something wronghttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.