관리-도구
편집 파일: tornadoweb.cpython-39.pyc
a ��Rea � @ s| d dl Z d dlZd dlmZ d dlmZ d dlmZ d dlmZ d dlmZ ej r^d dl mZ e�d�Z G d d � d e�ZdS )� N)�BaseRetrying)� DoAttempt)�DoSleep)�RetryCallState)�gen)�Future�_RetValTc sL e Zd Zejfdejdd�� fdd� Zejdejejdd�d d ��Z � Z S )�TornadoRetryingz&typing.Callable[[float], Future[None]]N)�sleep�kwargs�returnc s t � jf i |�� || _d S )N)�super�__init__r )�selfr r �� __class__� ��/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/lib/python3.9/site-packages/pip/_vendor/tenacity/tornadoweb.pyr s zTornadoRetrying.__init__zhtyping.Callable[..., typing.Union[typing.Generator[typing.Any, typing.Any, _RetValT], Future[_RetValT]]]z2typing.Generator[typing.Any, typing.Any, _RetValT])�fn�argsr r c o s� | � � t| |||d�}| j|d�}t|t�rpz||i |��V }W n tyb |�t�� � Y q�0 |� |� qt|t �r�|�� | �|�V qt �|��qd S )N)�retry_objectr r r )�retry_state)�beginr �iter� isinstancer � BaseException� set_exception�sys�exc_info� set_resultr �prepare_for_next_attemptr r �Return)r r r r r �do�resultr r r �__call__$ s zTornadoRetrying.__call__)�__name__� __module__�__qualname__r r �typing�Anyr � coroutiner$ � __classcell__r r r r r s �r )r r( �pip._vendor.tenacityr r r r �tornador � TYPE_CHECKINGZtornado.concurrentr �TypeVarr r r r r r �<module> s