\h*"ddlZddlZddlZejrddlmZGddej Zejeejdge ffZ GddeZ e Z Gdd eZeZGd d eZGd d eZGddeZGddeZGddeZGddeZGddeZGddeZGddeZGddeZGddeZy) N)RetryCallStatecNeZdZdZej dddefdZd dZd dZ y) retry_basez)Abstract base class for retry strategies. retry_staterreturncyNselfrs ]/root/niggaflix-v3/playground/venv/lib/python3.12/site-packages/pip/_vendor/tenacity/retry.py__call__zretry_base.__call__s ct||Sr ) retry_allr others r __and__zretry_base.__and__ u%%rct||Sr ) retry_anyrs r __or__zretry_base.__or__#rrN)rrrr)rrrr) __name__ __module__ __qualname____doc__abcabstractmethodboolrrrr rr rrs63 $4   &&rrrc eZdZdZdddefdZy) _retry_neverz-Retry strategy that never rejects any result.rrrcy)NFr r s r rz_retry_never.__call__-srNrrrrrrr rr r!r!*s7$4rr!c eZdZdZdddefdZy) _retry_alwaysz.Retry strategy that always rejects any result.rrrcy)NTr r s r rz_retry_always.__call__7srNr#r rr r%r%4s8$4rr%cPeZdZdZdej egefddfdZdddefdZ y) retry_if_exceptionzARetry strategy that retries if an exception verifies a predicate. predicaterNc||_yr r)r r)s r __init__zretry_if_exception.__init__A "rrrc|j td|jjr8|jj}| td|j |Sy)N(__call__() called before outcome was set(outcome failed but the exception is NoneFoutcome RuntimeErrorfailed exceptionr)r rr6s r rzretry_if_exception.__call__Dsa    &IJ J    % %#++557I "#MNN>>), ,r) rrrrtypingCallable BaseExceptionrr-rr rr r(r(>s<K#&//=/42G"H#T# $4  rr(ceZdZdZefdej ejeejejedffddffd Z xZ S)retry_if_exception_typez=Retries if an exception has been raised of one or more types.exception_types.rNc:|_t| fdy)Nct|Sr  isinstanceer=s r z2retry_if_exception_type.__init__..\s:a#Arr=superr-r r= __class__s `r r-z retry_if_exception_type.__init__Ts / ABr rrrr Exceptionr8UnionTyper:Tupler- __classcell__rHs@r r<r<Qs_G  C KK & LL]3S8 9 ; C  CCrr<ceZdZdZefdej ejeejejedffddffd Z xZ S)retry_if_not_exception_typezARetries except an exception has been raised of one or more types.r=.rNc:|_t| fdy)Nct| Sr r@rBs r rDz6retry_if_not_exception_type.__init__..jz!_'E#ErrErGs `r r-z$retry_if_not_exception_type.__init__b / EFrrIrOs@r rQrQ_s_K  G KK & LL]3S8 9 ; G  GGrrQceZdZdZefdej ejeejejedffddffd Z ddde fd Z xZ S) retry_unless_exception_typez:Retries until an exception is raised of one or more types.r=.rNc:|_t| fdy)Nct| Sr r@rBs r rDz6retry_unless_exception_type.__init__..xrTrrErGs `r r-z$retry_unless_exception_type.__init__prUrrrc|j td|jjsy|jj}| td|j |SNr0Tr1r2r7s r rz$retry_unless_exception_type.__call__zsc    &IJ J""))''113  IJ J~~i((r)rrrrrJr8rKrLr:rMr-rrrNrOs@r rWrWmsmD  G KK & LL]3S8 9 ; G  G )$4 ) )rrWceZdZdZefdej ejeejejedffddfdZ ddde fd Z y) retry_if_exception_cause_typezRetries if any of the causes of the raised exception is of one or more types. The check on the type of the cause of the exception is done recursively (until finding an exception in the chain that has no `__cause__`) r=.rNc||_yr )exception_cause_types)r r=s r r-z&retry_if_exception_cause_type.__init__s &5"rrrc|j td|jjrL|jj}|0t |j |j ry|j }|0y)Nz&__call__ called before outcome was setTF)r3r4r5r6rA __cause__r_)r rexcs r rz&retry_if_exception_cause_type.__call__sn    &GH H    % %%%//1C/cmmT-G-GHmm/ r) rrrrrJr8rKrLr:rMr-rrr rr r]r]sk  5 KK & LL]3S8 9 ; 5  5 $4  rr]cdeZdZdZdej ej gefddfdZdddefdZ y) retry_if_resultz+Retries if the result verifies a predicate.r)rNc||_yr r+r,s r r-zretry_if_result.__init__r.rrrc|j td|jjs)|j|jj SyNr0Fr3r4r5r)resultr s r rzretry_if_result.__call__sJ    &IJ J""))>>+"5"5"<"<">? ?r rrrrr8r9Anyrr-rr rr rdrds@5#&//6::,2D"E#$#$4rrdcdeZdZdZdej ej gefddfdZdddefdZ y) retry_if_not_resultz*Retries if the result refutes a predicate.r)rNc||_yr r+r,s r r-zretry_if_not_result.__init__r.rrrc|j td|jjs*|j|jj  Syrgrhr s r rzretry_if_not_result.__call__sM    &IJ J""))~~k&9&9&@&@&BCC Crrjr rr rmrms@4#&//6::,2D"E#$#$4rrmcjeZdZdZ ddej edej eddffd ZxZS)retry_if_exception_messagez2Retries if an exception message equals or matches.Nmessagematchrc>r$|r"t|jjdrdtdtffd }|}nN|r*t j |dtdtffd }|}n"t|jjdt|!|y)Nz.() takes either 'message' or 'match', not bothr6rc t|k(Sr )str)r6rrs r message_fncz8retry_if_exception_message.__init__..message_fncs#i.00rcJtjt|Sr )rrsrv)r6progs r match_fncz6retry_if_exception_message.__init__..match_fncsDJJs9~677rz3() missing 1 required argument 'message' or 'match') TypeErrorrHrr:rrecompilerFr-)r rrrsrwr)rzryrHs ` @r r-z#retry_if_exception_message.__init__s ut~~6677efg g  1} 1 1$I ::e$D 8] 8t 8"It~~6677jkl l #rNN) rrrrr8Optionalrvr-rNrOs@r rqrqsF<)-&*$%$s#$  $$rrqczeZdZdZ d dej edej eddffd Zdddefd Z xZ S) retry_if_not_exception_messagez5Retries until an exception message equals or matches.NrrrsrcTt||||jfd|_y)Nc|i| Sr r )args_kwargs_ if_predicates r rDz9retry_if_not_exception_message.__init__..s|U7Vg7V3Vr)rFr-r))r rrrsrrHs @r r-z'retry_if_not_exception_message.__init__s$ %(~~ Vrrrc|j td|jjsy|jj}| td|j |Sr[r2r7s r rz'retry_if_not_exception_message.__call__sa    &IJ J""))''113  IJ J~~i((rr~) rrrrr8rrvr-rrrNrOs@r rrsY?)-&*W%Ws#W  W )$4 ) )rrc0eZdZdZdeddfdZdddefdZy) rz1Retries if any of the retries condition is valid.retriesrNc||_yr rr rs r r-zretry_any.__init__  rrrc@tfd|jDS)Nc3.K|] }|ywr r .0rrs r z%retry_any.__call__..8a1[>8)anyrr s `r rzretry_any.__call__84<<888rrrrrrr-rrr rr rrs,;9$499rrc0eZdZdZdeddfdZdddefdZy) rz/Retries if all the retries condition are valid.rrNc||_yr rrs r r-zretry_all.__init__ rrrrc@tfd|jDS)Nc3.K|] }|ywr r rs r rz%retry_all.__call__..rr)allrr s `r rzretry_all.__call__rrrr rr rr s,99$499rr)rr|r8 TYPE_CHECKINGpip._vendor.tenacityrABCrrKr9r RetryBaseTr! retry_neverr% retry_alwaysr(r<rQrWr]rdrmrqrrrr rr rs "  3 & &\\*foo7G6H$6N&OO P :n J & C0 C G"4 G)"4)6J< j  *  $!3$>)%?)49 99 9r