# What changed in async-lru

> 11 changes in async-lru 2 from its official release notes, upgrade guides and advisories: 1 breaking, 4 new APIs and options. Each one cited. Sources checked 2026-11-12. HTML: https://unstale.sh/pypi/async-lru/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## async-lru 2

### Breaking changes

- Using the cache from a different loop raises RuntimeError. (2.2.0) — [release notes](https://github.com/aio-libs/async-lru/releases/tag/v2.2.0)

### New APIs and options

- A parameter for custom cache key computation was added. (2.4.0) — [release notes](https://github.com/aio-libs/async-lru/releases/tag/v2.4.0)
- Adds a warning emitted when auto-reset occurs because the event loop changed. (2.3.0) — [release notes](https://github.com/aio-libs/async-lru/releases/tag/v2.3.0)
- Adds a read-only key lookup API. (2.3.0) — [release notes](https://github.com/aio-libs/async-lru/releases/tag/v2.3.0)
- A jitter parameter randomises TTL. (2.2.0) — [release notes](https://github.com/aio-libs/async-lru/releases/tag/v2.2.0)

### Fixes and other changes

- On Python 3.14, cached functions expose __annotate__ instead of __annotations__; read their annotations with annotationlib.get_annotations(). (2.4.0) — [release notes](https://github.com/aio-libs/async-lru/releases/tag/v2.4.0)
- Fixed a NameError when decorating a function whose annotations refer to names defined later, on Python 3.14. (2.4.0) — [release notes](https://github.com/aio-libs/async-lru/releases/tag/v2.4.0)
- Forwards the wait argument for bound methods. (2.3.0) — [release notes](https://github.com/aio-libs/async-lru/releases/tag/v2.3.0)
- Cross-loop cache access now auto-resets and rebinds to the current event loop. (2.3.0) — [release notes](https://github.com/aio-libs/async-lru/releases/tag/v2.3.0)
- Fixed a DeprecationWarning from asyncio.iscoroutinefunction. (2.1.0) — [release notes](https://github.com/aio-libs/async-lru/releases/tag/v2.1.0)
- Fixed cancellation of a task when all tasks waiting on it have been cancelled. (2.1.0) — [release notes](https://github.com/aio-libs/async-lru/releases/tag/v2.1.0)
