Skip to content

chore(deps): update dependency redis to v6 #13331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 1, 2025

Conversation

renovate-bot
Copy link
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
redis (changelog) ==5.2.1 -> ==6.0.0 age adoption passing confidence

Release Notes

redis/redis-py (redis)

v6.0.0: 6.0.0

Compare Source

Changes

🚀 New Features

  • New hash commands with expiration options support are added - HGETDEL, HGETEX, HSETEX (#​3570)
  • Adds option not to raise an exception when leaving context manager after lock expiration (#​3531)
  • Add force_master_ip support to async Sentinel client (#​3524)

🧪 Experimental Features

  • Adding VectorSet commands support. (#​3584)

🔥 Breaking changes

  • Changing the default value for ssl_check_hostname to True, to ensure security validations are not skipped by default (#​3626)
  • Updated default value of 'require_full_coverage' argument to true for sync Cluster client to match sync/async cluster APIs (#​3434)
  • Adding default retry configuration changes for cluster clients (#​3622)
    Important: When instantiating a cluster client retry object becomes mandatory.
    • If retry object is not provided a default one is created with ExponentialWithJitterBackoff strategy and number of retries synced with 'cluster_error_retry_attempts'
    • In case a retry object is provided, its number of retries will be used for cluster operations number of retries and 'cluster_error_retry_attempts' will be ignored
    • Argument 'cluster_error_retry_attempts' is now deprecated
    • For Async Cluster Client the argument 'connection_error_retry_attempts' is completely removed
  • Updating default retry strategy for standalone clients. 3 retries with ExponentialWithJitterBackoff become the default config. (#​3614)
  • Removing 'charset' and 'errors' inputs from the Redis initialization arguments - deprecated 3 years ago. (#​3608)
  • Removing support for RedisGears module. (#​3553). For more info you can check the deprecated Redis features
  • Removing support for RedisGraph module. (#​3548). For more info you can check the deprecated Redis features
  • Fixing typing for FCALL commands to match PEP 484 (#​3537)
  • Moved ClusterParser exceptions to BaseParser class (#​3475)
  • Changed default dialect to 2 (#​3467) - This release introduces a client-side default dialect for Redis’ search and query capabilities. By default, the client now overrides the server-side dialect with version 2, automatically appending DIALECT 2to commands like FT.AGGREGATE and FT.SEARCH.
    Important: Be aware that the query dialect may impact the results returned. If needed, you can revert to a different dialect version by configuring the client accordingly. You can find further details in the query dialect documentation.

⚠️ Deprecations

  • Adding default retry configuration changes for cluster clients (#​3622)
  • Updating default retry strategy for standalone clients. 3 retries with ExponentialWithJitterBackoff become the default config. (#​3614)
  • Marks old RediSearch 1.0 commands as deprecated (#​3606)
  • Adding deprecation messages for the exposed in search module commands: FT.CONFIG GET and FT.CONFIG SET (#​3499 #​3500 )
  • Deprecating Search module config_set and config_get commands. Adding tests for modules ACL and modules config changes in 8.0 (#​3489)

🐛 Bug Fixes

  • Handling some special values when transforming response data into list (issue #​3573) (#​3586)
  • Fixed infinitely recursive health checks (#​3557)
  • Fixing search module dropindex function not to send invalid third parameter. Updating pipeline infra (#​3564)
  • Fixing async cluster pipeline execution when client is created with cluster_error_retry_attempts=0 (#​3545)
  • Fix client_list with multiple client ids (#​3539)
  • Add valid Exception type to Except in ClusterPipeline (#​3516)
  • Fix #​3130 TimeoutError during ClusterPipeline makes the client unrecoverable (#​3513)
  • Fix connection health check for protocol != 2 when auth credentials are provided and health check interval is configured (#​3477)
  • Fix AttributeError when client.get_default_node() returns None (#​3458)
  • fix: add TimeoutError handling in get_connection() (#​1485)
  • Avoid stacktrace on process exit in Client.del() (#​3397)

🧰 Maintenance

  • Updating pipeline tests to use test libs image with RC2. Updating timeseries tests. (#​3623)
  • Fixing flaky tests - part 2 (#​3592)
  • DOC-5107 added hash examples for index/query intro page (#​3609)
  • DOC-5073 vector set quantization and dimension reduction examples (#​3597)
  • Fixing some sporadically failing tests - part 1 (#​3589)
  • DOC-5073 added examples for vector sets intro page (#​3590)
  • Fix incorrect link to docs for fcall_ro command (#​3576)
  • Improvement: Use shutdown() Before close() in connection.py (#​3567)
  • Truncate pipeline exception message to a sane size (#​3530)
  • Docs/raae 724/remove redis ventures (#​3579)
  • Adding info for sentinel handling failover when Redis client is acquired with master_for() method. (#​3578)
  • Type hints improvements (#​3420 #​3480 #​3522 #​3526)
  • Increasing the operations-per-run for stale issues GH action (#​3556)
  • Got rid of time.time() everywhere (#​3551)
  • Removing deprecated usage of forbid_global_loop=True in pytest.mark.asyncio decorator (#​3542)
  • allow more recent pyopenssl (#​3541)
  • Bump rojopolis/spellcheck-github-actions from 0.38.0 to 0.47.0 (#​3538)
  • Fix LockError message when releasing a lock. (#​3534)
  • Fix readthedocs.yml integration(#​3527 #​3528 #​3529)
  • Adding vector search tests for types int8/uint8 (#​3525)
  • Adding requested resources into sdist. Fix for issue #​3057 (#​3511)
  • maintenance: Python 3.13 compatibility (#​3510)
  • Adding unit test for core info command related to modules info (#​3507)
  • Update connection_examples.ipynb (#​3504)
  • Update Python imports in doc examples (index_definition => indexDefinition) (#​3490)
  • DOC-4736 added geo indexing examples (#​3485)
  • Updated test infrastructure with latest versions (#​3484)
  • fix: update redis university url, the old link doesn't work (#​3481)
  • Fix #​3464: Correct misleading exception_handler example in docs (#​3474)
  • Added Redis 8.0 to test matrix (#​3469)
  • Added workflow_dispatch for pypi release workflow (#​3465)
  • Avoid the multiprocessing forkserver method in Python 3.14 (#​3442)
  • Fix inaccurate docstring for unwatch() (#​3424)
  • Update README.md - Fix 'Note' - bold (#​3413)
  • skip ssl import if not available (#​3078)
  • Replace flake8+isort+black with ruff (#​3147)
  • Fixes minor grammar nit in documentation. (#​3354)

Contributors

We'd like to thank all the contributors who worked on this release!
@​elena-kolevska @​petyaslavova @​vladvildanov @​andy-stark-redis @​JimNero009 @​donbowman @​julianolm @​666romeo @​three-kinds @​bssyousefi @​mbilski @​Yard1 @​bacchuswng @​noirbee @​nbertram @​birthdaysgift @​Perlence @​excitoon @​dimbleby @​shenxiangzhuang @​paololazzari @​dwdougherty @​niklasbec @​byeongjulee222 @​befeleme @​djroze @​BaseMax @​dicej @​akx @​cavemanpi @​lattwood @​rbs333 @​rohansingh @​allrob23

v5.3.0: 5.3.0

Compare Source

Changes

🚀 New Features

Token-based authentication:

  • Added StreamingCredentialProvider interface (#​3445)
  • Extended CredentialProvider class with get_credentials_async method (#​3445)
  • Added event-driven entities (Dispatcher, Listener, Events) (#​3445)

New StreamingCredentialProvider interface was added with an idea to integrate redis-py with credential providers that stream an events that should be handled by given listeners.

Check the documentation for the quick start guide.

CredentialProvider instance creation interface was enhanced. Feel free to check the updated documentation

Other features:

  • Exponential with jitter backoff (#​3550)
  • Adding load balancing strategy configuration to cluster clients(replacement for 'read_from_replicas' config) (#​3563)

⚠️ Deprecations

  • Deprecating unused arguments in connection pools's get_connection functions(#​3517 #​3625)

🐛 Bug Fixes

  • When SlotNotCoveredError is raised, the cluster topology should be reinitialized as part of error handling and retrying of the commands. (#​3621)
  • Fixed Token-based authentication documentation
  • Fixed bug with missing PyJWT dependency (#​3462)
  • Fixed flacky TokenManager test (#​3468)
  • Fix incorrect attribute reuse in redis.connection.CacheProxyConnection (#​3456)
  • Moved self._lock initialisation to Pool constructor (#​3473)
  • Remove decreasing of created connections count when releasing not owned by connection pool connection(fixes issue #​2832). (#​3514)

🧰 Maintenance

  • Updated CredentialProvider test infrastructure (#​3502)
  • Expand type for EncodedT (#​3472)
  • DOC-4423: add TCEs for various command pages (#​3476)
  • DOC-4345 added testable JSON search examples for home page (#​3407)
  • DOC-4796 fixed capped lists example (#​3493)
  • Added unit test fix to improve compatibility with MacOS (#​3486)
  • Added missing type hints (#​3494 #​3495 #​3496 #​3357)
  • Replacing the redis and redis-stack-server images with redis-libs-tests image in test infrastructure (#​3505)

Contributors

We'd like to thank all the contributors who worked on this release!

@​uglide @​woutdenolf @​vladvildanov @​hauntsaninja @​dwdougherty @​patrick91 @​Vulwsztyn @​JimNero009 @​andy-stark-redis @​petyaslavova


Configuration

📅 Schedule: 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: Never, 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

This PR was generated by Mend Renovate. View the repository job log.

@renovate-bot renovate-bot requested review from a team as code owners April 30, 2025 21:54
@trusted-contributions-gcf trusted-contributions-gcf bot added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Apr 30, 2025
@product-auto-label product-auto-label bot added samples Issues that are directly related to samples. api: cloudfunctions Issues related to the Cloud Run functions API. api: memorystore labels Apr 30, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Hello @renovate-bot, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

This pull request updates the redis dependency from version 5.2.1 to 6.0.0 in two requirements.txt files. The first file is functions/memorystore/redis/requirements.txt and the second is memorystore/redis/requirements.txt. This update likely includes bug fixes, new features, performance improvements, and potentially breaking changes as outlined in the release notes for redis-py version 6.0.0.

Highlights

  • Dependency Update: The core change is updating the redis Python library to the latest major version 6.0.0.
  • Potential Breaking Changes: The release notes indicate several breaking changes, including changes to default values, removal of deprecated features, and modifications to retry strategies. These changes may require updates to the application code to ensure compatibility.
  • New Features and Bug Fixes: Version 6.0.0 introduces new features such as new hash commands with expiration options, and includes numerous bug fixes and maintenance improvements.

Changelog

  • functions/memorystore/redis/requirements.txt
    • Updated redis dependency from version 5.2.1 to 6.0.0 on line 2.
  • memorystore/redis/requirements.txt
    • Updated redis dependency from version 5.2.1 to 6.0.0 on line 16.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


A Redis upgrade's call,
From five to version six, all.
New features gleam,
Or so it would seem,
But breaking changes enthrall.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This PR updates the redis dependency to version 6.0.0 in two requirements.txt files. The update itself seems straightforward, but it's important to consider the potential breaking changes and deprecations introduced in the new version, as outlined in the release notes.

Summary of Findings

  • Potential Breaking Changes: The redis-py v6.0.0 release includes breaking changes such as the change in default value for ssl_check_hostname to True, mandatory retry object for cluster clients, removal of charset and errors inputs, and removal of support for RedisGears and RedisGraph modules. It's crucial to ensure that the application code is compatible with these changes.
  • Retry Configuration: The update changes the default retry strategy for standalone clients to 3 retries with ExponentialWithJitterBackoff. For cluster clients, a retry object becomes mandatory. These changes might affect the application's resilience to transient errors and should be carefully evaluated.
  • Removed Features: The removal of RedisGears and RedisGraph support could impact the application if it relies on these modules. A migration plan or alternative implementation might be necessary.

Merge Readiness

The pull request updates the redis dependency to v6.0.0. While the update itself is simple, the release notes indicate several breaking changes, deprecations, and feature removals. Before merging, it's essential to ensure that the application code is compatible with these changes and that any necessary migrations or adjustments have been made. I am unable to approve this pull request, and recommend that others review and approve this code before merging.

@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 30, 2025
@glasnt glasnt merged commit 8d57455 into GoogleCloudPlatform:main May 1, 2025
11 checks passed
@renovate-bot renovate-bot deleted the renovate/redis-6.x branch May 1, 2025 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: cloudfunctions Issues related to the Cloud Run functions API. api: memorystore owlbot:run Add this label to trigger the Owlbot post processor. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants