관리-도구
편집 파일: __init__.cpython-38.pyc
U ʗReQG � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZm Z d dl mZ d dlm Z ddlmZ ddlmZ ddlmZ dd lmZ dd lmZ ddlmZ ddlmZ dd lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddlm!Z! ddlm"Z" ddlm#Z# ddlm$Z$ ddlm%Z% ddl&m'Z' ddl&m(Z( ddl&m)Z) ddl&m*Z* ddl&m+Z+ dd l&m,Z, dd!l&m-Z- dd"l&m.Z. dd"l&m.Z/ dd#l0m1Z1 dd$l0m2Z2 dd%l3m4Z4 dd&l3m5Z5 dd'l6m7Z7 dd(l6m8Z8 dZ9ej:�r4d dl;Z;dd)l&m<Z< dd*lm=Z= ej>d+ej?d,�Z@e�>d-�ZAejBe@e@d.�d/d0��ZejBejCejCej?e@ge@f d1�d2d0��ZejCejCejDe@ej?e@ge@f f d1�d3d0�ZG d4d5� d5eE�ZFeG� ZHG d6d7� d7�ZIG d8d9� d9eJ�ZKG d:d;� d;�ZLG d<d=� d=eL�ZMeG� ZNejDejCeGf ejCejCd>�d?d@�ZOG dAdB� dBeE�ZPG dCdD� dD�ZQG dEdF� dFe�ZRG dGdH� dHeR�ZSG dIdJ� dJejT�ZTG dKdL� dL�ZUd dMlVmWZW e9�r�d dNlXmYZY dS )O� N)�ABC�abstractmethod)�futures)�iscoroutinefunction� )� retry_base)� retry_all)�retry_always)� retry_any)�retry_if_exception)�retry_if_exception_type)�retry_if_not_exception_type)�retry_if_not_result)�retry_if_result)�retry_never)�retry_unless_exception_type)�retry_if_exception_message)�retry_if_not_exception_message��sleep)�sleep_using_event)�stop_after_attempt)�stop_after_delay)�stop_all)�stop_any)� stop_never)�stop_when_event_set)� wait_chain)�wait_combine)�wait_exponential)� wait_fixed)�wait_incrementing)� wait_none)�wait_random)�wait_random_exponential)� before_log)�before_nothing)� after_log)� after_nothing)�before_sleep_log)�before_sleep_nothing)� wait_base)� stop_base� WrappedFn)�bound�_RetValT)�fn�returnc C s d S �N� )r0 r3 r3 ��/builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_vendor/tenacity/__init__.py�retrya s r5 )�dargs�dkwr1 c O s d S r2 r3 �r6 r7 r3 r3 r4 r5 f s c sD t � �dkr&t� d �r&t� � d �S ttd�� �fdd�}|S dS )z�Wrap a function with a new `Retrying` object. :param dargs: positional arguments passed to Retrying object :param dkw: keyword arguments passed to the Retrying object r r ��fr1 c sz t | t�r*t�d| jj� d| jj� d�� t| �r>t� ��}n2trft tj d�rftj �| �rft� ��}n t � ��}|�| �S )NzGot retry_base instance (zQ) as callable argument, this will probably hang indefinitely (did you mean retry=z(...)?)�is_coroutine_function)� isinstancer �warnings�warn� __class__�__name__r � AsyncRetrying�tornado�hasattr�genr; �TornadoRetrying�Retrying�wraps)r: �rr8 r3 r4 �wrapv s � zretry.<locals>.wrapN)�len�callabler5 r- )r6 r7 rI r3 r8 r4 r5 k s c @ s e Zd ZdZdS )�TryAgainz/Always retry the executed function when raised.N)r@ � __module__�__qualname__�__doc__r3 r3 r3 r4 rL � s rL c @ s e Zd ZdS )� DoAttemptN�r@ rM rN r3 r3 r3 r4 rP � s rP c @ s e Zd ZdS )�DoSleepNrQ r3 r3 r3 r4 rR � s rR c @ sR e Zd ZU dZdZeje ed<