Repository navigation
fix(redis): Restore support for redis-py 3.4.1 and redis-py-cluster 2.1 - #8168
Merged
Merged
Conversation
Partially revert #7058 so that projects pinned to redis-py 3.x and redis-py-cluster 2.x keep their Redis instrumentation in 3.0: - lower the minimum redis-py version from 4.2 to 3.4.1 - only patch the redis.asyncio client and pipeline if redis.asyncio is available (redis-py 4.2+) - restore the redis-py-cluster instrumentation, limited to 2.x (1.x requires redis-py 2.x, which is below the new minimum) The max_data_size removal and the StrictRedis to Redis switch from #7058 are kept.
alexander-alderman-webb
approved these changes
Oct 30, 2026
sentrivana
marked this pull request as ready for review
October 30, 2026 10:37
Contributor
Coverage Results 📊✅ 57541 passed | ⏭️ 3008 skipped | Total: 60549 | Pass Rate: 95.03% | Execution Time: 152m 48s 📊 Comparison with Base Branch
All tests are passing successfully. ✅ Patch coverage is 100.00% (18 of 18 changed executable lines covered; target 80%). Changed files with executable lines (3)
Coverage diff@@ Coverage Diff @@
## master #8168 +/-##
==========================================
+ Coverage 90.33% 90.36% +0.03%
==========================================
Files 203 199 -4
Tracked lines 26872 21266 -5606
Branches 10044 7360 -2684
==========================================
- Hits 24272 19215 -5057
+ Misses 2600 2051 -549
+ Partials 1520 1235 -285Generated by Coverage Action |
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.
Description
Partially reverts #7058 so projects pinned to redis-py 3.x and redis-py-cluster 2.x keep their Redis instrumentation in 3.0. With the 4.2 minimum, an explicitly configured
RedisIntegration()raisesDidNotEnableandsentry_sdk.init()fails.This came up while dogfooding 3.0 in getsentry/sentry, which is pinned to redis-py 3.4.1 because it still uses redis-py-cluster (which requires
redis<4). It also can't move past redis-py 4.x yet becauserbbreaks on redis-py 5+.Only what's needed for those versions is restored:
redis.asyncioclient and pipeline only ifredis.asyncioexists (added in redis-py 4.2). This import was guarded in 2.x and chore(redis): Drop support for < 4.2 #7058 made it unconditional, which is the actual reason 3.x stopped working.StrictRedisCluster/StrictClusterPipelinebranches aren't brought back.redis_py_cluster_legacytest suite (rewritten for span streaming and the 3.0 attribute names) and its CI entry.Kept from #7058: the
max_data_sizeremoval and theStrictRedis->Redisswitch.tox.iniwas regenerated withpopulate_tox.py --only redis redis_py_cluster_legacyto avoid unrelated matrix churn. This adds redis 3.4.1/3.5.3 and drops 4.2.2 as the lowest 4.x env. CI only runs redis 3.x on py3.7/3.8 because of its classifiers. I also checked 3.4.1 + rb + redis-py-cluster 2.1.0 on Python 3.13 manually against getsentry/sentry.