Repository navigation
Releases
8.2.0b1
Changes
✨ Highlights
Client-side caching: tracking modes and metadata-driven eligibility
CacheConfig takes a new tracking_mode option (TrackingMode.PLAIN, OPTIN or OPTOUT). It also takes an optional cache_predicate(command, keys) that decides which eligible replies are stored. With OPTIN or OPTOUT, the server tracks only the keys the client caches. PLAIN is the default and keeps the current behavior. (#4358)
Cache eligibility and cluster routing now come from one source: the command metadata in redis.commands.metadata. A MetadataResolver can be passed with metadata_resolver= to Redis, ConnectionPool and RedisCluster. CacheConfig.DEFAULT_ALLOW_LIST is deprecated and is no longer read. (#4272)
The same resolver decides which commands are safe to route to cluster replicas. This lets module commands, for example from FalkorDB, use replica reads through custom metadata. redis.asyncio.RedisCluster now accepts metadata_resolver= too. READ_COMMANDS is deprecated and is no longer read. (#4265)
Python support
This release drops Python 3.10, which has reached end of life, and adds Python 3.15. (#4489)
🚀 New Features
- Feat/register custom read commands (#4265)
- feat: decide client-side cache eligibility from command metadata (#4272)
- Added CLIENT LIST iterator alternative (#4327)
- Added support for CELL_SIZE argument for CMS.INITBYDIM and CMS.INITBYPROB (#4341)
- feat: add OPTIN and OPTOUT tracking modes to client-side caching (#4358)
- feat: bless commands family (#4362)
- feat: add set member expiration commands (SEXPIRE family and SADDEX) (#4543)
⚠️ Deprecations
- feat: decide client-side cache eligibility from command metadata (#4272)
🐛 Bug Fixes
- test + fix: add sharded pub/sub e2e coverage and fix the client defects it exposed (#4076)
- Fix return_field ignoring decode_field for aliased fields (#4243)
- Pass zrevrange key as a list in options["keys"] to match sibling range commands (#4244)
- fix(asyncio): raise on EOF in can_read() so pools replace server-closed connections (#4260)
- fix(multidb): stop star-unpacking args in execute_pubsub_method (#4276)
- fix(lock): preserve zero-timeout locks on renewal (#4282)
- fix(asyncio): raise ConnectionError when writing to a peer-closed connection (#4288)
- fix(sentinel): disconnect on read errors by default (#4292)
- fix: treat
InvalidResponseas connection-invalidating even whendisconnect_on_error=False(#4293) - Clear the in-progress cache entry when a read fails (#4306)
- fix: raise when only one FILTER_BY_VALUE bound is given (#4310)
- fix(multidb): pass transaction options as keyword arguments (#4340)
- Fix CLUSTER SHARDS slots shape differing between RESP2 and RESP3 (#4380)
- Wait for the pubsub worker before stop() returns (#4400)
- Decode consumer keys in XINFO STREAM FULL responses on RESP3 (#4401)
- Keep RESP2 score text when converting RESP3 scores to legacy shapes (#4427)
- Fix VADD updates with empty attributes (#4430)
- Return str legacy scores when decode_responses=True (#4432)
- Do not execute the async utils.pipeline batch after an exception (#4435)
- Add FUNCTION STATS to the unified and legacy response callbacks (#4453)
- Bound the SSL handshake by socket_connect_timeout (#4471)
- Honor field encodings in FT.PROFILE search results (#4475)
- bug(multidb): Fixed in-use connections to not be forcefully closed on failover (#4481)
- Return floats from INCREX BYFLOAT with unified responses on RESP2 (#4519)
- Return floats from MEMORY STATS with unified responses on RESP2 (#4529)
- Return TS.INFO rules as a list on RESP3 (#4553)
🧰 Maintenance
- test + fix: add sharded pub/sub e2e coverage and fix the client defects it exposed (#4076)
- Fix db.client.connection.count metric drifting over time (#4078)
- perf: cache default response callbacks instead of rebuilding on every client init (standalone sync and async clients) (#4124)
- Add ASM (Atomic Slot Migration) cluster maintenance-notification scenario tests (#4158)
- Use hiredis command packing for async connections (#4191)
- Eliminate GC refcounting cycle on _connect exception (#4195)
- perf(connection): pipeline the sync connection handshake (#4203)
- fix: allow EVALSHA in ClusterPipeline (#2914) (#4206)
- Document that querystring values are not unquoted twice (#4209)
- docs: add hash examples notebook (#4228)
- Report test metrics once a night instead of from every CI job (#4229)
- perf/fix: Use lazy logging in pub/sub push handlers to avoid formatting discarded debug messages (#4231)
- test: add unit tests for pairs_to_dict and pairs_to_dict_typed (#4234)
- fix(zadd): correct the mutually-exclusive-option error message (#4235)
- build(deps): bump rojopolis/spellcheck-github-actions from 0.62.0 to 0.68.0 (#4236 #4304 #4554)
- build(deps): bump actions/setup-python from 6 to 7 (#4237)
- build(deps): bump actions/stale from 10 to 11 (#4238)
- build(deps): bump github/codeql-action from 4 to 4.39.1 (#4239 #4303 #4366 #4555)
- fix(asyncio): reject connection URLs missing the scheme separator (#4246)
- fix: release async cluster transaction connections to their real owner (#4254)
- Fix async cluster release race for closed connections (#4256)
- fix(lock): preserve token when sync Lock.release() fails (#4258)
- docs(cluster): say which async ClusterPipeline methods must be awaited (#4264)
- Assert the reclamation property in the _connect cycle tests (#4267)
- docs: point multi-database docs at geographic_failover (#4269)
- docs: fix OpenTelemetry Flask guide URL (#4270)
- Don't crash parsing CLIENT INFO with '=' or spaces in a field value (#4275)
- Fix asyncio Connection mutating caller retry_on_error list (#4280)
- fix(connection): parse retry_on_error URL query as exception classes (#4281)
- fix: raise ConnectionError when async RESP3 parser reads after disconnect (#4283)
- test: add unit tests for dict_merge, merge_result and list_keys_to_dict (#4290)
- Fix typos in example notebooks (#4294)
- Fix dead links in vector similarity example notebook (#4295)
- fix(cluster): initialize async Pub/Sub before routing (#4297)
- Do not lose pool capacity when connection construction fails (#4298)
- Fix integration tests for Redis Enterprise runs (#4300)
- Stabilize MultiDB (Active-Active) client and tests (#4301)
- Stabilize maint notifications tests and add connection diagnostics (#4302)
- docs: fix fused/duplicated words in core and cluster docstrings (#4311)
- docs(search): fix 'info an stats about the the' in both ft.info docstrings (#4312)
- docs: drop duplicated words in sentinel and maint_notifications comments (#4313)
- fix(asyncio): set lock_name on the errors the async lock raises (#4317)
- test: run the assertions that sit inside pytest.raises blocks (#4319)
- Fix OverflowError in exponential backoff during a long outage (#4320)
- [fix(asyncio)] Refresh cluster topology before retrying MOVED redirects (#4322)
- Align empty cluster target handling (#4324)
- Preserve explicit port zero in connection URLs (#4325)
- docs(search): replace retired redisearch doc links in field docstrings (#4332)
- fix: 'one of the followings' -> 'one of the following' and fix :param fields (#4333)
- docs: add the missing 'the' in 'Each call to current method/command' (#4334)
- Reject bool and out-of-range Connection port (#4335)
- docs: note that PubSub.listen() returns immediately when nothing is subscribed (#4336)
- Avoid Python deprecation warnings for Redis commands (#4338)
- fix(keyspace): parse length-prefixed payloads in the byte domain (#4342)
- fix(asyncio): close the health check HTTP thread pool on shutdown (#4343)
- fix: accept numeric string for px in extract_expire_flags (#4344)
- Fix connection leak in utils.pipeline() on exception (#4345)
- test(asyncio): align wait_for_message with the sync helper's 0.5 s budget (nightly 8.10/py3.14 unified cells) (#4346)
- fix(search): forward TIMEOUT 0 in hybrid_search (#4347)
- fix: reject malformed subkey notifications (#4348)
- docs: add a pub/sub example notebook (#4349)
- Return floats from VEMB with unified responses on RESP2 (#4350)
- Escape the decimal point in the unstring float pattern (#4351)
- Added health_check_timeout relaxation + E2E tests for MultiDBClient and SCH enabled (#4354)
- Bind OCSP response to the certificate being validated (#4355)
- fix(geo): encode GEOSEARCH zeros instead of dropping them (#4356)
- Fix XPENDING filtering for empty consumer names (#4357)
- Ignore PyJWT 2.13.0 CVEs in dependency audit until redis-entraid is updated (#4359)
- Update test images and increase pypy tests timeout (#4360)
- fix(bf): don't send NONSCALING/NOCREATE when the flag is False (#4364)
- build(deps): bump pypa/gh-action-pip-audit from 1.0.8 to 1.1.0 (#4365)
- fix(commands): omit COUNT when count=None in the *MPOP commands (#4367)
- Generate lock tokens with uuid4 instead of predictable uuid1 (#4368)
- Adding CVE-2026-103001 to the ignore list (#4369)
- chore: skip coverage collection and codecov upload in PyPy CI jobs (#4370)
- Make the test suite collectable and dev requirements installable on Windows (#4371)
- Fix zero-count limits in search requests (#4373)
- fix: recognize OFF as false in URL boolean parsing (#4376)
- fix(asyncio): convert synchronous retry policies (#4381)
- Fix bf incrby docstring examples to call the real client API (#4382)
- feat: support RediSearch 8.12 HNSW SQ8 compression in FT.INFO unified parsing (#4386)
- fix(asyncio): add the missing get_sharded_message alias to PubSub (#4387)
- fix: cache the redis package version lookup in get_lib_version (#4390)
- Add keyword-only sleep argument to asyncio Lock.acquire (#4391)
- fix(asyncio): avoid blocking the event loop during cluster WATCH retries (#4392)
- fix(csc): refuse user-sent CLIENT TRACKING and RESET on cache-managed connections (#4393)
- chore: add prepar...
8.1.0
Changes
✨ Highlights
Async maintenance notifications
redis-py now supports server-pushed maintenance notifications in the asyncio stack for both
standalone and cluster clients, bringing the async client to parity with the sync implementation.
When a Redis deployment signals maintenance events (such as node migration or failover windows), the
async client reacts through the maintenance-notifications handler (redis/maint_notifications.py and
its async integration under redis/asyncio/), allowing applications to adapt connection handling
during maintenance without downtime. (#4177)
Expanded command coverage
This release adds a batch of new command surfaces across core data types and modules:
- Lists —
LMOVEM/BLMOVEMfor moving multiple elements between lists (#4174). - Sets —
SDIFFCARDandSUNIONCARDcardinality commands (#4171). - Streams —
MAXCOUNT/MAXSIZEoptions forXREADandXREADGROUP(#4173). - Time Series —
TS.READ(#4170),TS.QUERYLABELS(#4197),TS.NRANGE/TS.NREVRANGE(#4163),
and anexclude_empty(EXCLUDEEMPTY) option forTS.MRANGE/TS.MREVRANGE(#4188). - Search —
FT.ALIASLIST(#4198) and aCOLLECTreducer for aggregations (#4179). - Sentinel — replica sentinel aliases (#4127).
🚀 New Features
- Add replica sentinel aliases (#4127)
- Add TS.NRANGE and TS.NREVRANGE support to the timeseries command surface (#4163)
- feat: add TS.READ command support to the timeseries module (#4170)
- feat: add SDIFFCARD and SUNIONCARD command support (#4171)
- feat: add MAXCOUNT/MAXSIZE support to XREAD and XREADGROUP (#4173)
- feat: add LMOVEM and BLMOVEM commands for moving multiple list elements (#4174)
- feat: add async maintenance-notifications support for standalone and cluster clients (#4177)
- feat: add COLLECT reducer support to search aggregations (#4179)
- feat: add exclude_empty (EXCLUDEEMPTY) option to TS.MRANGE and TS.MREVRANGE (#4188)
- feat: add TS.QUERYLABELS support to the timeseries command surface (#4197)
- feat: add FT.ALIASLIST support (#4198)
⚠️ Experimental
- feat: add client-side HIMPORT fieldset support for standalone and cluster clients (#4205)
The feature considered unstable and public API might be changed in the future minor version
🐛 Bug Fixes
- fix: detect closed pooled connection without consuming pending push data (RESP3 + hiredis) (#4156)
- Fix Sentinel pool capacity loss after failover (#4193)
- fix: Restore NEVER_DECODE option for FT.SEARCH with protocol=3 (#4196)
- Decode ACL LOG string values on the default RESP3 legacy callback (#4201)
- fix: Fixed double decoding issue with unquote() (#4222)
- Fix lat/lon swap in search querystring geo() helper (#4223)
- Fix FIELDNAME alias dropping first character of un-prefixed fields (#4224)
🧰 Maintenance
- ci: report test duration metrics to Grafana Cloud (PAWS) (#4132)
- fix(hiredis): raise ConnectionError instead of AttributeError on concurrent disconnect (#4136)
- docs: consolidate AI-agent guidance into root AGENTS.md and portable agents/skills (#4159)
- Bump actions/checkout from 6 to 7 (#4160)
- Bump rojopolis/spellcheck-github-actions from 0.60.0 to 0.62.0 (#4161)
- test(search): add multi-language RediSearch coverage, re-enable search module pipeline tests, add 8.10 to CI matrix (#4162)
- Remove stale "connection" arg from get_resolved_ip docstring (#4164)
- Add context manager support to ConnectionPool (#4167)
- test: add unit tests for cluster key_slot hash-tag logic (#4168)
- Add unit tests for string helper utilities (#4180)
- test: add unit tests for decode_field_value (#4181)
- Add unit tests for extract_expire_flags and truncate_text (#4183)
- fix: add close()/aclose() to Sentinel to release sentinel client pools (#4184)
- test: add FT.SEARCH server-timeout coverage for return and fail policies (#4186)
- test: run the standard suite against an external Redis Enterprise database (#4189)
- build: bump Read the Docs build.os from ubuntu-20.04 to ubuntu-24.04 (#4190)
- fix: add missing type annotations to LockError and RedisClusterException (#4194)
- test: add VectorField RERANK serialization tests for sync and async search (#4202)
We'd like to thank all the contributors who worked on this release!
@LOGESHWAR123 @kiryazovi-redis @Stunned1 @eeshsaxena @sean-kim05 @Brumbelow @Sanjays2402 @nazarli-shabnam @chuenchen309 @petyaslavova
8.0.1
Changes
🐛 Bug Fixes
- Fix Unix socket maintenance notification handling and tests (#4097)
- Fix async cluster node connection release on write errors (#4111)
- Fixed async MultiDBClient with underlying RedisCluster (#4108)
- Fix hiredis readiness checks for high file descriptors (#4115)
- fix(search): parse RESP3 FT.SEARCH responses with bytes-typed keys (#4109)
- Fixing pubsub's listen method to be blocking. (#4119)
- fix(asyncio): release pooled connection when Pipeline.reset() is cancelled (#4123)
- Avoid per-check fd allocation in hiredis _socket_can_read() — use poll() instead of a per-call selector (#4118)
🧰 Maintenance
- Updating PyJWT dependency. (#4100)
- Update CI badge in README.md (#4099)
- Add missing url query argument parser for ssl_min_version (#4047)
- ci: least-privilege permissions on spellcheck (read) and stale-issues (job-level write for actions/stale) (#4080)
- Bumping github-versions actions (#4102)
- Updating lib version + supported Redis versions in README.md + updating the Redis versions in CI test matrix (#4092)
We'd like to thank all the contributors who worked on this release!
@violuke @mokashang @arpitjain099 @coredumperror @elena-kolevska @vladvildanov @petyaslavova
7.4.1
Changes
🐛 Bug Fixes
- Preserve explicit None for client metadata config (#4081)
🧰 Maintenance
- Updating PyJWT dependency. (#4100)
- Addressing dependency vulnerabilities and flaky test fixes (source diff)
We'd like to thank all the contributors who worked on this release!
@elena-kolevska @vladvildanov @petyaslavova
7.3.1
Changes
🐛 Bug Fixes
- Preserve explicit None for client metadata config (#4081)
🧰 Maintenance
- Updating PyJWT dependency. (#4100)
- Addressing dependency vulnerabilities and flaky test fixes (source diff)
We'd like to thank all the contributors who worked on this release!
@elena-kolevska @vladvildanov @petyaslavova
7.2.2
Changes
🐛 Bug Fixes
- Preserve explicit None for client metadata config (#4081)
🧰 Maintenance
- Updating PyJWT dependency. (#4100)
- Addressing dependency vulnerabilities and flaky test fixes (source diff)
We'd like to thank all the contributors who worked on this release!
@elena-kolevska @vladvildanov @petyaslavova
8.0.0
Changes
🚀 Highlights
Async Cluster PubSub
This release introduces full asyncio Cluster PubSub support, bringing shard-channel capabilities (SSUBSCRIBE, SUNSUBSCRIBE, SPUBLISH) to the async RedisCluster client. The new ClusterPubSub class in redis.asyncio.cluster automatically 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 via RedisCluster.pubsub() and use ssubscribe(), sunsubscribe(), and get_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, and AsyncClusterKeyspaceNotifications — provide a high-level API for keyspace/keyevent subscriptions and subkey notification families: subkeyspace, subkeyevent, subkeyspaceitem, and subkeyspaceevent. Convenience methods like subscribe_keyspace(), subscribe_keyevent(), subscribe_subkeyspace(), subscribe_subkeyevent(), subscribe_subkeyspaceitem(), and subscribe_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 async listen() 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, including ARGET, ARSET, ARMGET, ARMSET, ARSCAN, ARGREP, ARRING, and AROP.
Type Hints Improvements (breaking changes)
The @overload pattern 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 combined ResponseT (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 see Awaitable[...] 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, SyncClientProtocol and AsyncClientProtocol, 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=2 to force RESP2 on the wire, protocol=3 to opt into native RESP3 response shapes, or legacy_responses=False to migrate to unified responses. See docs/unified_responses.rst and specs/unified_responses_migration_guide.md for the affected commands and migration details.
Connection and retry defaults
Default connection settings were updated: socket_timeout and socket_connect_timeout now default to 5 seconds, TCP keepalive is enabled by default, socket reads use a 32 KB buffer, connection pools default to max_connections=100, and retry defaults now use 10 attempts with exponential jitter backoff.
Note: socket_timeout can affect blocking commands such as BLPOP/BRPOP; if a command blocks longer than the client socket timeout, it may raise TimeoutError before the command timeout elapses (#2807).
🧪 Experimental Features
- Added support for new array commands (#4055)
🚀 New Features
- Support Cluster PubSub in asyncio (#3736)
- Add Redis Keyspace Notifications Support for Redis Cluster (#3962)
- Add random load balancing strategy which allows for use of the primary (#4027)
- Add FPHA (floating-point homogeneous array) arg support to JSON.SET (#4011)
- Added custom Claude command + XNACK command support (#4030)
- Adding Time Series Multiple Aggregators support (#4035)
- Adding support for new COUNT aggregator for some sorted set commands - ZINTER, ZINTERSTORE, ZUNION, ZUNIONSTORE (#4034)
- Adding support for new INCREX command (#4067 #4077)
- Add support for PubSub subscriptions with binary channel names and handlers (#4068)
🔥 Breaking changes
- Type hints improvements - fixing static code analysis issues related to combined sync and async return types(vectorsets + commands in core.py) (#3991)
- Type hints improvements - fixing static code analysis issues related to combined sync and async return types - modules (#4005)
- Add Redis Keyspace Notifications Support for Redis Cluster (#3962)
- Added support for subkey notifications (#4040)
- Changing the default protocol used to RESP3, keeping the responses for the default config compatible with the current RESP2 shape. Adding the possibility to opt-in for unified responses for both protocols. (#4025 #4031 #4052 #4046)
- Type Lock.extend and Lock.reacquire as Literal[True] (#4045)
- Handle cluster slot migration in ClusterPubSub (shard subscription reconciliation) (#4044)
- Avoid zero-timeout async reads in hiredis connections readiness checks and replace async's can_read_destructive with non-destructive can_read. (#4063)
- Updates in default connection and retry settings (#4082)
🐛 Bug Fixes
- fix: guard disconnect() against RuntimeError on Python 3.13+ (#3856) (#4013)
- Fix CacheProxyConnection hang when invalidation arrives on another connection (#3600) (#4014)
- fix: handle scientific notation in score_cast_func for RESP2 (#4016)
- Fix TypeError in CacheProxyConnection when cached response is non-bytes (#4017)
- Fix async cluster connection cleanup on topology refresh (#4057)
- Normalize scalar prefixes in IndexDefinition (#3983)
- Avoid zero-timeout async reads in hiredis connections readiness checks and replace async's can_read_destructive with non-destructive can_read. (#4063)
- Preserve explicit None for client metadata config (#4081)
⚠️ Deprecations
- Align deprecation of lib_name/lib_version in async cluster (#3995)
- Add deprecation notice to setex() method documentation (#4051)
- Avoid zero-timeout async reads in hiredis connections readiness checks and replace async's can_read_destructive with non-destructive can_read. (#4063)
🧰 Maintenance
- Adding unstable 8.8 build to pipeline test matrix. Updating the lib version in master. (#4004)
- Fix type hints for register_script to support RedisCluster (#3876)
- Updating dependencies to fix reported vulnerabilities (#4012)
- Bump release-drafter/release-drafter from 6 to 7 (#4019)
- Bump rojopolis/spellcheck-github-actions from 0.58.0 to 0.60.0 (#4018)
- Reorganize unit tests grouping - extracting the tests that define their hardcoded client configuration separately (#4029)
- Update home_json.py - this will make the docs examples interactive (#4020)
- Fix Sync ClusterPubSub.disconnect() — Potential AttributeError (#4036)
- Refactor ClusterPubSub to reuse NodesManager-managed connections. (#4037)
- Fix CROSSSLOT on sharded pubsub resubscription by grouping channels per slot (#4038)
- fix(cluster): enable health check in ClusterNode command execution (#4043)
- Add Python version '3.14t' to CI matrix (#4058)
- docs: fix typos in messages, docstrings, and comments (#4062)
- Updating hash commands type hints and jsonget return type hints (#4054)
- Fix flaky tests (#4071)
- Add CLAUDE.md and /sync-claude-md skill for managing (#4066)
- Randomize cluster startup node order during topology refresh (#4060)
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
8.0.0b2
Changes
Unified command response types across RESP2 and RESP3 protocols
In this release, the command response types across RESP2 and RESP3 protocols are unified, ensuring that the same command returns the same Python type and structure regardless of which protocol version is in use — eliminating the need for protocol-specific branching in application code (#4025). Approximately 84 commands are affected across core Redis, Search, JSON, TimeSeries, and Probabilistic modules. Additionally, the default protocol has been changed from RESP2 to RESP3 for all Redis clients and connections, enabling richer native types (maps, sets, doubles, booleans) and improved performance out of the box (#4031).
These changes are breaking relative to redis-py 7.x and earlier, so users upgrading should carefully review the migration guide. For a complete list of affected commands and updated response formats, see docs/resp_unification.rst and the detailed migration guide at specs/resp2_resp3_migration_guide.md.
Users who need to retain the previous default protocol configuration can explicitly set protocol=2 when creating their client or connection.
🚀 New Features
- Add random load balancing strategy which allows for use of the primary (#4027)
🔥 Breaking changes
- RESP2 and RESP3 response unification (#4025)
- Changing the default RESP protocol configurations for Redis clients and connections to 3 (#4031)
🧰 Maintenance
- Reorganize unit tests grouping - extracting the tests that define their hardcoded client configuration separately (#4029)
We'd like to thank all the contributors who worked on this release!
@Pack-Yak1 @petyaslavova
8.0.0b1
Changes
Async Cluster PubSub & Keyspace Notifications
This release introduces full asyncio Cluster PubSub support, bringing shard-channel capabilities (SSUBSCRIBE, SUNSUBSCRIBE, SPUBLISH) to the async RedisCluster client. The new ClusterPubSub class in redis.asyncio.cluster automatically 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 via RedisCluster.pubsub() and use ssubscribe(), sunsubscribe(), and get_sharded_message() just as they would with the sync cluster client.
Alongside this, Redis Keyspace Notifications are now supported for both standalone and cluster deployments, in both sync and async modes. New classes—KeyspaceNotifications, ClusterKeyspaceNotifications, AsyncKeyspaceNotifications, and AsyncClusterKeyspaceNotifications—provide a high-level API for subscribing to keyspace and keyevent channels. In cluster mode, notifications are automatically subscribed across all primary nodes (since each node only emits notifications for keys it owns), with built-in topology-change handling. Convenience methods like subscribe_keyspace(), subscribe_keyevent(), and channel classes (KeyspaceChannel, KeyeventChannel) simplify common subscription patterns. Both sync run_in_thread() and async listen() workflows are supported.
Type Hints Improvements (breaking changes)
The @overload pattern 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 combined ResponseT (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 see Awaitable[...] 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, SyncClientProtocol and AsyncClientProtocol, are used in overload signatures to enable this distinction.
🚀 New Features
- Support Cluster PubSub in asyncio (#3736)
- Add Redis Keyspace Notifications Support for Redis Cluster (#3962)
🔥 Breaking changes
- Type hints improvements - fixing static code analyses issues related to combined sync and async return types(vectorsets + commands in core.py) (#3991)
- Type hints improvements - fixing static code analyses issues related to combined sync and async return types - modules (#4005)
- Add Redis Keyspace Notifications Support for Redis Cluster (#3962)
🐛 Bug Fixes
- fix: guard disconnect() against RuntimeError on Python 3.13+ (#3856) (#4013)
- Fix CacheProxyConnection hang when invalidation arrives on another connection (#3600) (#4014)
- fix: handle scientific notation in score_cast_func for RESP2 (#4016)
- Fix TypeError in CacheProxyConnection when cached response is non-bytes (#4017)
⚠️ Deprecations
- Align deprecation of lib_name/lib_version in async cluster (#3995)
🧰 Maintenance
- Adding unstable 8.8 build to pipeline test matrix. Updating the lib version in master. (#4004)
- Fix type hints for register_script to support RedisCluster (#3876)
- Updating dependencies to fix reported vulnerabilities (#4012)
- Bump release-drafter/release-drafter from 6 to 7 (#4019)
- Bump rojopolis/spellcheck-github-actions from 0.58.0 to 0.60.0 (#4018)
We'd like to thank all the contributors who worked on this release!
@abersheeran @alisaifee @majiayu000 @dmaier-redislabs @vladvildanov @petyaslavova
7.4.0
Changes
🐛 Bug Fixes
- Fix AttributeError in cluster metrics recording when connection is None or ClusterNode object instance is used to extract the connection info (#3999)
- Fixing security concern in repr methods for ConnectionPools - passwords might leak in plain text logs (#3998)
- Refactored connection count and SCH metric collection (#4001)
🧪 Experimental Features
- Refactored health check logic for MultiDBClient (#3994)
🧰 Maintenance
- Expose basic Otel classes and functions to be importable through redis.observability to match the examples in the readthedocs (#3996)
We'd like to thank all the contributors who worked on this release!
@vladvildanov @petyaslavova