pypi / async-lru
async-lru
What changed in async-lru 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-12.
1 breaking4 new APIs and options6 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initasync-lru 211 changes
Breaking changes 1
Using the cache from a different loop raises RuntimeError.
New APIs and options 4
A parameter for custom cache key computation was added.
Adds a warning emitted when auto-reset occurs because the event loop changed.
Adds a read-only key lookup API.
A jitter parameter randomises TTL.
Fixes and other changes 6
On Python 3.14, cached functions expose __annotate__ instead of __annotations__; read their annotations with annotationlib.get_annotations().
Fixed a NameError when decorating a function whose annotations refer to names defined later, on Python 3.14.
Forwards the wait argument for bound methods.
Cross-loop cache access now auto-resets and rebinds to the current event loop.
Fixed a DeprecationWarning from asyncio.iscoroutinefunction.
Fixed cancellation of a task when all tasks waiting on it have been cancelled.