redis-py
redis-py copied to clipboard
Fix special response parsing options handling
Pull Request check-list
Please make sure to review and check all of these items:
- [ ] Does
$ toxpass with this change (including linting)? - [ ] Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
- [x] Is the new or changed code fully tested?
- [ ] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
- [ ] Is there an example added to the examples folder (if applicable)?
- [ ] Was the change added to CHANGES file?
NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
Description of change
Suggested fix for #2113
When using special response parsing options like NEVER_DECODE and
EMPTY_RESPONSE, don't pass them to the response callbacks because some
of them are not prepared for receiving named arguments.
Instead, redis-py should use them before calling the callbacks and then discard them.
Codecov Report
Base: 92.05% // Head: 92.04% // Decreases project coverage by -0.00% :warning:
Coverage data is based on head (
c3ee2c9) compared to base (1cdba63). Patch coverage: 100.00% of modified lines in pull request are covered.
Additional details and impacted files
@@ Coverage Diff @@
## master #2302 +/- ##
==========================================
- Coverage 92.05% 92.04% -0.01%
==========================================
Files 110 110
Lines 28705 28730 +25
==========================================
+ Hits 26423 26445 +22
- Misses 2282 2285 +3
| Impacted Files | Coverage Δ | |
|---|---|---|
| redis/asyncio/client.py | 92.26% <100.00%> (+0.04%) |
:arrow_up: |
| redis/asyncio/cluster.py | 90.33% <100.00%> (+0.04%) |
:arrow_up: |
| redis/client.py | 89.10% <100.00%> (+0.03%) |
:arrow_up: |
| tests/test_asyncio/test_commands.py | 98.35% <100.00%> (+<0.01%) |
:arrow_up: |
| tests/test_commands.py | 89.94% <100.00%> (+0.02%) |
:arrow_up: |
| tests/test_asyncio/test_pubsub.py | 99.37% <0.00%> (-0.16%) |
:arrow_down: |
| tests/test_asyncio/test_cluster.py | 97.29% <0.00%> (-0.14%) |
:arrow_down: |
| tests/test_cluster.py | 96.96% <0.00%> (ø) |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.