Migrating to Redis Python v6.0.0
Version v6.0.0 introduces 9 breaking changes. This guide details how to update your code.
Released: 4/30/2025
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
Redis.ssl_check_hostnameClusterClient.require_full_coverageClusterClient.retryClusterClient.cluster_error_retry_attemptsAsyncClusterClient.connection_error_retry_attemptsRedis.__init__.charsetRedis.__init__.errorsRedisGearsRedisGraphClusterParserBaseParserSearchClient.dialectHGETDELHGETEXHSETEXVectorSetBreaking Changes
●Issue #1
Default ssl_check_hostname is now True; when using Sentinel to connect to a master you must set ssl_check_hostname=False if the Sentinel does not return hostnames.
●Issue #2
require_full_coverage argument default changed to true for the synchronous Cluster client; code relying on false default should explicitly set require_full_coverage=False.
●Issue #3
Cluster clients now require a retry object; if omitted a default ExponentialWithJitterBackoff retry is created. The 'cluster_error_retry_attempts' argument is deprecated and ignored when a retry is supplied, and for AsyncClusterClient the 'connection_error_retry_attempts' argument has been removed.
●Issue #4
Standalone clients now default to 3 retries with ExponentialWithJitterBackoff; adjust custom retry logic if different behavior is needed.
●Issue #5
The 'charset' and 'errors' parameters have been removed from Redis initialization; remove these arguments from Redis(...) calls.
●Issue #6
Support for the RedisGears module has been removed; any code using RedisGears will fail.
●Issue #7
Support for the RedisGraph module has been removed; any code using RedisGraph will fail.
●Issue #8
ClusterParser exception classes have been moved to BaseParser; import paths need to be updated.
●Issue #9
The default search query dialect is now 2, which may change query results; configure the client dialect explicitly to retain previous behavior.
Migration Steps
- 1If you connect to a master via Sentinel and encounter hostname errors, set ssl_check_hostname=False when creating the client.
- 2Review any usage of the 'require_full_coverage' argument for sync Cluster clients; set it explicitly if you need the previous false default.
- 3Provide a retry object when constructing Cluster clients, or adjust code that relied on 'cluster_error_retry_attempts' (now deprecated) and remove 'connection_error_retry_attempts' from AsyncClusterClient calls.
- 4Remove 'charset' and 'errors' parameters from Redis initialization calls.
- 5Update imports of ClusterParser exception classes to use BaseParser.
- 6If your application depends on RedisGears or RedisGraph modules, remove or replace that functionality as support has been dropped.
- 7If you rely on the default search query dialect, explicitly set the desired dialect on the client to maintain previous behavior.
Release Summary
Redis‑py 6.0.0 introduces new hash and Sentinel features, experimental VectorSet support, and several breaking changes such as stricter SSL hostname checks, mandatory retry objects for cluster clients, and removal of legacy modules.
Need More Details?
View the full release notes and all changes for Redis Python v6.0.0.
View Full Changelog