o
    3h                     @  s   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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d S )!zPydantic-specific warnings.    )annotations   )version_short)PydanticDeprecatedSince20PydanticDeprecatedSince26PydanticDeprecatedSince29PydanticDeprecatedSince210PydanticDeprecatedSince211PydanticDeprecatedSince212PydanticDeprecationWarningPydanticExperimentalWarningArbitraryTypeWarning UnsupportedFieldAttributeWarningTypedDictExtraConfigWarningc                      sL   e Zd ZU dZded< ded< ded< ddd fddZ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messagetuple[int, int]sinceexpected_removalN)r   argsobjecttuple[int, int] | NonereturnNonec                  sN   t  j|g|R   |d| _|| _|d ur|| _d S |d d df| _d S )N.r   r   )super__init__rstripr   r   r   )selfr   r   r   r   	__class__ L/var/www/html/chatgem/venv/lib/python3.10/site-packages/pydantic/warnings.pyr   &   s   (z#PydanticDeprecationWarning.__init__c              
   C  s\   | j  d| jd  d| jd  d| jd  d| jd  d
}| jdkr,|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__)
r   r   r   r   r   r   r   r   r   r   )r   r   )__name__
__module____qualname____doc____annotations__r   r%   __classcell__r!   r!   r   r"   r      s   
 r   c                      "   e Zd ZdZ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                       t  j|g|R ddd d S )Nr#      r   r   r   r   r   r   r   r   r   r!   r"   r   ;       z"PydanticDeprecatedSince20.__init__r   r   r   r   r   r   r&   r'   r(   r)   r   r+   r!   r!   r   r"   r   8       r   c                      r,   )r   zfA specific `PydanticDeprecationWarning` subclass defining functionality deprecated since Pydantic 2.6.r   r   r   r   r   r   c                   r-   )N)r$      r.   r0   r1   r2   r   r!   r"   r   B   r3   z"PydanticDeprecatedSince26.__init__r4   r5   r!   r!   r   r"   r   ?   r6   r   c                      r,   )r   zfA specific `PydanticDeprecationWarning` subclass defining functionality deprecated since Pydantic 2.9.r   r   r   r   r   r   c                   r-   )N)r$   	   r.   r0   r1   r2   r   r!   r"   r   I   r3   z"PydanticDeprecatedSince29.__init__r4   r5   r!   r!   r   r"   r   F   r6   r   c                      r,   )r   zgA specific `PydanticDeprecationWarning` subclass defining functionality deprecated since Pydantic 2.10.r   r   r   r   r   r   c                   r-   )N)r$   
   r.   r0   r1   r2   r   r!   r"   r   P   r3   z#PydanticDeprecatedSince210.__init__r4   r5   r!   r!   r   r"   r   M   r6   r   c                      r,   )r	   zgA specific `PydanticDeprecationWarning` subclass defining functionality deprecated since Pydantic 2.11.r   r   r   r   r   r   c                   r-   )N)r$      r.   r0   r1   r2   r   r!   r"   r   W   r3   z#PydanticDeprecatedSince211.__init__r4   r5   r!   r!   r   r"   r	   T   r6   r	   c                      r,   )r
   zgA specific `PydanticDeprecationWarning` subclass defining functionality deprecated since Pydantic 2.12.r   r   r   r   r   r   c                   r-   )N)r$      r.   r0   r1   r2   r   r!   r"   r   ^   r3   z#PydanticDeprecatedSince212.__init__r4   r5   r!   r!   r   r"   r
   [   r6   r
   c                   @  s   e Zd ZdS )GenericBeforeBaseModelWarningN)r&   r'   r(   r!   r!   r!   r"   r<   b   s    r<   c                   @     e Zd ZdZdS )r   zA Pydantic specific experimental functionality warning.

    It is raised to warn users that the functionality may change or be removed in future versions of Pydantic.
    Nr&   r'   r(   r)   r!   r!   r!   r"   r   f       r   c                   @  r=   )CoreSchemaGenerationWarningz/A warning raised during core schema generation.Nr>   r!   r!   r!   r"   r@   m   r?   r@   c                   @  r=   )r   zUA warning raised when Pydantic fails to generate a core schema for an arbitrary type.Nr>   r!   r!   r!   r"   r   q   r?   r   c                   @  r=   )r   zVA warning raised when a `Field()` attribute isn't supported in the context it is used.Nr>   r!   r!   r!   r"   r   u   r?   r   c                   @  r=   )r   zA warning raised when the [`extra`][pydantic.ConfigDict.extra] configuration is incompatible with the `closed` or `extra_items` specification.Nr>   r!   r!   r!   r"   r   y   r?   r   N)r)   
__future__r   _annotationsversionr   __all__DeprecationWarningr   r   r   r   r   r	   r
   Warningr<   r   UserWarningr@   r   r   r   r!   r!   r!   r"   <module>   s"    "