
    /Jf                         d Z ddlZddlmZ ddlmZ  ej        e          Z G d de          Z	 G d de          Z
dS )	zSpecial cased retries.

These are additional retry cases we still have to handle from the legacy
retry handler.  They don't make sense as part of the standard mode retry
module.  Ideally we should be able to remove this module.

    N)crc32)BaseRetryableCheckerc                       e Zd ZdZd ZdS )RetryIDPCommunicationErrorstsc                 r    |j         j        j        }|| j        k    rdS |                                }|dk    S )NFIDPCommunicationError)operation_modelservice_modelservice_name_SERVICE_NAMEget_error_code)selfcontextr   
error_codes       [/home/alex/cs2snipeproduction/venv/lib/python3.11/site-packages/botocore/retries/special.pyis_retryablez'RetryIDPCommunicationError.is_retryable   s@    .<I4---5++--
444    N)__name__
__module____qualname__r   r    r   r   r   r      s(        M5 5 5 5 5r   r   c                       e Zd ZdZdZd ZdS )RetryDDBChecksumErrorzx-amz-crc32dynamodbc                 >   |j         j        j        }|| j        k    rdS |j        dS |j        j                            | j                  }|dS t          |j        j	                  dz  }|t          |          k    rt                              d||           dS d S )NFl    z@DynamoDB crc32 checksum does not match, expected: %s, actual: %sT)r
   r   r   r   http_responseheadersget_CHECKSUM_HEADERr   contentintloggerdebug)r   r   r   checksumactual_crc32s        r   r   z"RetryDDBChecksumError.is_retryable!   s    .<I4---5 (5(044T5JKK5W2:;;jH3x==((LL+	   4 )(r   N)r   r   r   r    r   r   r   r   r   r   r      s.        $M    r   r   )__doc__loggingbinasciir   botocore.retries.baser   	getLoggerr   r#   r   r   r   r   r   <module>r,      s            6 6 6 6 6 6		8	$	$
5 5 5 5 5!5 5 5 5    0     r   