@@ -520,7 +520,7 @@ def __init__(
520520 socket_keepalive_options = None ,
521521 socket_type = 0 ,
522522 retry_on_timeout = False ,
523-  retry_on_error = [] ,
523+  retry_on_error = SENTINEL ,
524524 encoding = "utf-8" ,
525525 encoding_errors = "strict" ,
526526 decode_responses = False ,
@@ -552,6 +552,8 @@ def __init__(
552552 self .socket_keepalive_options  =  socket_keepalive_options  or  {}
553553 self .socket_type  =  socket_type 
554554 self .retry_on_timeout  =  retry_on_timeout 
555+  if  retry_on_error  is  SENTINEL :
556+  retry_on_error  =  []
555557 if  retry_on_timeout :
556558 # Add TimeoutError to the errors list to retry on 
557559 retry_on_error .append (TimeoutError )
@@ -1071,7 +1073,7 @@ def __init__(
10711073 encoding_errors = "strict" ,
10721074 decode_responses = False ,
10731075 retry_on_timeout = False ,
1074-  retry_on_error = [] ,
1076+  retry_on_error = SENTINEL ,
10751077 parser_class = DefaultParser ,
10761078 socket_read_size = 65536 ,
10771079 health_check_interval = 0 ,
@@ -1094,6 +1096,8 @@ def __init__(
10941096 self .password  =  password 
10951097 self .socket_timeout  =  socket_timeout 
10961098 self .retry_on_timeout  =  retry_on_timeout 
1099+  if  retry_on_error  is  SENTINEL :
1100+  retry_on_error  =  []
10971101 if  retry_on_timeout :
10981102 # Add TimeoutError to the errors list to retry on 
10991103 retry_on_error .append (TimeoutError )
0 commit comments