
    Ih                       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
      Z	 d+	 	 	 	 	 	 	 d,dZ G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d d e      Z G d! d"e      Z  G d# d$e      Z! G d% d&e!      Z" G d' d(e      Z# G d) d*e      Z$y)-z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)boundNc                D    |j                   |ur|j                  |      |)zReraise exception.)__traceback__with_traceback)tpvaluetbs      I/var/www/html/planif/env/lib/python3.12/site-packages/kombu/exceptions.pyr   r      s(     "$""2&&
K    c                      e Zd ZdZy)r   z)Common subclass for all Kombu exceptions.N__name__
__module____qualname____doc__ r%   r$   r   r   &   s    3r%   r   c                      e Zd ZdZy)r   z/Recoverable message transport connection error.Nr'   r,   r%   r$   r   r   *   s    9r%   r   c                      e Zd ZdZy)r   z(Failed to serialize/deserialize content.Nr'   r,   r%   r$   r   r   .   s    2r%   r   c                      e Zd ZdZy)r   zCannot encode object.Nr'   r,   r%   r$   r   r   2       r%   r   c                      e Zd ZdZy)r   zCannot decode object.Nr'   r,   r%   r$   r   r   6   r0   r%   r   c                      e Zd ZdZy)r   z:Trying to call channel dependent method on unbound entity.Nr'   r,   r%   r$   r   r   :   s    Dr%   r   c                      e Zd ZdZy)r   z*The message has already been acknowledged.Nr'   r,   r%   r$   r   r   >       4r%   r   c                      e Zd ZdZy)r   zLimit exceeded.Nr'   r,   r%   r$   r   r   B   s    r%   r   c                      e Zd ZdZy)r   z4Maximum number of simultaneous connections exceeded.Nr'   r,   r%   r$   r   r   F   s    >r%   r   c                      e Zd ZdZy)r   z1Maximum number of simultaneous channels exceeded.Nr'   r,   r%   r$   r   r   J   s    ;r%   r   c                      e Zd ZdZy)r   z$Library dependency version mismatch.Nr'   r,   r%   r$   r   r   N   s    .r%   r   c                      e Zd ZdZy)r   z>Support for the requested serialization type is not installed.Nr'   r,   r%   r$   r   r   R   s    Hr%   r   c                      e Zd ZdZy)ContentDisallowedz*Consumer does not allow this content-type.Nr'   r,   r%   r$   r;   r;   V   r4   r%   r;   c                      e Zd ZdZy)r   zData 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   s    r%   r   c                  @     e Zd ZdZ	 	 d	 	 	 	 	 	 	 d fdZddZ xZS )r   zHTTP Client Error.c                R    || _         || _        || _        t        |   |||       y N)codemessageresponsesuper__init__)selfr@   rA   rB   	__class__s       r$   rD   zHttpError.__init__d   s+     	 w1r%   c                $    dj                  |       S )NzHTTP {0.code}: {0.message})format)rE   s    r$   __str__zHttpError.__str__o   s    +22488r%   )NN)r@   intrA   z
str | NonerB   zResponse | NonereturnNone)rK   str)r(   r)   r*   r+   rD   rI   __classcell__)rF   s   @r$   r   r   a   s>    
 #$(		2	2 	2 "		2
 
	29r%   r   r?   )r!   ztype[BaseExceptionType]r"   r   r#   zTracebackType | NonerK   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$   <module>rX      s     " *  ) = =0 /}E   $ 	 	4 4:z :3 3 $   $  EJ E5
 5J ?m ?<= </j /IZ I5. 5 9	 9r%   