github redis/redis-py v7.2.0
7.2.0

8 hours ago

Changes

Redis 8.6 Support
Added support for Redis 8.6, including new commands and features for streams idempotent production and HOTKEYS.

Smart Client Handoff (Maintenance Notifications) for Cluster
note: Pending a Redis Enterprise version release

This release introduces comprehensive support for Redis Enterprise Cluster maintenance notifications via SMIGRATING/SMIGRATED push notifications. The client now automatically handles slot migrations by:

Relaxing timeouts during migration (SMIGRATING) to prevent false failures
Triggering cluster state reloads upon completion (SMIGRATED)
Enabling seamless operations during Redis Enterprise maintenance windows

OpenTelemetry Native Metrics Support
Added comprehensive OpenTelemetry metrics support following the OpenTelemetry Database Client Semantic Conventions.
Metric groups include:

  • Command metrics: Operation duration with retry tracking
  • Connection basic: Connection count and creation time
  • Resiliency: Errors, handoffs, timeout relaxation
  • Connection advanced: Wait time and use time
  • Pubsub metrics: Published and received messages
  • Stream metrics: Processing duration and maintenance notifications

🚀 New Features

  • Added OTel instrumentation and metrics export for sync client (#3954)
  • Add maintenance notifications support for OSS API cluster clients (#3946)
  • Adding hotkeys commands support. (#3924)
  • Adds support for the new Idempotent Producers feature in Redis 8.6 (#3926)
  • Adding support for vrange command. (#3927)
  • Added a local digest command to the client to execute the XXH3 locally… (#3884)
  • Add DriverInfo class for upstream driver tracking (#3880)
  • Add ssl_password support to async Redis client (#3878)
  • Add ssl_ca_path support to async Redis client (#3879)

⚠️ Deprecations

  • Adding special handling of client_tracking_on and client_tracking_off for cluster clients. Marking those two functions as deprecated for cluster - embedded client-side caching feature should be used instead. (#3858)

🐛 Bug Fixes

  • Fix handling of circular MOVED redirects in cluster slot mapping (#3899)
  • fix(asyncio): prevent deadlock when Lock.release() is cancelled (#3900)
  • Fix unrecoverable connection state (#3905)
  • Fixed potential race condition between call_later() and run_forever() (#3897)
  • Fix RuntimeError in ClusterPubSub sharded message generator (#3889)
  • Fix async connection pool lock contention during connection establishment (#3885)
  • Fix PubSub client health check handling for sync client implementation (#3870)
  • Adding retries for the overall connect - socket connect + handshake. Fix for pubsub reconnect issues. (#3863)
  • Adding special handling of client_tracking_on and client_tracking_off for cluster clients. Marking those two functions as deprecated for cluster - embedded client-side caching feature should be used instead. (#3858)
  • [#3618] Fix client-side cache invalidation for mixed str and bytes Redis keys (#3766)
  • [#3612] Generating unique command cache key (#3765)

🧰 Maintenance

  • Fix type hints for spop and srandmember methods (#3943)
  • Reorganize pipeline actions (#3951)
  • Extending the tests to validate more supported scorers for hybrid search. Adding experimental_method annotation to hybrid_search commands. (#3939)
  • Bump rojopolis/spellcheck-github-actions from 0.56.0 to 0.58.0 (#3930)
  • Adds a new helper that runs linters and fixes issues (#3928)
  • Added testing with Timeseries samples with NaN values (#3932)
  • Added testing with TLS-based authentication (#3931)
  • Added support for calling run-tests from other repositories (#3923)
  • Updating hybrid tests to be compatible with 8.4 and 8.6 changes. Adding 8.6 RC1 image to test matrix (#3922)
  • Fix ClusterClient behavior when cluster topology is refreshed. Fix several places where connections might leak. (#3917)
  • Fix copy-paste error in CacheProxyConnection server version check (#3918)
  • Improve NodesManager locking (#3803)
  • DOC: README Update relative urls (#3914)
  • Bump rojopolis/spellcheck-github-actions from 0.55.0 to 0.56.0 (#3902)
  • Bump actions/upload-artifact from 5 to 6 (#3901)
  • Fix type hinting of zrange and zrangestore (#3872)
  • Remove last vestiges of mock.mock (#3830)
  • Improve type hints of from_url method for async Redis client. (#3796)
  • Fix type hints for the available 'from_url' methods (#3816)
  • Bump rojopolis/spellcheck-github-actions from 0.53.0 to 0.55.0 (#3862)
  • Bump actions/checkout from 5 to 6 (#3861)
  • Use MaxConnectionsError in the asyncio pool too (#3859)
  • Updates PR template order (#3855)
  • Changing current version in pipeline test config to 8.4 as it is already GA (#3854)
  • Added custom event handler section (#3853)
  • Changing log level to be debug for failed maintenance notification enablement when enabled='auto' (#3851)
  • Update Type Hints for List Command Parameters from str to KeyT (#3848)
  • Expand cluster READ_COMMANDS with additional read-only commands and reorganize the list of commands by category (#3845)

We'd like to thank all the contributors who worked on this release!
@veeceey @dariaguy @Nepomuk5665 @praboud @Timour-Ilyas @barshaul @devbyteai @itssimon @majiayu000 @aveao @s-t-e-v-e-n-k @cheizdo2-art @Jonathan-Landeed @PeterJCLaw @ShubhamKaudewar @vchomakov @dmaier-redislabs @elena-kolevska @vladvildanov @petyaslavova

Don't miss a new redis-py release

NewReleases is sending notifications on new releases.