File: //lib/python3/dist-packages/botocore/retries/__pycache__/standard.cpython-312.pyc
�
P��eN � � � d Z ddlZddlZddlmZmZmZmZ ddlm Z m
Z
ddlmZm
Z
dZ ej e� Zefd�Z G d� d � Z G d
� d� Z G d� d
� Z G d� d� Z G d� de
� Z G d� de� Z G d� de� Z G d� de� Z G d� de� Z G d� d� Z G d� d� Z G d� de� Z G d � d!e� Z G d"� d#� Z y)$aC Standard retry behavior.
This contains the default standard retry behavior.
It provides consistent behavior with other AWS SDKs.
The key base classes uses for retries:
* ``BaseRetryableChecker`` - Use to check a specific condition that
indicates a retry should happen. This can include things like
max attempts, HTTP status code checks, error code checks etc.
* ``RetryBackoff`` - Use to determine how long we should backoff until
we retry a request. This is the class that will implement delay such
as exponential backoff.
* ``RetryPolicy`` - Main class that determines if a retry should
happen. It can combine data from a various BaseRetryableCheckers
to make a final call as to whether or not a retry should happen.
It then uses a ``BaseRetryBackoff`` to determine how long to delay.
* ``RetryHandler`` - The bridge between botocore's event system
used by endpoint.py to manage retries and the interfaces defined
in this module.
This allows us to define an API that has minimal coupling to the event
based API used by botocore.
� N)�ConnectionError�ConnectTimeoutError�HTTPClientError�ReadTimeoutError)�quota�special)�BaseRetryableChecker�BaseRetryBackoff� c �� � t t j � � }| j j j
}|j
� }| j j j d|� �|j � t t t |�� t � �� t � |�� }d|z }| j j j d|z |j |�� |S )Nzafter-call.)�max_attempts)�
retry_checker�
retry_backoff)�retry_policy�retry_event_adapter�retry_quotazretry-config-%szneeds-retry.%s)� unique_id)�RetryQuotaCheckerr �
RetryQuota�meta�
service_model�
service_id� hyphenize�events�register�release_retry_quota�RetryHandler�RetryPolicy�StandardRetryConditions�ExponentialBackoff�RetryEventAdapter�needs_retry)�clientr
r r �service_event_name�handlerr s �;/usr/lib/python3/dist-packages/botocore/retries/standard.py�register_retry_handlerr'