o ƚRea@s|ddlZddlZddlmZddlmZddlmZddlmZddlmZej r/ddl m Z e dZ Gd d d eZdS) N) BaseRetrying) DoAttempt)DoSleep)RetryCallState)gen)Future_RetValTc sVeZdZejfdddejddffdd Zejdd d ejdejdd fd d Z Z S)TornadoRetryingsleepz&typing.Callable[[float], Future[None]]kwargsreturnNc stjdi|||_dS)N)super__init__r )selfr r  __class__r /builddir/build/BUILDROOT/alt-python310-pip-21.3.1-3.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/pip/_vendor/tenacity/tornadoweb.pyr s zTornadoRetrying.__init__fnzhtyping.Callable[..., typing.Union[typing.Generator[typing.Any, typing.Any, _RetValT], Future[_RetValT]]]argsz2typing.Generator[typing.Any, typing.Any, _RetValT]cos|t||||d} |j|d}t|tr:z ||i|V}Wnty3|tYnw| |nt|t rJ| | |Vnt |q)N) retry_objectrrr T) retry_state)beginriter isinstancer BaseException set_exceptionsysexc_info set_resultrprepare_for_next_attemptr rReturn)rrrr rdoresultr r r__call__$s"      zTornadoRetrying.__call__) __name__ __module__ __qualname__rr typingAnyr coroutiner$ __classcell__r r rrr s"r )rr(pip._vendor.tenacityrrrrtornador TYPE_CHECKINGZtornado.concurrentrTypeVarrr r r r rs