\h JddlZddlZddlmZejr ddlZddlmZGddejZejeejdge ffZ GddeZ Gd d eZGd d eZeZGd deZGddeZGddeZy)N)_utils)RetryCallStatecNeZdZdZej dddefdZd dZd dZ y) stop_basez(Abstract base class for stop strategies. retry_staterreturncyNselfrs \/root/niggaflix-v3/playground/venv/lib/python3.12/site-packages/pip/_vendor/tenacity/stop.py__call__zstop_base.__call__s ct||Sr )stop_allr others r__and__zstop_base.__and__"e$$rct||Sr )stop_anyrs r__or__zstop_base.__or__%rrN)rrrr)rrrr) __name__ __module__ __qualname____doc__abcabstractmethodboolrrrr rrrrs62 $4   %%rrrc0eZdZdZdeddfdZdddefdZy) rz+Stop if any of the stop condition is valid.stopsrNc||_yr r"r r"s r__init__zstop_any.__init__/  rrrc@tfd|jDS)Nc3.K|] }|ywr r .0xrs r z$stop_any.__call__..36a1[>6)anyr"r s `rrzstop_any.__call__264::666rrrrrrr&r rr rrrr,s,5yT7$477rrc0eZdZdZdeddfdZdddefdZy) rz*Stop if all the stop conditions are valid.r"rNc||_yr r$r%s rr&zstop_all.__init__9r'rrrc@tfd|jDS)Nc3.K|] }|ywr r r*s rr-z$stop_all.__call__..=r.r/)allr"r s `rrzstop_all.__call__<r1rr2r rrrr6s,4yT7$477rrc eZdZdZdddefdZy) _stop_neverz Never stop.rrrcy)NFr r s rrz_stop_never.__call__CsrN)rrrrr rr rrr9r9@s$4rr9c(eZdZdZddZdddefdZy) stop_when_event_setz!Stop when the given event is set.rNc||_yr )event)r r>s rr&zstop_when_event_set.__init__Mr'rrrc6|jjSr )r>is_setr s rrzstop_when_event_set.__call__Pszz  ""r)r>zthreading.EventrN)rrrrr&r rr rrr<r<Js+#$4##rr<c0eZdZdZdeddfdZdddefdZy) stop_after_attemptz.Stop when the previous attempt >= max_attempt.max_attempt_numberrNc||_yr )rC)r rCs rr&zstop_after_attempt.__init__Ws "4rrrc4|j|jk\Sr )attempt_numberrCr s rrzstop_after_attempt.__call__Zs))T-D-DDDr)rrrrintr&r rr rrrBrBTs/853545E$4EErrBcDeZdZdZdej ddfdZdddefdZy) stop_after_delayz3Stop when the time from the first attempt >= limit. max_delayrNc8tj||_yr )r to_secondsrJ)r rJs rr&zstop_after_delay.__init__as**95rrrcb|j td|j|jk\S)Nz4__call__() called but seconds_since_start is not set)seconds_since_start RuntimeErrorrJr s rrzstop_after_delay.__call__ds/  * * 2UV V..$..@@r) rrrrrtime_unit_typer&r rr rrrIrI^s5=6&"7"76D6A$4AArrI)rtypingpip._vendor.tenacityr TYPE_CHECKING threadingrABCrUnionCallabler StopBaseTrrr9 stop_neverr<rBrIr rrrZs  ' 3 % % LLFOO5E4F4L$MM N 7y77y7)] #)#EE Ay Ar