Skip to content
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

Fix special response parsing options handling #2302

Merged
merged 4 commits into from Nov 9, 2022

Conversation

fadida
Copy link
Contributor

@fadida fadida commented Jul 25, 2022

Pull Request check-list

Please make sure to review and check all of these items:

  • Does $ tox pass 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)?
  • 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-commenter
Copy link

codecov-commenter commented Aug 15, 2022

Codecov Report

Base: 92.05% // Head: 92.04% // Decreases project coverage by -0.00% ⚠️

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%) ⬆️
redis/asyncio/cluster.py 90.33% <100.00%> (+0.04%) ⬆️
redis/client.py 89.10% <100.00%> (+0.03%) ⬆️
tests/test_asyncio/test_commands.py 98.35% <100.00%> (+<0.01%) ⬆️
tests/test_commands.py 89.94% <100.00%> (+0.02%) ⬆️
tests/test_asyncio/test_pubsub.py 99.37% <0.00%> (-0.16%) ⬇️
tests/test_asyncio/test_cluster.py 97.29% <0.00%> (-0.14%) ⬇️
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.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@chayim chayim requested a review from dvora-h August 17, 2022 06:22
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.
@dvora-h dvora-h added the bug Bug label Nov 9, 2022
@dvora-h dvora-h merged commit fb64743 into redis:master Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants