Change8

Migrating to Redis Python v7.0.0b1

Version v7.0.0b1 introduces 5 breaking changes. This guide details how to update your code.

Released: 9/9/2025

5
Breaking Changes
5
Migration Steps
7
Affected Symbols

⚠️ Check Your Code

If you use any of these symbols, you need to read this guide:

EvictionPolicyInterfacehelpers.parse_list_to_dictRedisClusterRedisSearchAggregatethreading.Lockthreading.RLock

Breaking Changes

Issue #1

Added an abstract method declaration for the cache property setter in EvictionPolicyInterface, causing subclasses that do not implement it to fail. Implement the setter in custom eviction policies to fix.

Issue #2

Removed the unused parse_list_to_dict function from helpers, breaking any imports or calls to it. Delete or replace those usages.

Issue #3

Removed synchronous context manager handling from async RedisCluster, so using "with RedisCluster(...)" now raises an error. Switch to "async with RedisCluster(...)" for async usage.

Issue #4

Improved type annotations for Redis Search/Aggregate, which may cause type‑checking failures if code relied on the previous loosely‑typed signatures. Update type hints accordingly.

Issue #5

Replaced threading.Lock locks with threading.RLock objects throughout the library to avoid deadlocks. Code that relied on the exact Lock type may need to adjust imports or expectations.

Migration Steps

  1. 1
    Implement the new cache property setter in any custom EvictionPolicyInterface subclasses.
  2. 2
    Remove or replace all imports and calls to helpers.parse_list_to_dict.
  3. 3
    Change any usage of "with RedisCluster(...)" to "async with RedisCluster(...)" for async contexts.
  4. 4
    Review and update type annotations for Redis Search and Aggregate usage to match the new signatures.
  5. 5
    If your code explicitly checks for threading.Lock instances, adjust it to accept threading.RLock as well.

Release Summary

This release introduces maintenance push notification handling and a new WITHATTRIBS option, while breaking several APIs (cache setter, parse_list_to_dict, async RedisCluster context manager) and fixing deadlock issues by switching to RLock.

Need More Details?

View the full release notes and all changes for Redis Python v7.0.0b1.

View Full Changelog