Skip to content

Update dependency redis to v8#920

Draft
red-hat-konflux[bot] wants to merge 1 commit into
mainfrom
konflux/mintmaker/main/redis-8.x
Draft

Update dependency redis to v8#920
red-hat-konflux[bot] wants to merge 1 commit into
mainfrom
konflux/mintmaker/main/redis-8.x

Conversation

@red-hat-konflux

@red-hat-konflux red-hat-konflux Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
redis (changelog) ==7.4.1==8.0.1 age confidence

Release Notes

redis/redis-py (redis)

v8.0.1: 8.0.1

Compare Source

Changes

🐛 Bug Fixes

  • Fix Unix socket maintenance notification handling and tests (#​4097)
  • Fix async cluster node connection release on write errors (#​4111)
  • Fixed async MultiDBClient with underlying RedisCluster (#​4108)
  • Fix hiredis readiness checks for high file descriptors (#​4115)
  • fix(search): parse RESP3 FT.SEARCH responses with bytes-typed keys (#​4109)
  • Fixing pubsub's listen method to be blocking. (#​4119)
  • fix(asyncio): release pooled connection when Pipeline.reset() is cancelled (#​4123)
  • Avoid per-check fd allocation in hiredis _socket_can_read() — use poll() instead of a per-call selector (#​4118)

🧰 Maintenance

  • Updating PyJWT dependency. (#​4100)
  • Update CI badge in README.md (#​4099)
  • Add missing url query argument parser for ssl_min_version (#​4047)
  • ci: least-privilege permissions on spellcheck (read) and stale-issues (job-level write for actions/stale) (#​4080)
  • Bumping github-versions actions (#​4102)
  • Updating lib version + supported Redis versions in README.md + updating the Redis versions in CI test matrix (#​4092)

We'd like to thank all the contributors who worked on this release!
@​violuke @​mokashang @​arpitjain099 @​coredumperror @​elena-kolevska @​vladvildanov @​petyaslavova

v8.0.0: 8.0.0

Compare Source

Changes

🚀 Highlights

Async Cluster PubSub

This release introduces full asyncio Cluster PubSub support, bringing shard-channel capabilities (SSUBSCRIBE, SUNSUBSCRIBE, SPUBLISH) to the async RedisCluster client. The new ClusterPubSub class in redis.asyncio.cluster automatically routes shard-channel subscriptions to the correct cluster node based on key-slot hashing, manages per-node PubSub connections, and supports round-robin message retrieval across nodes. Users can create a cluster pubsub instance via RedisCluster.pubsub() and use ssubscribe(), sunsubscribe(), and get_sharded_message() just as they would with the sync cluster client.

Keyspace and subkey notifications

Redis Keyspace Notifications are now supported for standalone and cluster deployments in both sync and async modes. New classes — KeyspaceNotifications, ClusterKeyspaceNotifications, AsyncKeyspaceNotifications, and AsyncClusterKeyspaceNotifications — provide a high-level API for keyspace/keyevent subscriptions and subkey notification families: subkeyspace, subkeyevent, subkeyspaceitem, and subkeyspaceevent. Convenience methods like subscribe_keyspace(), subscribe_keyevent(), subscribe_subkeyspace(), subscribe_subkeyevent(), subscribe_subkeyspaceitem(), and subscribe_subkeyspaceevent() simplify common patterns, with channel classes for both key and subkey channels.

In cluster mode, subscriptions are managed across primary nodes because each node emits notifications only for keys it owns, with built-in topology-change handling. Sync run_in_thread() and async listen() workflows are supported.

Redis Array commands(https://redis.io/docs/latest/develop/data-types/arrays/)

redis-py now supports Redis Arrays, a preview Redis data type for sparse, index-addressable sequences of strings. New AR* command helpers cover indexed reads/writes, range scans, deletion, cursor-based insertion, ring-buffer writes, metadata, text search, and aggregation, including ARGET, ARSET, ARMGET, ARMSET, ARSCAN, ARGREP, ARRING, and AROP.

Type Hints Improvements (breaking changes)

The @overload pattern has been applied systematically across core commands (core.py), VectorSet commands, and module commands (Search, JSON, TimeSeries, Bloom filters) to provide distinct return types for sync and async clients. Previously, methods returned a combined ResponseT (i.e., Union[Awaitable[Any], Any]), which caused static analysis tools like mypy and Pyright to flag false positives. Now, sync clients see concrete return types (e.g., int, bool, list[str]) while async clients see Awaitable[...] wrappers. This is a breaking change for type-checking only—runtime behavior is unchanged, but code relying on the old union return types in type annotations may need updates. Two new protocol types, SyncClientProtocol and AsyncClientProtocol, are used in overload signatures to enable this distinction.

RESP3 by default with opt-in unified responses

redis-py 8.0.0 now uses RESP3 on the wire by default while preserving legacy RESP2-compatible Python response shapes for existing applications (#​4052). Protocol-independent unified response shapes are available by setting legacy_responses=False, so affected commands return the same Python structure with RESP2 or RESP3.

Use protocol=2 to force RESP2 on the wire, protocol=3 to opt into native RESP3 response shapes, or legacy_responses=False to migrate to unified responses. See docs/unified_responses.rst and specs/unified_responses_migration_guide.md for the affected commands and migration details.

Connection and retry defaults

Default connection settings were updated: socket_timeout and socket_connect_timeout now default to 5 seconds, TCP keepalive is enabled by default, socket reads use a 32 KB buffer, connection pools default to max_connections=100, and retry defaults now use 10 attempts with exponential jitter backoff.

Note: socket_timeout can affect blocking commands such as BLPOP/BRPOP; if a command blocks longer than the client socket timeout, it may raise TimeoutError before the command timeout elapses (#​2807).

🧪 Experimental Features

  • Added support for new array commands (#​4055)

🚀 New Features

  • Support Cluster PubSub in asyncio (#​3736)
  • Add Redis Keyspace Notifications Support for Redis Cluster (#​3962)
  • Add random load balancing strategy which allows for use of the primary (#​4027)
  • Add FPHA (floating-point homogeneous array) arg support to JSON.SET (#​4011)
  • Added custom Claude command + XNACK command support (#​4030)
  • Adding Time Series Multiple Aggregators support (#​4035)
  • Adding support for new COUNT aggregator for some sorted set commands - ZINTER, ZINTERSTORE, ZUNION, ZUNIONSTORE (#​4034)
  • Adding support for new INCREX command (#​4067 #​4077)
  • Add support for PubSub subscriptions with binary channel names and handlers (#​4068)

🔥 Breaking changes

  • Type hints improvements - fixing static code analysis issues related to combined sync and async return types(vectorsets + commands in core.py) (#​3991)
  • Type hints improvements - fixing static code analysis issues related to combined sync and async return types - modules (#​4005)
  • Add Redis Keyspace Notifications Support for Redis Cluster (#​3962)
  • Added support for subkey notifications (#​4040)
  • Changing the default protocol used to RESP3, keeping the responses for the default config compatible with the current RESP2 shape. Adding the possibility to opt-in for unified responses for both protocols. (#​4025 #​4031 #​4052 #​4046)
  • Type Lock.extend and Lock.reacquire as Literal[True] (#​4045)
  • Handle cluster slot migration in ClusterPubSub (shard subscription reconciliation) (#​4044)
  • Avoid zero-timeout async reads in hiredis connections readiness checks and replace async's can_read_destructive with non-destructive can_read. (#​4063)
  • Updates in default connection and retry settings (#​4082)

🐛 Bug Fixes

  • fix: guard disconnect() against RuntimeError on Python 3.13+ (#​3856) (#​4013)
  • Fix CacheProxyConnection hang when invalidation arrives on another connection (#​3600) (#​4014)
  • fix: handle scientific notation in score_cast_func for RESP2 (#​4016)
  • Fix TypeError in CacheProxyConnection when cached response is non-bytes (#​4017)
  • Fix async cluster connection cleanup on topology refresh (#​4057)
  • Normalize scalar prefixes in IndexDefinition (#​3983)
  • Avoid zero-timeout async reads in hiredis connections readiness checks and replace async's can_read_destructive with non-destructive can_read. (#​4063)
  • Preserve explicit None for client metadata config (#​4081)

⚠️ Deprecations

  • Align deprecation of lib_name/lib_version in async cluster (#​3995)
  • Add deprecation notice to setex() method documentation (#​4051)
  • Avoid zero-timeout async reads in hiredis connections readiness checks and replace async's can_read_destructive with non-destructive can_read. (#​4063)

🧰 Maintenance

  • Adding unstable 8.8 build to pipeline test matrix. Updating the lib version in master. (#​4004)
  • Fix type hints for register_script to support RedisCluster (#​3876)
  • Updating dependencies to fix reported vulnerabilities (#​4012)
  • Bump release-drafter/release-drafter from 6 to 7 (#​4019)
  • Bump rojopolis/spellcheck-github-actions from 0.58.0 to 0.60.0 (#​4018)
  • Reorganize unit tests grouping - extracting the tests that define their hardcoded client configuration separately (#​4029)
  • Update home_json.py - this will make the docs examples interactive (#​4020)
  • Fix Sync ClusterPubSub.disconnect() — Potential AttributeError (#​4036)
  • Refactor ClusterPubSub to reuse NodesManager-managed connections. (#​4037)
  • Fix CROSSSLOT on sharded pubsub resubscription by grouping channels per slot (#​4038)
  • fix(cluster): enable health check in ClusterNode command execution (#​4043)
  • Add Python version '3.14t' to CI matrix (#​4058)
  • docs: fix typos in messages, docstrings, and comments (#​4062)
  • Updating hash commands type hints and jsonget return type hints (#​4054)
  • Fix flaky tests (#​4071)
  • Add CLAUDE.md and /sync-claude-md skill for managing (#​4066)
  • Randomize cluster startup node order during topology refresh (#​4060)

We'd like to thank all the contributors who worked on this release!
@​hydroblaze @​Br1an67 @​mokashang @​swoutch @​armorbreak001 @​Brumbelow @​paoloredis @​Pack-Yak1 @​abersheeran @​alisaifee @​majiayu000 @​uglide @​dmaier-redislabs @​vladvildanov @​petyaslavova


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

To execute skipped test pipelines write comment /ok-to-test.


Documentation

Find out how to configure dependency updates in MintMaker documentation or see all available configuration options in Renovate documentation.

Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
@sourcery-ai

sourcery-ai Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the pinned redis Python client dependency from 7.4.1 to 8.0.1 in backend requirements, pulling in redis-py 8.x behavioral and configuration changes (RESP3-by-default, new defaults for timeouts/connection pooling, type-hint changes, and new features/bugfixes).

File-Level Changes

Change Details Files
Bump redis Python client dependency from 7.4.1 to 8.0.1 for the backend service.
  • Update the pinned redis package version from 7.4.1 to 8.0.1 in the backend dependency lock file.
  • Implicitly adopt redis-py 8.x defaults such as RESP3 on the wire, updated connection and retry defaults, and enhanced async/cluster/pubsub capabilities.
backend/requirements-pinned.txt

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.06%. Comparing base (9e49838) to head (9a50045).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #920   +/-   ##
=======================================
  Coverage   86.06%   86.06%           
=======================================
  Files          63       63           
  Lines        3574     3574           
  Branches      662      662           
=======================================
  Hits         3076     3076           
  Misses        278      278           
  Partials      220      220           

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9e49838...9a50045. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mshriver mshriver marked this pull request as draft July 9, 2026 15:46
@mshriver

mshriver commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Celery -> Kombu limits redis support to <8:
https://github.com/celery/kombu/blob/main/requirements/extras/redis.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant