
    ZThj                         d dl Z d dlZ G d de      Z G d de      Zd ZdZ G d d	e      Z	d
ej                  j                  j                  fdZy)    Nc                   4     e Zd ZU dZeed<   def fdZ xZS )	SiftErrorz
    These exceptions are raised when something totally unexpected occurs and is
    meant to indicate that the error is likely not caused by the user, but rather,
    the library itself. These errors should be reported to Sift.
    msgc                 *    t         |   | d       y )Nz
Please notify Sift.)super__init__)selfr   	__class__s     R/home/www/backend.miabetepe.com/venv/lib/python3.12/site-packages/sift_py/error.pyr   zSiftError.__init__   s    C5 567    )__name__
__module____qualname____doc__str__annotations__r   __classcell__)r
   s   @r   r   r      s      
H8C 8 8r   r   c                       e Zd ZdZy)SiftAPIDeprecationWarningzY
    Warning used for deprecated API features that may be removed in future updates.
    Nr   r   r   r    r   r   r   r      s     r   r   c                  8    t        j                  dt               y )Nz`component` field of Channel has been deprecated and will be removed in 1.0.0. See docs for more details: https://docs.siftstack.com/docs/glossary#component)warningswarnr   r   r   r   _component_deprecation_warningr      s    MM	X!r   i  @ c                       e Zd ZdZy)ProtobufMaxSizeExceededErrorzg
    The library limits the size of certain protobufs to prevent gRPC messages from being too big.
    Nr   r   r   r   r   r   '   s    r   r   pbc                     t        | j                               }t        | d| j                  j                        }|t
        kD  rt        | d|       y )Nnamez too large: )lenSerializeToStringgetattrr
   r   GRPC_MAX_MESSAGE_SIZEr   )r   sizer    s      r   raise_if_too_larger&   -   sQ    r##%&D2vr||445D##*dV<v+FGG $r   )r   google.protobuf.messagegoogle	Exceptionr   FutureWarningr   r   r$   r   protobufmessageMessager&   r   r   r   <module>r.      sZ     
8	 
8  " 9 H6??22:: Hr   