fix: redis SSL kwargs incompatible with redis-py 7.x#55
Merged
Conversation
|
🎉 This PR is included in version 3.3.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes
AbstractConnection.__init__() got an unexpected keyword argument 'ssl_context'crash on startup introduced in #54.The previous change replaced individual
ssl_*kwargs with a singlessl_contextobject, but redis-py 7.x'sSSLConnectiondoes not acceptssl_context— it expects individual parameters (ssl_ca_certs,ssl_certfile, etc.).Closes #53 (remaining fix from #54)
Changes
src/config/redis.py_build_ssl_context()and theimport sslit required (which also shadowed thesslfield name)get_ssl_kwargs()now returns individualssl_*parameters compatible with redis-py 7.xNone-valued params (ssl_ca_certs,ssl_certfile,ssl_keyfile) are now omitted rather than passed explicitly, so unset fields fall back to redis-py defaults (e.g. system CA bundle) instead of overriding themtests/unit/test_redis_config.pyssl_context)test_ssl_kwargs_accepted_by_connection_poolwhich creates a realredis.ConnectionPool.from_url()with the spread kwargs — this would have caught the original bugtest_ssl_omits_none_ca_certs,test_ssl_omits_none_certfile)Test plan
just test-unit)just lint)test_ssl_kwargs_accepted_by_connection_poolvalidates kwargs against real redis-py API🤖 Generated with Claude Code