+
     h  c                   s    ^ RI t ^ RIHt ^ RIHtHtHtHtHtH	t	H
t
 ^ RIHtHt ]
! R4      t]'       d   ^ RIHt  ! R R4      tR# )	i    N)sleep)TYPE_CHECKINGAnyCallableIterableTupleTypeTypeVar)ConnectionErrorTimeoutErrorT)AbstractBackoffc                   sz   a  ] tR t^t o Rt]]]P                  33V 3R lR llt	V 3R lR lt
V 3R lR ltRtV tR	# )
Retryz0Retry a specific number of times after a failurec                sN   < V ^8  d   QhRRRS[ RS[S[S[,          R3,          /# )   backoffr   retriessupported_errors.)Zintr   r   	ExceptionZformat__classdict__   "0/usr/lib/python3.14/site-packages/redis/retry.py__annotate__Retry.__annotate__   s7     2 2"2 2  Y 45	2    c                s*    Wn         W n        W0n        R# )z
Initialize a `Retry` object with a `Backoff` object
that retries a maximum of `retries` times.
`retries` can be negative to retry forever.
You can specify the types of supported errors which trigger
a retry with the `supported_errors` parameter.
N_backoff_retries_supported_errors)selfr   r   r   s   &&&&r   __init__ZRetry.__init__   s    "  !1r   c                sD   < V ^8  d   QhRS[ S[S[,          ,          RR/# )r   specified_errorsreturnN)r   r   r   r   r   r   r   r   %   s&     
 
 (i 9
	
r   c                sl    \        \        V P                  \        V4      ,           4      4      V n        R# )z=
Updates the supported errors with the specified error types
N)ZtupleZsetr   )r   r   s   &&r   update_supported_errorsZRetry.update_supported_errors%   s*     "'&&/?)@@A"
r   c                sX   < V ^8  d   QhRS[ . S[3,          RS[ S[.S[3,          RS[/# )r   dofailr    )r   r
   r   r   r   r   r   r   r   /   s=     # #RUO# 	{C'(# 
	#r   c                sX   V P                   P                  4        ^ p  V! 4       #   T P                   ds   pT^,          pT! T4       T P                  ^ 8  d   Y0P                  8  d   ThT P                   P	                  T4      pT^ 8  d   \        T4        Rp?K   Rp?K  Rp?ii ; i)z
Execute an operation that might fail and returns its result, or
raise the exception that was thrown depending on the `Backoff` object.
`do`: the operation to call. Expects no argument.
`fail`: the failure handler, expects the last error that was thrown
N)r   Zresetr   r   Zcomputer    )r   r"   r#   ZfailuresZerrorr   s   &&&   r   call_with_retryZRetry.call_with_retry/   s     		#t)) #AU==A%(]]*BK--//9Q;'NN #s   & B)A!B$$B)r   N)Z__name__Z
__module__Z__qualname__Z__firstlineno__Z__doc__r   r	   socketZtimeoutr   r!   r$   Z__static_attributes__Z__classdictcell__)r   s   @r   r   r      s:     : NN9
	2 2*
 
# #r   r   )r%   Ztimer    Ztypingr   r   r   r   r   r   r   Zredis.exceptionsr   r	   r
   Zredis.backoffr   r   ) r   r   <module>r&      s0      O O O :CL-9# 9#r   