Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/retry.cpython-312.pyc

�

4Μgp�
��ddlZddlmZmZddlmZmZddlmZed�Z	ed�Z
deded	eee
e	fgee
e	fffd
�Zy)�N)�perf_counter�sleep)�Callable�TypeVar)�	ParamSpec�T�P�wait�stop_after_delay�returnc�d���dtttfdtttff��fd�}|S)a�Decorator to automatically retry a function on error.

    If the function raises, the function is recalled with the same arguments
    until it returns or the time limit is reached. When the time limit is
    surpassed, the last exception raised is reraised.

    :param wait: The time to wait after an error before retrying, in seconds.
    :param stop_after_delay: The time limit after which retries will cease,
        in seconds.
    �funcrc����tj��dtjdtjdt
f���fd��}|S)N�args�kwargsrc���t�}		�|i|��S#t$rt�|z
�kDr�t��YnwxYw�5)N)r�	Exceptionr)rr�
start_timerrr
s   ����D/usr/local/lib/python3.12/site-packages/pip/_internal/utils/retry.py�
retry_wrappedz-retry.<locals>.wrapper.<locals>.retry_wrappedsR���&��J�� ���0��0�0�� � �#�~�
�2�5E�E���$�K� ��s��%>�>)�	functools�wrapsr	rrr)rrrr
s` ��r�wrapperzretry.<locals>.wrappersC���	����	�
	 ����
	 �1�8�8�
	 ��
	 �
�
	 ���)rr	r)r
rrs`` r�retryrs-����h�q�!�t�n���!�Q�$���"�Nr)
r�timerr�typingrr�pip._vendor.typing_extensionsrrr	�floatr�rr�<module>r!s]���$�$�3��C�L��
�c�N���
��#(��
�x��1��~����A���.�/�r

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists