uawdijnntqw1x1x1
IP : 3.133.159.240
Hostname : ns1.eurodns.top
Kernel : Linux ns1.eurodns.top 4.18.0-553.5.1.lve.1.el7h.x86_64 #1 SMP Fri Jun 14 14:24:52 UTC 2024 x86_64
Disable Function : mail,sendmail,exec,passthru,shell_exec,system,popen,curl_multi_exec,show_source,eval,open_base
OS : Linux
PATH:
/
home
/
..
/
lib
/
python3.6
/
site-packages
/
pip
/
_vendor
/
__pycache__
/
retrying.cpython-36.opt-1.pyc
/
/
3 ���^�&�@slddlZddlmZddlZddlZddlZdZdd�ZGdd�de�Z Gdd �d e�Z Gd d�de�ZdS)�N)�sixi���?csBt��dkr,t�d�r,dd�}|�d�S��fdd�}|SdS)z� Decorator function that instantiates the Retrying object @param *dargs: positional arguments passed to Retrying object @param **dkw: keyword arguments passed to the Retrying object �rcstj���fdd��}|S)Ncst�j�f|�|�S)N)�Retrying�call)�args�kw)�f��/usr/lib/python3.6/retrying.py� wrapped_f$sz-retry.<locals>.wrap_simple.<locals>.wrapped_f)r�wraps)rrr )rr �wrap_simple"szretry.<locals>.wrap_simplecstj�����fdd��}|S)Ncst���j�f|�|�S)N)rr)rr)�dargs�dkwrr r r/sz&retry.<locals>.wrap.<locals>.wrapped_f)rr)rr)rr)rr �wrap-szretry.<locals>.wrapN)�len�callable)rrr rr )rrr �retrys rc@sneZdZddd�Zdd�Zdd�Zd d �Zdd�Zd d�Zdd�Z dd�Z dd�Zdd�Zdd�Z dd�ZdS)rNFcs|dkrdn||_|dkrdn||_|dkr0dn||_|dkrBdn||_|dkrTdn||_|dkrfdn||_| dkrxdn| |_| dkr�dn| |_|dkr�tn||_ |dkr�dn||_ g�|dk r̈j|j�|dk r�j|j �|dk r�||_n&|dk�r �fdd�|_nt||�|_dd�g�|dk �r6�j|j�|dk �sJ|dk �rV�j|j�|dk �sj| dk �rv�j|j�| dk �s�|dk �r��j|j�|dk �r�||_n&|dk�rfd d�|_nt||�|_|dk�r�|j|_n||_| dk�r�|j|_n| |_||_dS) N��di�rrcst��fdd��D��S)Nc3s|]}|���VqdS)Nr )�.0r)�attempts�delayr r � <genexpr>asz6Retrying.__init__.<locals>.<lambda>.<locals>.<genexpr>)�any)rr)� stop_funcs)rrr �<lambda>asz#Retrying.__init__.<locals>.<lambda>c_sdS)Nrr )r�kwargsr r r rhscst��fdd��D��S)Nc3s|]}|���VqdS)Nr )rr)rrr r rysz6Retrying.__init__.<locals>.<lambda>.<locals>.<genexpr>)�max)rr)� wait_funcs)rrr rys)�_stop_max_attempt_number�_stop_max_delay�_wait_fixed�_wait_random_min�_wait_random_max�_wait_incrementing_start�_wait_incrementing_increment�_wait_exponential_multiplier�MAX_WAIT�_wait_exponential_max�_wait_jitter_max�append�stop_after_attempt�stop_after_delay�stop�getattr�fixed_sleep�random_sleep�incrementing_sleep�exponential_sleep�wait� always_reject�_retry_on_exception�never_reject�_retry_on_result�_wrap_exception)�selfr.r4Zstop_max_attempt_numberZstop_max_delayZ wait_fixedZwait_random_minZwait_random_maxZwait_incrementing_startZwait_incrementing_incrementZwait_exponential_multiplierZwait_exponential_maxZretry_on_exceptionZretry_on_result�wrap_exceptionZ stop_funcZ wait_funcZwait_jitter_maxr )rrr �__init__:sR zRetrying.__init__cCs ||jkS)z;Stop after the previous attempt >= stop_max_attempt_number.)r )r:�previous_attempt_number�delay_since_first_attempt_msr r r r,�szRetrying.stop_after_attemptcCs ||jkS)z=Stop after the time from the first attempt >= stop_max_delay.)r!)r:r=r>r r r r-�szRetrying.stop_after_delaycCsdS)z#Don't sleep at all before retrying.rr )r:r=r>r r r �no_sleep�szRetrying.no_sleepcCs|jS)z0Sleep a fixed amount of time between each retry.)r")r:r=r>r r r r0�szRetrying.fixed_sleepcCstj|j|j�S)zISleep a random amount of time between wait_random_min and wait_random_max)�randomZrandintr#r$)r:r=r>r r r r1�szRetrying.random_sleepcCs$|j|j|d}|dkr d}|S)z� Sleep an incremental amount of time after each attempt, starting at wait_incrementing_start and incrementing by wait_incrementing_increment rr)r%r&)r:r=r>�resultr r r r2�szRetrying.incrementing_sleepcCs2d|}|j|}||jkr"|j}|dkr.d}|S)N�r)r'r))r:r=r>ZexprAr r r r3�s zRetrying.exponential_sleepcCsdS)NFr )r:rAr r r r7�szRetrying.never_rejectcCsdS)NTr )r:rAr r r r5�szRetrying.always_rejectcCs4d}|jr ||j|jd�O}n||j|j�O}|S)NFr)� has_exceptionr6�valuer8)r:�attemptZrejectr r r � should_reject�s zRetrying.should_rejectc Os�tttj�d��}d}x�yt|||�|d�}Wn tj�}t||d�}YnX|j|�sh|j|j�Stttj�d��|}|j ||�r�|jr�|j r�|j��q�t|��n<|j||�} |j r�tj�|j } | td| �} tj| d�|d7}qWdS)Ni�rFTrg@�@)�int�round�time�Attempt�sys�exc_inforF�getr9r.rC� RetryErrorr4r*r@r�sleep)r:�fnrrZ start_time�attempt_numberrE�tbr>rOZjitterr r r r�s* z Retrying.call)NNNNNNNNNNNNNFNNN)�__name__� __module__�__qualname__r<r,r-r?r0r1r2r3r7r5rFrr r r r r8s0 F rc@s*eZdZdZdd�Zd dd�Zdd�Zd S)rJz� An Attempt encapsulates a call to a target function that may end as a normal return value from the function or an Exception depending on what occurred during the execution. cCs||_||_||_dS)N)rDrQrC)r:rDrQrCr r r r<�szAttempt.__init__FcCs@|jr6|rt|��q<tj|jd|jd|jd�n|jSdS)z� Return the return value of this Attempt instance or raise an Exception. If wrap_exception is true, this Attempt is wrapped inside of a RetryError before being raised. rrrBN)rCrNrZreraiserD)r:r;r r r rM�s "zAttempt.getcCs:|jr&dj|jdjtj|jd���Sdj|j|j�SdS)NzAttempts: {0}, Error: {1}�rBzAttempts: {0}, Value: {1})rC�formatrQ�join� traceback� format_tbrD)r:r r r �__repr__�s zAttempt.__repr__N)F)rSrTrU�__doc__r<rMr[r r r r rJ�s rJc@s eZdZdZdd�Zdd�ZdS)rNzU A RetryError encapsulates the last Attempt instance right before giving up. cCs ||_dS)N)�last_attempt)r:r]r r r r<szRetryError.__init__cCsdj|j�S)NzRetryError[{0}])rWr])r:r r r �__str__ szRetryError.__str__N)rSrTrUr\r<r^r r r r rNsrN) r@Zpip._vendorrrKrIrYr(r�objectrrJ� ExceptionrNr r r r �<module>s*!
/home/../lib/python3.6/site-packages/pip/_vendor/__pycache__/retrying.cpython-36.opt-1.pyc