o
    —¨Êh  ã                   @  sn  d Z ddlmZ ddlmZ ddlmZ ddlm	Z	m
Z
 ddlmZmZmZ e	r.ddlmZ dZe
d	ed
�Z	d2d3dd„ZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG d d!„ d!eƒZG d"d#„ d#eƒZG d$d%„ d%eƒZG d&d'„ d'eƒZG d(d)„ d)eƒZ G d*d+„ d+eƒZ!G d,d-„ d-e!ƒZ"G d.d/„ d/eƒZ#G d0d1„ d1eƒZ$dS )4zExceptions.é    )Úannotations)Útimeout)ÚTracebackType)ÚTYPE_CHECKINGÚTypeVar)ÚChannelErrorÚConnectionErrorÚResourceError)ÚResponse)ÚreraiseÚ
KombuErrorÚOperationalErrorÚNotBoundErrorÚMessageStateErrorÚTimeoutErrorÚLimitExceededÚConnectionLimitExceededÚChannelLimitExceededr   r   ÚVersionMismatchÚSerializerNotInstalledr	   ÚSerializationErrorÚEncodeErrorÚDecodeErrorÚ	HttpErrorÚInconsistencyErrorÚBaseExceptionType)ÚboundNÚtpútype[BaseExceptionType]ÚvalueÚtbúTracebackType | NoneÚreturnc                 C  s   |j |ur
| |¡‚|‚)zReraise exception.)Ú__traceback__Úwith_traceback)r   r   r    © r%   úB/var/www/html/env/lib/python3.10/site-packages/kombu/exceptions.pyr      s   

r   c                   @  ó   e Zd ZdZdS )r   z)Common subclass for all Kombu exceptions.N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r%   r%   r%   r&   r   &   ó    r   c                   @  r'   )r   z/Recoverable message transport connection error.Nr(   r%   r%   r%   r&   r   *   r-   r   c                   @  r'   )r   z(Failed to serialize/deserialize content.Nr(   r%   r%   r%   r&   r   .   r-   r   c                   @  r'   )r   zCannot encode object.Nr(   r%   r%   r%   r&   r   2   r-   r   c                   @  r'   )r   zCannot decode object.Nr(   r%   r%   r%   r&   r   6   r-   r   c                   @  r'   )r   z:Trying to call channel dependent method on unbound entity.Nr(   r%   r%   r%   r&   r   :   r-   r   c                   @  r'   )r   z*The message has already been acknowledged.Nr(   r%   r%   r%   r&   r   >   r-   r   c                   @  r'   )r   zLimit exceeded.Nr(   r%   r%   r%   r&   r   B   r-   r   c                   @  r'   )r   z4Maximum number of simultaneous connections exceeded.Nr(   r%   r%   r%   r&   r   F   r-   r   c                   @  r'   )r   z1Maximum number of simultaneous channels exceeded.Nr(   r%   r%   r%   r&   r   J   r-   r   c                   @  r'   )r   z$Library dependency version mismatch.Nr(   r%   r%   r%   r&   r   N   r-   r   c                   @  r'   )r   z>Support for the requested serialization type is not installed.Nr(   r%   r%   r%   r&   r   R   r-   r   c                   @  r'   )ÚContentDisallowedz*Consumer does not allow this content-type.Nr(   r%   r%   r%   r&   r.   V   r-   r.   c                   @  r'   )r   z‚Data or environment has been found to be inconsistent.

    Depending on the cause it may be possible to retry the operation.
    Nr(   r%   r%   r%   r&   r   Z   r-   r   c                      s2   e Zd ZdZ		dd‡ fdd„Zddd„Z‡  ZS )r   zHTTP Client Error.NÚcodeÚintÚmessageú
str | NoneÚresponseúResponse | Noner"   ÚNonec                   s&   || _ || _|| _tƒ  |||¡ d S ©N)r/   r1   r3   ÚsuperÚ__init__)Úselfr/   r1   r3   ©Ú	__class__r%   r&   r8   d   s   zHttpError.__init__Ústrc                 C  s
   d  | ¡S )NzHTTP {0.code}: {0.message})Úformat)r9   r%   r%   r&   Ú__str__o   s   
zHttpError.__str__)NN)r/   r0   r1   r2   r3   r4   r"   r5   )r"   r<   )r)   r*   r+   r,   r8   r>   Ú__classcell__r%   r%   r:   r&   r   a   s    ür   r6   )r   r   r   r   r    r!   r"   r   )%r,   Ú
__future__r   Úsocketr   r   Útypesr   Útypingr   r   Úamqpr   r   r	   Úkombu.asynchronous.httpr
   Ú__all__ÚBaseExceptionr   r   Ú	Exceptionr   r   r   r   r   r   r   r   r   r   r   r   r.   r   r   r%   r%   r%   r&   Ú<module>   s6    
ý