Update dependency redis to v8#920
Conversation
Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates the pinned redis Python client dependency from 7.4.1 to 8.0.1 in backend requirements, pulling in redis-py 8.x behavioral and configuration changes (RESP3-by-default, new defaults for timeouts/connection pooling, type-hint changes, and new features/bugfixes). File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #920 +/- ##
=======================================
Coverage 86.06% 86.06%
=======================================
Files 63 63
Lines 3574 3574
Branches 662 662
=======================================
Hits 3076 3076
Misses 278 278
Partials 220 220 Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
|
Celery -> Kombu limits redis support to <8: |
This PR contains the following updates:
==7.4.1→==8.0.1Release Notes
redis/redis-py (redis)
v8.0.1: 8.0.1Compare Source
Changes
🐛 Bug Fixes
🧰 Maintenance
We'd like to thank all the contributors who worked on this release!
@violuke @mokashang @arpitjain099 @coredumperror @elena-kolevska @vladvildanov @petyaslavova
v8.0.0: 8.0.0Compare Source
Changes
🚀 Highlights
Async Cluster PubSub
This release introduces full asyncio Cluster PubSub support, bringing shard-channel capabilities (
SSUBSCRIBE,SUNSUBSCRIBE,SPUBLISH) to the asyncRedisClusterclient. The newClusterPubSubclass inredis.asyncio.clusterautomatically routes shard-channel subscriptions to the correct cluster node based on key-slot hashing, manages per-node PubSub connections, and supports round-robin message retrieval across nodes. Users can create a cluster pubsub instance viaRedisCluster.pubsub()and usessubscribe(),sunsubscribe(), andget_sharded_message()just as they would with the sync cluster client.Keyspace and subkey notifications
Redis Keyspace Notifications are now supported for standalone and cluster deployments in both sync and async modes. New classes —
KeyspaceNotifications,ClusterKeyspaceNotifications,AsyncKeyspaceNotifications, andAsyncClusterKeyspaceNotifications— provide a high-level API for keyspace/keyevent subscriptions and subkey notification families:subkeyspace,subkeyevent,subkeyspaceitem, andsubkeyspaceevent. Convenience methods likesubscribe_keyspace(),subscribe_keyevent(),subscribe_subkeyspace(),subscribe_subkeyevent(),subscribe_subkeyspaceitem(), andsubscribe_subkeyspaceevent()simplify common patterns, with channel classes for both key and subkey channels.In cluster mode, subscriptions are managed across primary nodes because each node emits notifications only for keys it owns, with built-in topology-change handling. Sync
run_in_thread()and asynclisten()workflows are supported.Redis Array commands(https://redis.io/docs/latest/develop/data-types/arrays/)
redis-py now supports Redis Arrays, a preview Redis data type for sparse, index-addressable sequences of strings. New
AR*command helpers cover indexed reads/writes, range scans, deletion, cursor-based insertion, ring-buffer writes, metadata, text search, and aggregation, includingARGET,ARSET,ARMGET,ARMSET,ARSCAN,ARGREP,ARRING, andAROP.Type Hints Improvements (breaking changes)
The
@overloadpattern has been applied systematically across core commands (core.py), VectorSet commands, and module commands (Search, JSON, TimeSeries, Bloom filters) to provide distinct return types for sync and async clients. Previously, methods returned a combinedResponseT(i.e.,Union[Awaitable[Any], Any]), which caused static analysis tools like mypy and Pyright to flag false positives. Now, sync clients see concrete return types (e.g.,int,bool,list[str]) while async clients seeAwaitable[...]wrappers. This is a breaking change for type-checking only—runtime behavior is unchanged, but code relying on the old union return types in type annotations may need updates. Two new protocol types,SyncClientProtocolandAsyncClientProtocol, are used in overload signatures to enable this distinction.RESP3 by default with opt-in unified responses
redis-py 8.0.0 now uses RESP3 on the wire by default while preserving legacy RESP2-compatible Python response shapes for existing applications (#4052). Protocol-independent unified response shapes are available by setting
legacy_responses=False, so affected commands return the same Python structure with RESP2 or RESP3.Use
protocol=2to force RESP2 on the wire,protocol=3to opt into native RESP3 response shapes, orlegacy_responses=Falseto migrate to unified responses. Seedocs/unified_responses.rstandspecs/unified_responses_migration_guide.mdfor the affected commands and migration details.Connection and retry defaults
Default connection settings were updated:
socket_timeoutandsocket_connect_timeoutnow default to 5 seconds, TCP keepalive is enabled by default, socket reads use a 32 KB buffer, connection pools default tomax_connections=100, and retry defaults now use 10 attempts with exponential jitter backoff.Note:
socket_timeoutcan affect blocking commands such asBLPOP/BRPOP; if a command blocks longer than the client socket timeout, it may raiseTimeoutErrorbefore the command timeout elapses (#2807).🧪 Experimental Features
🚀 New Features
🔥 Breaking changes
🐛 Bug Fixes
🧰 Maintenance
We'd like to thank all the contributors who worked on this release!
@hydroblaze @Br1an67 @mokashang @swoutch @armorbreak001 @Brumbelow @paoloredis @Pack-Yak1 @abersheeran @alisaifee @majiayu000 @uglide @dmaier-redislabs @vladvildanov @petyaslavova
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
To execute skipped test pipelines write comment
/ok-to-test.Documentation
Find out how to configure dependency updates in MintMaker documentation or see all available configuration options in Renovate documentation.