File tree 3 files changed +3
-3
lines changed
3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ def __init__(
255
255
256
256
self .response_callbacks = CaseInsensitiveDict (self .__class__ .RESPONSE_CALLBACKS )
257
257
258
- if self .connection_pool .connection_kwargs .get ("protocol" ) == "3" :
258
+ if self .connection_pool .connection_kwargs .get ("protocol" ) in [ "3" , 3 ] :
259
259
self .response_callbacks .update (self .__class__ .RESP3_RESPONSE_CALLBACKS )
260
260
261
261
# If using a single connection client, we need to lock creation-of and use-of
Original file line number Diff line number Diff line change @@ -1109,7 +1109,7 @@ def __init__(
1109
1109
1110
1110
self .response_callbacks = CaseInsensitiveDict (self .__class__ .RESPONSE_CALLBACKS )
1111
1111
1112
- if self .connection_pool .connection_kwargs .get ("protocol" ) == "3" :
1112
+ if self .connection_pool .connection_kwargs .get ("protocol" ) in [ "3" , 3 ] :
1113
1113
self .response_callbacks .update (self .__class__ .RESP3_RESPONSE_CALLBACKS )
1114
1114
1115
1115
def __repr__ (self ):
Original file line number Diff line number Diff line change @@ -479,4 +479,4 @@ def is_resp2_connection(r):
479
479
protocol = r .connection_pool .connection_kwargs .get ("protocol" )
480
480
elif isinstance (r , redis .RedisCluster ):
481
481
protocol = r .nodes_manager .connection_kwargs .get ("protocol" )
482
- return protocol == "2" or protocol is None
482
+ return protocol in [ "2" , 2 , None ]
You can’t perform that action at this time.
0 commit comments