Change8

Migrating to Redis Python v6.0.0b1

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

Released: 3/24/2025

5
Breaking Changes
7
Migration Steps
18
Affected Symbols

⚠️ Check Your Code

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

RedisGearsRedisGraphFCALLClusterParserBaseParserFT.AGGREGATEFT.SEARCHread_from_replicasload_balancing_strategyforce_master_ipLockHGETDELHGETEXHSETEXClusterPipelineclient_listget_default_nodeget_connection

Breaking Changes

Issue #1

Support for the RedisGears module has been removed. Code that imports or uses RedisGears will fail; remove the module usage or migrate to alternative functionality.

Issue #2

Support for the RedisGraph module has been removed. Remove any imports or commands targeting RedisGraph.

Issue #3

FCALL command signatures have been updated to follow PEP 484 typing. Calls that relied on the previous loosely-typed signatures may raise type errors; update your code to match the new type hints.

Issue #4

ClusterParser exception classes have been moved to the BaseParser class. Catching the old ClusterParser exceptions will no longer work; import and catch the exceptions from BaseParser instead.

Issue #5

The client now defaults to query dialect 2 for search commands (e.g., FT.AGGREGATE, FT.SEARCH). This can change query results; configure the client dialect explicitly if you need the previous behavior.

Migration Steps

  1. 1
    Remove any usage of RedisGears and RedisGraph modules or replace them with supported alternatives.
  2. 2
    Update code that catches ClusterParser exceptions to import and catch the corresponding exceptions from BaseParser.
  3. 3
    If your application relies on the previous query dialect, explicitly set the client dialect to the desired version via the client configuration.
  4. 4
    Replace the deprecated 'read_from_replicas' setting with the new 'load_balancing_strategy' option in cluster client configurations.
  5. 5
    Review FCALL command calls and adjust them to match the new PEP 484 type signatures.
  6. 6
    Check for any usage of the deprecated get_connection arguments and remove them.
  7. 7
    If you used FT.CONFIG GET/SET or the search module config_set/config_get commands, migrate to the newer configuration APIs.

Release Summary

The release introduces new hash commands, load‑balancing configuration, jittered exponential backoff, and several bug fixes, while removing RedisGears/RedisGraph support, updating FCALL typing, moving ClusterParser exceptions, and switching the default search dialect to version 2.

Need More Details?

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

View Full Changelog