Update dependency redis to v8#60
Merged
Merged
Conversation
|
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This PR contains the following updates:
==7.4.0→==8.0.0Release Notes
redis/redis-py (redis)
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 these updates again.
This PR was generated by Mend Renovate. View the repository job log.