pypi / redis
redis
What changed in redis 7 to 8, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-04.
9 breaking1 security5 deprecations85 new APIs and options11 behavior and defaults3 tooling45 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initredis 891 changes
Breaking changes 4
Decodes ACL LOG string values on the default RESP3 legacy callback.
Makes the listen method block.
The default is now 5 seconds; blocking commands may raise TimeoutError before their command timeout elapses.
Overloads now expose concrete sync return types and Awaitable-wrapped async return types; annotations relying on the previous combined union may need updating.
Deprecations 3
Deprecation is aligned for lib_name in async cluster.
Deprecation is aligned for lib_version in async cluster.
A deprecation notice was added to the setex() method.
New APIs and options 59
Adds support for moving multiple elements between lists with the blocking command.
Adds the COLLECT reducer to search aggregations.
ConnectionPool now supports use as a context manager.
Adds support for the FT.ALIASLIST command.
Adds experimental client-side HIMPORT fieldset support for standalone and cluster clients; the public API may change in a future minor version.
Adds support for moving multiple elements between lists.
Async standalone and cluster clients now support server-pushed maintenance notifications, allowing applications to adapt connection handling during maintenance.
Adds replica sentinel aliases.
Adds support for the set difference cardinality command.
Adds aclose() to release Sentinel client pools.
Adds close() to release Sentinel client pools.
Adds support for the set union cardinality command.
Adds the exclude_empty option, represented by EXCLUDEEMPTY, to TS.MRANGE.
Adds the exclude_empty option, represented by EXCLUDEEMPTY, to TS.MREVRANGE.
Adds support for the TS.NRANGE Time Series command.
Adds support for the TS.NREVRANGE Time Series command.
Adds TS.QUERYLABELS support to the Time Series command surface.
Adds support for the TS.READ Time Series command.
Adds MAXCOUNT option support to XREAD.
Adds MAXSIZE option support to XREAD.
Adds MAXCOUNT option support to XREADGROUP.
Adds MAXSIZE option support to XREADGROUP.
Adds a Redis Array command helper for indexed reads.
Adds the ARGREP Redis Array command helper.
Adds the ARMGET Redis Array command helper.
Adds the ARMSET Redis Array command helper.
Adds the AROP Redis Array command helper.
Adds a Redis Array ring-buffer write command helper.
Adds a Redis Array range-scan command helper.
Adds a Redis Array command helper for indexed writes.
New protocol type used in overload signatures to distinguish async-client return types.
Adds async keyspace notification support for cluster deployments.
Adds async keyspace and keyevent notification support for standalone deployments.
Adds support for a custom Claude command.
Adds a high-level keyspace notification API for cluster deployments, managing subscriptions across primary nodes.
Async RedisCluster now supports shard-channel PubSub, routing subscriptions by key-slot hashing and managing per-node connections.
Adds COUNT aggregator support to some sorted-set commands.
Retrieve shard-channel messages with async cluster PubSub.
Adds support for the INCREX command.
JSON.SET now supports the FPHA floating-point homogeneous array argument.
Adds a high-level keyspace and keyevent notification API for standalone deployments.
Set legacy_responses=False to opt into protocol-independent unified response shapes.
Async keyspace notification workflows support listen().
PubSub subscriptions now support binary channel names and handlers.
Adds a random load balancing strategy that allows use of the primary.
Adds helpers for the preview Redis Arrays data type, including indexed access, range scans, deletion, insertion, ring-buffer writes, metadata, text search, and aggregation.
Create a cluster pubsub instance from the async RedisCluster client.
Sync keyspace notification workflows support run_in_thread().
Subscribe to shard channels with async cluster PubSub.
Convenience method for keyevent subscriptions.
Convenience method for keyspace subscriptions.
Convenience method for subkeyevent subscriptions.
Convenience method for subkeyspace subscriptions.
Convenience method for subkeyspaceevent subscriptions.
Convenience method for subkeyspaceitem subscriptions.
Unsubscribe from shard channels with async cluster PubSub.
New protocol type used in overload signatures to distinguish sync-client return types.
Adds support for multiple aggregators in Time Series commands.
Adds support for the XNACK command.
Behavior and default changes 6
Connection pools now default to max_connections=100.
The default wire protocol is now RESP3; set protocol=2 to force RESP2 or protocol=3 for native RESP3 response shapes.
Retry defaults now use 10 attempts with exponential jitter backoff.
The default connection timeout is now 5 seconds.
Socket reads now use a 32 KB buffer by default.
TCP keepalive is enabled by default.
Tooling 1
The return type is now Literal[True].
Fixes and other changes 18
Concurrent hiredis disconnects now raise ConnectionError instead of AttributeError.
Fixes FIELDNAME aliases dropping the first character of un-prefixed fields.
Fixes the latitude/longitude swap in the search querystring geo() helper.
Restores the NEVER_DECODE option for FT.SEARCH with protocol=3.
Detects closed pooled connections without consuming pending push data when using RESP3 with hiredis.
Fixes Sentinel pool capacity loss after failover.
Fixes a double-decoding issue in unquote().
Fixes parsing RESP3 FT.SEARCH responses when keys are bytes-typed.
Fixes async MultiDBClient when its underlying client is RedisCluster.
Adds the missing URL query argument parser for ssl_min_version.
Fixes maintenance notification handling over Unix sockets.
Fixes async cluster connection cleanup during topology refresh.
Fixes a hang when invalidation arrives on another connection and a TypeError when a cached response is non-bytes.
Explicit None values for client metadata configuration are preserved.
Guards against RuntimeError on Python 3.13 and later.
Scalar prefixes are now normalized.
The return type is now Literal[True].
Handles scientific notation in scores when using RESP2.
redis 768 changes
Breaking changes 5
The batch_size attribute was removed from OTel metrics.
The consumer_name attribute was removed from OTel metrics.
Removes support for Python 3.9.
Adds an abstract method declaration for the cache property setter, affecting implementations of EvictionPolicyInterface.
Removes synchronous context manager handling from async RedisCluster.
Security 1
ConnectionPools no longer expose passwords in plain text logs through their __repr__ methods.
Deprecations 2
Deprecated for cluster clients; use the embedded client-side caching feature instead.
Deprecated for cluster clients; use the embedded client-side caching feature instead.
New APIs and options 26
ClusterPipeline objects now provide access to the cluster client's nodes_manager.
Asynchronous clients now support OpenTelemetry metrics export, including command, connection, resiliency, pubsub, and stream metrics.
ClusterPipeline objects now provide access to set_response_callback.
Adds a local digest command that executes XXH3 locally.
Adds a DriverInfo class for upstream driver tracking.
Adds support for HOTKEYS commands.
Adds support for Redis 8.6's Idempotent Producers feature.
Adds OpenTelemetry instrumentation and metrics export for the sync client, covering commands, connections, resiliency, pubsub, and streams.
Adds support for Redis 8.6 features, including stream idempotent production and HOTKEYS.
Adds ssl_ca_path support to the asynchronous Redis client.
Adds ssl_password support to the asynchronous Redis client.
Adds support for the VRANGE command.
Initial health check policies were added.
Adds experimental support for the CAD command.
Adds experimental support for the CAS command.
In experimental features, replaces the default health check and failure detector with custom ones.
Adds experimental support for HYBRID search.
Adds support for the MSETEX command.
Adds the CLAIM option to XREADGROUP.
Allows customization of the timeout parameter when using a blocking connection pool with a Redis cluster.
Adds an error raised when the server responds with 'problem with LDAP service'.
Adds support for handling maintenance push notifications during server upgrades or maintenance procedures.
An experimental client communicates with multiple eventually consistent databases in an Active-Active setup and handles failures by failing over across databases.
Adds the ssl_verify_flags_config argument for SSL connection configuration.
Adds the WITHATTRIBS option to the vector set vsim command.
Adds score_cast_func to zrank, zrevrank and zunion for consistency with other sorted set commands.
Behavior and default changes 5
Cluster clients handle SMIGRATING and SMIGRATED notifications by relaxing timeouts during migration and reloading cluster state when migration completes.
SCH is disabled by default in MultiDBClient underlying clients.
Logging was added for MultiDBClients.
Expands the cluster READ_COMMANDS list with additional read-only commands.
Applies routing and response aggregation policies in OSS Cluster mode.
Tooling 2
Adds support for Python 3.14.
Improves type annotations for Redis Search and Aggregate.
Fixes and other changes 27
Fixes an AttributeError when recording cluster metrics if the connection is None or a ClusterNode instance is used to extract connection info.
Basic Otel classes and functions can now be imported through redis.observability.
The keys parameter type annotation for blpop now uses KeysT.
The keys parameter type annotation for brpop now uses KeysT.
Connections now ensure they have an initialized protocol.
Missing shard channel message types were added to async PubSub.
Reconnects with binary channel names no longer cause UnicodeDecodeError.
Issues with ClusterPipeline connection management were fixed.
Connection attributes are handled conditionally for metrics, and connection data is set on exceptions in cluster error handling.
Fixes lock contention during connection establishment.
Prevents a deadlock when Lock.release() is cancelled.
Fixes handling of circular MOVED redirects in cluster slot mapping.
Fixes invalidation when Redis keys mix str and bytes types.
Fixes ClusterClient behavior when topology is refreshed and addresses places where connections might leak.
Fixes a RuntimeError in the sharded message generator.
Generates a unique command cache key.
Retries the overall connect operation, including socket connect and handshake, addressing PubSub reconnect issues.
Fixes unrecoverable connection state.
Fixes health check handling for the sync PubSub client.
Fixes async clients' safety when used as an async context manager.
Changes the timeout type hint in async BlockingConnectionPool from int to float.
Fixes the synchronous BlockingConnectionPool disconnect method to follow the ConnectionPoolInterface definition.
Adds handling of empty spaces during CLIENT LIST response parsing.
Fixes several *arg type hints in core.py and JSON module commands.
Fixes argument type hints for evalsha and similar commands.
Updates the ping command method return type hint.
Fixes the ordering of SORTABLE, INDEXEMPTY and INDEXMISSING when using RediSearch fields.