Features
- Migrate entire library to
anyio, adding structured concurrency andtriosupport. - Pipelines auto-execute when exiting their context manager; results are accessible in a type-safe way.
Library.wrapsrenamed tocoredis.commands.function.wrapsand now supports callbacks.coredis.commands.Scriptandcoredis.commands.Functioncan now be called with
optional callbacks to transform the raw response from redis before returning it. This is supported
by their associatedwrapsdecorators as well.coredis.Redis.lock&coredis.RedisCluster.lockadded as a convenient accessors
for the Lua-based lock:coredis.lock.Lock(Previously found incoredis.recipes.LuaLock).
Breaking Changes
-
Almost all classes (clients, connection pools, PubSub, pipelines) now require being used with
their async context managers for initialization/cleanup. -
Users should replace
TrackingCachewithcoredis.cache.LRUCachewhen providing a cache
instance to the clients. Cache size can no longer be bound by byte size and onlymax_keysis supported. -
All connection pools are now blocking.
-
Pipelines
- Pipelines no longer expose an explicit
execute()method and instead auto-execute when leaving
their context manager. - Removed
__len__and__bool__methods ofcoredis.pipeline.Pipeline - Drop support for explicit management of
watch,unwatch,multiin pipelines. This
is replaced by thecoredis.pipeline.Pipeline.watchasync context manager.
- Pipelines no longer expose an explicit
-
When defining type stubs for FFI for Lua scripts or library functions, keys can only be distinguished
from arguments by annotating them withcoredis.typing.KeyT.
Removals
- Drop support for
RESP2. - Remove
Monitorwrapper. - Remove
RedisGraphmodule support.