U
    =æ{f	  ã                   @  sd   d Z ddlmZ ddlmZ 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dS )zPydantic-specific warnings.é    )Úannotationsé   )Úversion_short)ÚPydanticDeprecatedSince20ÚPydanticDeprecationWarningc                      s\   e Zd ZU dZded< ded< ded< ddœdd	dd
ddœ‡ fdd„Zddœdd„Z‡  ZS )r   a  A Pydantic specific deprecation warning.

    This warning is raised when using deprecated functionality in Pydantic. It provides information on when the
    deprecation was introduced and the expected version in which the corresponding functionality will be removed.

    Attributes:
        message: Description of the warning.
        since: Pydantic version in what the deprecation was introduced.
        expected_removal: Pydantic version in what the corresponding functionality expected to be removed.
    ÚstrÚmessageztuple[int, int]ÚsinceÚexpected_removalN)r
   Úobjectztuple[int, int] | NoneÚNone)r   Úargsr	   r
   Úreturnc                  sF   t ƒ j|f|žŽ  | d¡| _|| _|d k	r0|n|d d df| _d S )NÚ.r   r   )ÚsuperÚ__init__Úrstripr   r	   r
   )Úselfr   r	   r
   r   ©Ú	__class__© úP/var/www/html/Darija-Ai-API/env/lib/python3.8/site-packages/pydantic/warnings.pyr      s    z#PydanticDeprecationWarning.__init__)r   c              
   C  s\   | j › d| jd › d| jd › d| jd › d| jd › d
}| jdkrX|dtƒ › d7 }|S )	Nz. Deprecated in Pydantic Vr   r   r   z to be removed in V©é   r   z@ See Pydantic V2 Migration Guide at https://errors.pydantic.dev/z/migration/)r   r	   r
   r   )r   r   r   r   r   Ú__str__!   s
    :ÿ
z"PydanticDeprecationWarning.__str__)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú__annotations__r   r   Ú__classcell__r   r   r   r   r   	   s   
ÿr   c                      s*   e Zd ZdZddddœ‡ fdd„Z‡  ZS )r   zfA specific `PydanticDeprecationWarning` subclass defining functionality deprecated since Pydantic 2.0.r   r   r   ©r   r   r   c                   s   t ƒ j|f|ždddœŽ d S ©Nr   )é   r   )r	   r
   ©r   r   ©r   r   r   r   r   r   r   .   s    z"PydanticDeprecatedSince20.__init__©r   r   r   r   r   r    r   r   r   r   r   +   s   r   c                      s*   e Zd ZdZddddœ‡ fdd„Z‡  ZS )ÚPydanticDeprecatedSince26zfA specific `PydanticDeprecationWarning` subclass defining functionality deprecated since Pydantic 2.6.r   r   r   r!   c                   s   t ƒ j|f|ždddœŽ d S r"   r$   r%   r   r   r   r   5   s    z"PydanticDeprecatedSince26.__init__r&   r   r   r   r   r'   2   s   r'   c                   @  s   e Zd ZdS )ÚGenericBeforeBaseModelWarningN)r   r   r   r   r   r   r   r(   9   s   r(   N)r   Ú
__future__r   Z_annotationsÚversionr   Ú__all__ÚDeprecationWarningr   r   r'   ÚWarningr(   r   r   r   r   Ú<module>   s   "