HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/site-packages/pip/_vendor/tenacity/__pycache__/retry.cpython-310.pyc
o

��i~�@sddlZddlZddlZejrddlmZGdd�dej�ZGdd�de�Ze�Z	Gdd�de�Z
e
�ZGd	d
�d
e�ZGdd�de�Z
Gd
d�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZdS)�N)�RetryCallStatec@s<eZdZdZejdddefdd��Zdd	d
�Zddd
�Z	dS)�
retry_basez)Abstract base class for retry strategies.�retry_stater�returncCsdS�N���selfrrr�E/usr/local/lib/python3.10/site-packages/pip/_vendor/tenacity/retry.py�__call__szretry_base.__call__�other�	retry_allcC�
t||�Sr)r
�r	rrrr
�__and__ �
zretry_base.__and__�	retry_anycCrr)rrrrr
�__or__#rzretry_base.__or__N)rrrr
)rrrr)
�__name__�
__module__�__qualname__�__doc__�abc�abstractmethod�boolrrrrrrr
rs
rc@�"eZdZdZdddefdd�ZdS)�_retry_neverz-Retry strategy that never rejects any result.rrrcC�dS�NFrrrrr
r*�z_retry_never.__call__N�rrrrrrrrrr
r'�rc@r)�
_retry_alwaysz.Retry strategy that always rejects any result.rrrcCr�NTrrrrr
r4rz_retry_always.__call__Nr rrrr
r"1r!r"c@s@eZdZdZdejegefddfdd�Zdddefd	d
�Z	dS)�retry_if_exceptionzARetry strategy that retries if an exception verifies a predicate.�	predicaterNcC�
||_dSr�r%�r	r%rrr
�__init__>rzretry_if_exception.__init__rrcCs|jjr|�|j���SdSr��outcome�failedr%�	exceptionrrrr
rA�zretry_if_exception.__call__)
rrrr�typing�Callable�
BaseExceptionrr)rrrrr
r$;sr$c�NeZdZdZefdejejeej	ejedffddf�fdd�
Z
�ZS)�retry_if_exception_typez=Retries if an exception has been raised of one or more types.�exception_types.rNc��|_t���fdd��dS)Ncs
t|��Sr��
isinstance��e�r4rr
�<lambda>Ss
z2retry_if_exception_type.__init__.<locals>.<lambda>�r4�superr)�r	r4��	__class__r:r
r)K�z retry_if_exception_type.__init__�rrrr�	Exceptionr/�Union�Typer1�Tupler)�
__classcell__rrr?r
r3H������r3cr2)�retry_if_not_exception_typezARetries except an exception has been raised of one or more types.r4.rNcr5)Nc�t|��Srr6r8r:rr
r;a�z6retry_if_not_exception_type.__init__.<locals>.<lambda>r<r>r?r:r
r)YrAz$retry_if_not_exception_type.__init__rBrrr?r
rIVrHrIcs`eZdZdZefdejejeej	ejedffddf�fdd�
Z
dd	defd
d�Z�Z
S)�retry_unless_exception_typez:Retries until an exception is raised of one or more types.r4.rNcr5)NcrJrr6r8r:rr
r;orKz6retry_unless_exception_type.__init__.<locals>.<lambda>r<r>r?r:r
r)grAz$retry_unless_exception_type.__init__rrcC�|jjsdS|�|j���Sr#r*rrrr
rqsz$retry_unless_exception_type.__call__)rrrrrCr/rDrEr1rFr)rrrGrrr?r
rLds�����
rLc@sXeZdZdZefdejejeej	ejedffddfdd�Z
dd	defd
d�ZdS)�retry_if_exception_cause_typez�Retries 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__`)
    r4.rNcCr&r)�exception_cause_typesr>rrr
r)s
z&retry_if_exception_cause_type.__init__rrcCs>|jjr|j��}|durt|j|j�rdS|j}|dus
dS)NTF)r+r,r-r7�	__cause__rO)r	r�excrrr
r�s
�z&retry_if_exception_cause_type.__call__)
rrrrrCr/rDrEr1rFr)rrrrrr
rNxs����
�	rNc@�BeZdZdZdejejgefddfdd�Zdddefd	d
�Z	dS)�retry_if_resultz+Retries if the result verifies a predicate.r%rNcCr&rr'r(rrr
r)�rzretry_if_result.__init__rrcCs|jjs|�|j���SdSr�r+r,r%�resultrrrr
r�r.zretry_if_result.__call__�
rrrrr/r0�Anyrr)rrrrr
rS�� rSc@rR)�retry_if_not_resultz*Retries if the result refutes a predicate.r%rNcCr&rr'r(rrr
r)�rzretry_if_not_result.__init__rrcCs|jjs
|�|j���SdSrrTrrrr
r�szretry_if_not_result.__call__rVrrrr
rY�rXrYcs@eZdZdZ		ddejedejeddf�fdd�
Z�ZS)	�retry_if_exception_messagez2Retries if an exception message equals or matches.N�message�matchrcs��r
|r
t|jj�d����rdtdtf�fdd�}|}n|r2t�|��dtdtf�fdd�}|}n	t|jj�d���t��|�dS)	Nz.() takes either 'message' or 'match', not bothr-rcs�t|�kSr)�str�r-)r[rr
�message_fnc�sz8retry_if_exception_message.__init__.<locals>.message_fnccst��t|���Sr)rr\r]r^)�progrr
�	match_fnc�sz6retry_if_exception_message.__init__.<locals>.match_fncz3() missing 1 required argument 'message' or 'match')	�	TypeErrorr@rr1r�re�compiler=r))r	r[r\r_r%rar?)r[r`r
r)�s
z#retry_if_exception_message.__init__�NN)	rrrrr/�Optionalr]r)rGrrr?r
rZ�s����rZcsReZdZdZ		ddejedejeddf�fdd�
Zdd	defd
d�Z	�Z
S)
�retry_if_not_exception_messagez5Retries until an exception message equals or matches.Nr[r\rcs&t��||�|j��fdd�|_dS)Ncs�|i|��Srr)�args_�kwargs_��if_predicaterr
r;�sz9retry_if_not_exception_message.__init__.<locals>.<lambda>)r=r)r%)r	r[r\r?rjr
r)�sz'retry_if_not_exception_message.__init__rrcCrMr#r*rrrr
r�sz'retry_if_not_exception_message.__call__re)rrrrr/rfr]r)rrrGrrr?r
rg�s����
rgc@�4eZdZdZdeddfdd�Zdddefd	d
�ZdS)rz1Retries if any of the retries condition is valid.�retriesrNcGr&r�rm�r	rmrrr
r)�rzretry_any.__init__rrc�t�fdd�|jD��S)Nc3��|]}|��VqdSrr��.0�r�rrr
�	<genexpr>���z%retry_any.__call__.<locals>.<genexpr>)�anyrmrrrur
r��zretry_any.__call__�rrrrrr)rrrrrr
r��rc@rl)r
z/Retries if all the retries condition are valid.rmrNcGr&rrnrorrr
r)�rzretry_all.__init__rrcrp)Nc3rqrrrrrurr
rv�rwz%retry_all.__call__.<locals>.<genexpr>)�allrmrrrur
r�ryzretry_all.__call__rzrrrr
r
�r{r
)rrcr/�
TYPE_CHECKING�pip._vendor.tenacityr�ABCrr�retry_neverr"�retry_alwaysr$r3rIrLrNrSrYrZrgrr
rrrr
�<module>s*