Re ddlZddlZejr ddlZddlmZGddejZGddeZGddeZ Gd d eZ e Z Gd d eZ Gd deZ GddeZdS)N)RetryCallStatecLeZdZdZejdddefdZd dZd d Z d S) stop_basez(Abstract base class for stop strategies. retry_staterreturncdSNselfrs /builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/tenacity/stop.py__call__zstop_base.__call__s otherstop_allc"t||Sr )rr rs r __and__zstop_base.__and__ e$$$rstop_anyc"t||Sr )rrs r __or__zstop_base.__or__#rrN)rrrr)rrrr) __name__ __module__ __qualname____doc__abcabstractmethodboolrrrr rr rrss22 $4     %%%%%%%%%%rrc2eZdZdZdeddfdZdddefdZdS) rz+Stop if any of the stop condition is valid.stopsrNc||_dSr r!r r!s r __init__zstop_any.__init__*  rrrcDtfd|jDS)Nc3.K|]}|VdSr r .0xrs r z$stop_any.__call__...+66a11[>>666666r)anyr!r s `r rzstop_any.__call__-(66664:666666rrrrrrr%rrr rr rr's_55yT7$47777777rrc2eZdZdZdeddfdZdddefdZdS) rz*Stop if all the stop conditions are valid.r!rNc||_dSr r#r$s r r%zstop_all.__init__4r&rrrcDtfd|jDS)Nc3.K|]}|VdSr r r)s r r,z$stop_all.__call__..8r-r)allr!r s `r rzstop_all.__call__7r/rr0r rr rr1s_44yT7$47777777rrc"eZdZdZdddefdZdS) _stop_neverz Never stop.rrrcdS)NFr r s r rz_stop_never.__call__>surN)rrrrrrr rr r7r7;s=$4rr7c*eZdZdZd dZdddefd ZdS) stop_when_event_setz!Stop when the given event is set.eventthreading.EventrNc||_dSr )r;)r r;s r r%zstop_when_event_set.__init__Hr&rrrc4|jSr )r;is_setr s r rzstop_when_event_set.__call__Ksz  """r)r;r<rN)rrrrr%rrr rr r:r:EsQ++#$4#######rr:c2eZdZdZdeddfdZdddefdZdS) stop_after_attemptz.Stop when the previous attempt >= max_attempt.max_attempt_numberrNc||_dSr )rB)r rBs r r%zstop_after_attempt.__init__Rs"4rrrc"|j|jkSr )attempt_numberrBr s r rzstop_after_attempt.__call__Us)T-DDDr)rrrrintr%rrr rr rArAOsg8853545555E$4EEEEEEErrAc2eZdZdZdeddfdZdddefdZdS) stop_after_delayz3Stop when the time from the first attempt >= limit. max_delayrNc||_dSr )rI)r rIs r r%zstop_after_delay.__init__\s "rrrc"|j|jkSr )seconds_since_startrIr s r rzstop_after_delay.__call___s.$.@@r)rrrrfloatr%rrr rr rHrHYsg==#%#D####A$4AAAAAAArrH)rtyping TYPE_CHECKING threadingpip._vendor.tenacityrABCrrrr7 stop_neverr:rArHr rr rTs   4333333 % % % % % % % %77777y77777777y777)[]] #####)###EEEEEEEEAAAAAyAAAAAr