v7.0.0
Breaking Changes📦 redis-pythonView on GitHub →
⚠ 10 breaking✨ 5 features🐛 1 fixes🔧 17 symbols
Summary
This release adds major new capabilities such as MultiDBClient and maintenance push notification support, but also includes breaking changes that require updates to eviction policy implementations, async RedisCluster usage, and several type‑hint adjustments.
⚠️ Breaking Changes
- Added abstract method declaration for the cache property setter in EvictionPolicyInterface, causing existing custom eviction policies to break; implement the setter to fix.
- Removed the unused parse_list_to_dict function from helpers; replace any imports/calls with alternative parsing logic.
- Removed synchronous context manager support from async RedisCluster; async RedisCluster can no longer be used with a regular 'with' statement, use 'async with' instead.
- Improved type annotations for Redis Search/Aggregate modules; update code that relied on previous signatures if type checking fails.
- Replaced threading.Lock with threading.RLock throughout the library to avoid deadlocks; custom lock usage may need to be updated.
- Updated ping command docstrings and changed its return type hint; adjust code that expects the old return type.
- Fixed several *arg type hints in core.py and JSON module commands; update any custom wrappers that depended on previous signatures.
- Fixed mypy errors in search module files (query.py, commands.py, aggregation.py); ensure your type hints align with the new definitions.
- Added score_cast_func argument to ZRANK, ZREVRANK and ZUNION commands; callers must now provide or accept this new optional parameter.
- Changed the timeout type hint in async BlockingConnectionPool from int to float; pass float values for timeout.
Migration Steps
- Implement the cache property setter in any custom EvictionPolicyInterface subclasses.
- Remove or replace usage of the now‑deleted parse_list_to_dict helper.
- Switch from 'with RedisCluster(...)' to 'async with RedisCluster(...)' for async clients.
- Review and adjust code that interacts with the ping command to match the new return type.
- Update calls to ZRANK, ZREVRANK, and ZUNION to handle the new optional score_cast_func argument.
- Pass float values for the timeout parameter when creating an async BlockingConnectionPool.
- If you used threading.Lock directly from the library internals, replace it with threading.RLock or adjust custom synchronization accordingly.
- Run mypy or your type checker to resolve any new type annotation issues in search, core, and JSON modules.
✨ New Features
- Support for maintenance push notifications handling during server upgrade or maintenance procedures.
- Added WITHATTRIBS option to vector set's VSIM command.
- Added ssl_verify_flags_config argument for SSL connection configuration.
- Introduced ExternalAuthProviderError, raised when the server returns a 'problem with LDAP service' response.
- Experimental Multi-database client (MultiDBClient) for active‑active setups with automatic failover.
🐛 Bug Fixes
- Replaced threading.Lock with threading.RLock to avoid deadlocks.