File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ def __init__(
255255
256256 self .response_callbacks = CaseInsensitiveDict (self .__class__ .RESPONSE_CALLBACKS )
257257
258- if self .connection_pool .connection_kwargs .get ("protocol" ) == "3" :
258+ if self .connection_pool .connection_kwargs .get ("protocol" ) in [ "3" , 3 ] :
259259 self .response_callbacks .update (self .__class__ .RESP3_RESPONSE_CALLBACKS )
260260
261261 # 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__(
11091109
11101110 self .response_callbacks = CaseInsensitiveDict (self .__class__ .RESPONSE_CALLBACKS )
11111111
1112- if self .connection_pool .connection_kwargs .get ("protocol" ) == "3" :
1112+ if self .connection_pool .connection_kwargs .get ("protocol" ) in [ "3" , 3 ] :
11131113 self .response_callbacks .update (self .__class__ .RESP3_RESPONSE_CALLBACKS )
11141114
11151115 def __repr__ (self ):
Original file line number Diff line number Diff line change @@ -479,4 +479,4 @@ def is_resp2_connection(r):
479479 protocol = r .connection_pool .connection_kwargs .get ("protocol" )
480480 elif isinstance (r , redis .RedisCluster ):
481481 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