HEX
Server: Apache
System: Linux p3plzcpnl506847.prod.phx3.secureserver.net 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: slfopp7cb1df (5698090)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //opt/python38/lib/python3.8/site-packages/pip/_vendor/tenacity/__pycache__/stop.cpython-38.pyc
U

�{�e�@s�ddlZddlZddlmZejr6ddlZddlmZGdd�dej�Zej	eej
dgeffZGdd�de�Z
Gd	d
�d
e�ZGdd�de�Ze�ZGd
d�de�ZGdd�de�ZGdd�de�ZdS)�N)�_utils)�RetryCallStatec@sFeZdZdZejded�dd��Zddd�dd	�Zdd
d�dd�Z	d
S)�	stop_basez(Abstract base class for stop strategies.r��retry_state�returncCsdS�N���selfrr	r	�=/tmp/pip-unpacked-wheel-_0scjqea/pip/_vendor/tenacity/stop.py�__call__szstop_base.__call__�stop_all)�otherrcCs
t||�Sr)r�rrr	r	r�__and__"szstop_base.__and__�stop_anycCs
t||�Sr)rrr	r	r�__or__%szstop_base.__or__N)
�__name__�
__module__�__qualname__�__doc__�abc�abstractmethod�boolr
rrr	r	r	rrs
rrc@s0eZdZdZedd�dd�Zded�dd	�ZdS)
rz+Stop if any of the stop condition is valid.N��stopsrcGs
||_dSr�r�rrr	r	r�__init__/szstop_any.__init__rrcst�fdd�|jD��S)Nc3s|]}|��VqdSrr	��.0�x�rr	r�	<genexpr>3sz$stop_any.__call__.<locals>.<genexpr>)�anyrr
r	r#rr
2szstop_any.__call__�rrrrrrrr
r	r	r	rr,src@s0eZdZdZedd�dd�Zded�dd	�ZdS)
rz*Stop if all the stop conditions are valid.NrcGs
||_dSrrrr	r	rr9szstop_all.__init__rrcst�fdd�|jD��S)Nc3s|]}|��VqdSrr	r r#r	rr$=sz$stop_all.__call__.<locals>.<genexpr>)�allrr
r	r#rr
<szstop_all.__call__r&r	r	r	rr6src@s eZdZdZded�dd�ZdS)�_stop_neverzNever stop.rrcCsdS)NFr	r
r	r	rr
Csz_stop_never.__call__N)rrrrrr
r	r	r	rr(@sr(c@s0eZdZdZddd�dd�Zded�d	d
�ZdS)�stop_when_event_setz!Stop when the given event is set.zthreading.EventN)�eventrcCs
||_dSr)r*)rr*r	r	rrMszstop_when_event_set.__init__rrcCs
|j��Sr)r*�is_setr
r	r	rr
Pszstop_when_event_set.__call__)rrrrrrr
r	r	r	rr)Jsr)c@s0eZdZdZedd�dd�Zded�dd	�ZdS)
�stop_after_attemptz.Stop when the previous attempt >= max_attempt.N)�max_attempt_numberrcCs
||_dSr)r-)rr-r	r	rrWszstop_after_attempt.__init__rrcCs|j|jkSr)�attempt_numberr-r
r	r	rr
Zszstop_after_attempt.__call__)rrrr�intrrr
r	r	r	rr,Tsr,c@s2eZdZdZejdd�dd�Zded�dd	�ZdS)
�stop_after_delayz3Stop when the time from the first attempt >= limit.N)�	max_delayrcCst�|�|_dSr)rZ
to_secondsr1)rr1r	r	rraszstop_after_delay.__init__rrcCs|jdkrtd��|j|jkS)Nz4__call__() called but seconds_since_start is not set)Zseconds_since_start�RuntimeErrorr1r
r	r	rr
ds
zstop_after_delay.__call__)	rrrrrZtime_unit_typerrr
r	r	r	rr0^sr0)r�typingZpip._vendor.tenacityr�
TYPE_CHECKING�	threadingr�ABCr�Union�CallablerZ	StopBaseTrrr(Z
stop_neverr)r,r0r	r	r	r�<module>s