-
Notifications
You must be signed in to change notification settings - Fork 335
Conversation
fix socket.error raises
This kind of bug appears in more than one place so it's not actually going to address all instances of |
@eneloop2 @Andrew-Chen-Wang
|
@x0day do you have hiredis installed by chance? |
YES, it's not parse error, just aio-redis not consider socket error as NONBLOCKING_EXCEPTIONS. |
@seandstewart can we get this in the PR #1156 ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the message and PR!
Please add a CHANGE file though |
@Andrew-Chen-Wang thanks for the review! |
Codecov Report
@@ Coverage Diff @@
## master #1129 +/- ##
==========================================
- Coverage 90.71% 90.64% -0.07%
==========================================
Files 21 21
Lines 6872 6875 +3
Branches 793 794 +1
==========================================
- Hits 6234 6232 -2
- Misses 467 470 +3
- Partials 171 173 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
One thing to note is that from redis/redis-py@8c5a41b, this piece of code was dropped due to Python 2.7 dropping. How does this resolve a Windows specific error? |
FYI: at redis/redis-py@8c5a41b, it's solve the problem by raise but aioredis-py didn't catch the https://github.com/redis/redis-py/blob/791f482dcb320f48cf950c4b2c6047d1981a8f67/redis/connection.py#L753-L756 so if should I need to update the PR, by catching the |
Yes, by catching the socket.error you mean? I'm surprised BaseException doesn't catch it, but at least by catching socket.error directly we can resolve this issue + be in paralle l with redis-py. |
@Andrew-Chen-Wang can you review the PR again? thanks. |
Co-authored-by: Andrew Chen Wang <60190294+Andrew-Chen-Wang@users.noreply.github.com>
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
failing ci |
@Andrew-Chen-Wang sorry for late response, failing CI because this: https://github.com/aio-libs/aioredis-py/blob/master/aioredis/exceptions.py#L10 aioredis-py warped |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure to be honest; maybe to decrease imports? If anything, LGTM
Fixes #1121
What do these changes do?
fix raise
aioredis.exceptions.ConnectionError
instead of rawsocket.error
or its subclassesAre there changes in behavior for the user?
no
Related issue number
#1121