o
    Zhg
                     @  s   d dl mZ d dlZd dlmZmZmZ d dlm	Z	 ddl
mZ ddlmZ es*eZdZG d	d
 d
eZe	dedG dd dedZG dd deZe	dedG dd dedZdS )    )annotationsN)TYPE_CHECKINGAnyLiteral)
deprecated   )_config)PydanticDeprecatedSince20)
BaseConfigExtrac                   @  s   e Zd ZdddZdS )	_ConfigMetaclassitemstrreturnr   c              
   C  sP   zt j| }tt jt |W S  ty' } ztd| j d| |d }~ww )Nztype object 'z' has no attribute )	r   Zconfig_defaultswarningswarnDEPRECATION_MESSAGEDeprecationWarningKeyErrorAttributeError__name__selfr   objexc r   Q/var/www/html/lang_env/lib/python3.10/site-packages/pydantic/deprecated/config.py__getattr__   s   
z_ConfigMetaclass.__getattr__Nr   r   r   r   )r   
__module____qualname__r   r   r   r   r   r      s    r   z@BaseConfig is deprecated. Use the `pydantic.ConfigDict` instead.)categoryc                      s0   e Zd ZdZd fddZd fd
dZ  ZS )r
   zThis class is only retained for backwards compatibility.

    !!! Warning "Deprecated"
        BaseConfig is deprecated. Use the [`pydantic.ConfigDict`][pydantic.ConfigDict] instead.
    r   r   r   r   c                   st   zt  |}ttjt |W S  ty9 } zztt	| |W W  Y d }~S  ty4   tt
||w d }~ww )N)super__getattribute__r   r   r   r   r   r   getattrtyper   r   	__class__r   r   r   %   s   zBaseConfig.__getattr__kwargsNonec                   s    t tjt t jdi |S )Nr   )r   r   r   r   r   r"   __init_subclass__)clsr(   r&   r   r   r*   1   s   zBaseConfig.__init_subclass__r   )r(   r   r   r)   )r   r   r    __doc__r   r*   __classcell__r   r   r&   r   r
      s    r
   )	metaclassc                      s   e Zd Zd fddZ  ZS )
_ExtraMeta_ExtraMeta__namer   r   r   c                   s$   |dv rt jdtdd t |S )N>   forbidignoreallowzX`pydantic.config.Extra` is deprecated, use literal values instead (e.g. `extra='allow'`)r   )
stacklevel)r   r   r   r"   r#   )r   r0   r&   r   r   r#   7   s   z_ExtraMeta.__getattribute__)r0   r   r   r   )r   r   r    r#   r-   r   r   r&   r   r/   6   s    r/   zFExtra is deprecated. Use literal values instead (e.g. `extra='allow'`)c                   @  s2   e Zd ZU dZded< dZded< dZded< dS )r   r3   zLiteral['allow']r2   zLiteral['ignore']r1   zLiteral['forbid']N)r   r   r    r3   __annotations__r2   r1   r   r   r   r   r   B   s   
 r   )
__future__r   Z_annotationsr   typingr   r   r   typing_extensionsr   	_internalr   r	   r   __all__r%   r   r
   r/   r   r   r   r   r   <module>   s"    

