
    zi                       U d Z ddlmZ ddlZddlZddlZddlZddlmZm	Z	 ddlm
Z
mZ ddlZddlZddlmZ ddlmZmZmZmZmZmZmZmZmZmZ dd	lmZ dd
lmZmZ ddlm Z  ddl!m"Z"m#Z# ddl$m%Z%m&Z&m'Z'm(Z(m)Z) ddlm*Z* ej+        rsddl,m-Z- ddl.m/Z/ ddlm0Z0m1Z1m2Z2 ddlm3Z3m4Z4 ddl5m6Z6m7Z7 ddl8m9Z: ddl;m<Z<m=Z=m>Z> ddl;m?Z@ ejA        ejB        eCe
f         ddf         ZD ejE        dd          ZFdZGdeHd<   ne*ZIdZJejK        ZL G d dejM                  ZNejO        dddePddd d<d2            ZQejO        ddePddd3d=d6            ZQdddddddd7d>d;ZQ eeP          ZRdS )?zLogic for creating models.    )annotationsN)copydeepcopy)AnyClassVarPydanticUndefined   )
_config_decorators_fields_forward_ref	_generics_mock_val_ser_model_construction_repr_typing_extra_utils)getattr_migration)GetCoreSchemaHandlerGetJsonSchemaHandler)
ConfigDict)PydanticUndefinedAnnotationPydanticUserError)DEFAULT_REF_TEMPLATEGenerateJsonSchemaJsonSchemaModeJsonSchemaValuemodel_json_schema)PydanticDeprecatedSince20)	Signature)Path)
CoreSchemaSchemaSerializerSchemaValidator)LiteralUnpack)AbstractSetIntStrMappingIntStrAny)Protocol)ComputedFieldInfo	FieldInfoModelPrivateAttr)FieldModel	BaseModel)boundz<set[int] | set[str] | dict[int, Any] | dict[str, Any] | Noneztyping_extensions.TypeAliasIncEx)r0   create_modelc            
      	    e Zd ZU dZej        rded<   	 ded<   	 ded<   ded	<   d
ed<   ded<   ded<   ded<   ded<   ded<   ded<   ded<   ded<   ded<   ded<    ed          Zd ed!<    ed          Z	d"ed#<    ed          Z
d ed$<   n7i Z ej                    Z ej        d%d&d'(          Z ej        d%d)d'(          Zd*Z e            ZdZdZdd/Zd0e_        edd2            Zedd3            Zedd4            Zeddd<            Zd5dd=ddBZ dCd5d5dddddd0dD	ddQZ!d5d5d5dddddd0dR	ddVZ"ed0e#e$dWfdd\            Z%edd_            Z&ddaZ'edd0dbd5dcddj            Z(ed5d5d5dkddp            Z)ed5d5dqddt            Z*ed5d5dqddu            Z+edd{            Z,edd            Z-edd            Z.ddZ/ddZ0dddZ1ej        sd fdZ2ddZ3ddZ4ddZ5ddZ6ddZ7ddZ8ej        rddZ9ddZ:ddZ;ddZ<e=j>        j?        Z?e=j>        j@        Z@e=j>        jA        ZAe=j>        jB        ZBddZCe eDjE        deF          dd                        ZGe eDjE        deF          dd                        ZH eDjE        deF          d5d5ddddddd            ZI eDjE        deF          d5d5ddddeJeJddd            ZKe eDjE        deF          d d                        ZLe eDjE        deF          d5dd5dddd                        ZMe eDjE        deF          d5dd5dddd                        ZNe eDjE        deF          d dÄ                        ZOe eDjE        deF          dddń                        ZP eDjE        deF          d5d5d5ddǜddʄ            ZQe eDjE        deF          d0e#fdd̄                        ZRe eDjE        deF          d0e#dΜddτ                        ZSe eDjE        deF          ddф                        ZTe eDjE        deF          ddԄ                        ZU eDjE        deF          ddׄ            ZV eDjE        deF          ddل            ZWe eDjE        deF          ddۄ                        ZX eDjE        deF          dd݄            ZY xZZS (	  r0   a}  Usage docs: https://docs.pydantic.dev/2.5/concepts/models/

    A base class for creating Pydantic models.

    Attributes:
        __class_vars__: The names of classvars defined on the model.
        __private_attributes__: Metadata about the private attributes of the model.
        __signature__: The signature for instantiating the model.

        __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
        __pydantic_core_schema__: The pydantic-core schema used to build the SchemaValidator and SchemaSerializer.
        __pydantic_custom_init__: Whether the model has a custom `__init__` function.
        __pydantic_decorators__: Metadata containing the decorators defined on the model.
            This replaces `Model.__validators__` and `Model.__root_validators__` from Pydantic V1.
        __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to
            __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
        __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
        __pydantic_post_init__: The name of the post-init method for the model, if defined.
        __pydantic_root_model__: Whether the model is a `RootModel`.
        __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
        __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.

        __pydantic_extra__: An instance attribute with the values of extra fields from validation when
            `model_config['extra'] == 'allow'`.
        __pydantic_fields_set__: An instance attribute with the names of fields explicitly set.
        __pydantic_private__: Instance attribute with the values of private attributes set on the model instance.
    zClassVar[ConfigDict]model_configzClassVar[dict[str, FieldInfo]]model_fieldszClassVar[set[str]]__class_vars__z%ClassVar[dict[str, ModelPrivateAttr]]__private_attributes__zClassVar[Signature]__signature__zClassVar[bool]__pydantic_complete__zClassVar[CoreSchema]__pydantic_core_schema____pydantic_custom_init__z$ClassVar[_decorators.DecoratorInfos]__pydantic_decorators__z+ClassVar[_generics.PydanticGenericMetadata]__pydantic_generic_metadata__zClassVar[dict[str, Any] | None]__pydantic_parent_namespace__z+ClassVar[None | Literal['model_post_init']]__pydantic_post_init____pydantic_root_model__zClassVar[SchemaSerializer]__pydantic_serializer__zClassVar[SchemaValidator]__pydantic_validator__F)initdict[str, Any] | None__pydantic_extra__set[str]__pydantic_fields_set____pydantic_private__zXPydantic models should inherit from BaseModel, BaseModel cannot be instantiated directly	validatorzbase-model-instantiated)
val_or_sercode
serializer)__dict__rH   rF   rI   datar   returnNonec                B    d}| j                             ||            dS )aj  Create a new model by parsing and validating input data from keyword arguments.

        Raises [`ValidationError`][pydantic_core.ValidationError] if the input data cannot be
        validated to form a valid model.

        `__init__` uses `__pydantic_self__` instead of the more common `self` for the first arg to
        allow `self` as a field name.
        T)self_instanceNrC   validate_python)__pydantic_self__rO   __tracebackhide__s      X/var/www/tmov.alphamb/tmov_inventario/venv/lib/python3.11/site-packages/pydantic/main.py__init__zBaseModel.__init__   s-     !0@@Uf@ggggg    Tdict[str, ComputedFieldInfo]c                R    d | j         j                                        D             S )zGet the computed fields of this model instance.

        Returns:
            A dictionary of computed field names and their corresponding `ComputedFieldInfo` objects.
        c                $    i | ]\  }}||j         S  )info.0kvs      rX   
<dictcomp>z3BaseModel.model_computed_fields.<locals>.<dictcomp>   s     [[[da16[[[rZ   )r=   computed_fieldsitemsselfs    rX   model_computed_fieldszBaseModel.model_computed_fields   s+     \[d&B&R&X&X&Z&Z[[[[rZ   c                    | j         S )zGet extra fields set during validation.

        Returns:
            A dictionary of extra fields, or `None` if `config.extra` is not set to `"allow"`.
        )rF   rg   s    rX   model_extrazBaseModel.model_extra   s     &&rZ   c                    | j         S )zReturns the set of fields that have been explicitly set on this model instance.

        Returns:
            A set of strings representing the fields that have been set,
                i.e. that were not filled from defaults.
        )rH   rg   s    rX   model_fields_setzBaseModel.model_fields_set   s     ++rZ   Nclstype[Model]_fields_setset[str] | Nonevaluesr/   c                b   |                      |           }i }i }| j                                        D ]}\  }}|j        r'|j        |v r|                    |j                  ||<   3||v r|                    |          ||<   P|                                s|                    d          ||<   ~|!t          |                                          }|	                    |           d}| j
                            d          dk    r"i }|                                D ]
\  }	}
|
||	<   n|	                    |           t          |d|           t          |d|           | j        st          |d|           | j        r|                    d           n| j        st          |d	d           |S )
aS  Creates a new instance of the `Model` class with validated data.

        Creates a new model setting `__dict__` and `__pydantic_fields_set__` from trusted or pre-validated data.
        Default values are respected, but no other validation is performed.
        Behaves as if `Config.extra = 'allow'` was set since it adds all passed values

        Args:
            _fields_set: The set of field names accepted for the Model instance.
            values: Trusted or pre-validated data dictionary.

        Returns:
            A new instance of the `Model` class with validated data.
        T)call_default_factoryNextraallowrN   rH   rF   rI   )__new__r6   rf   aliaspopis_requiredget_defaultsetkeysupdater5   get_object_setattrrA   r@   model_post_init)rn   rp   rr   mfields_valuesdefaultsnamefield_extrarb   rc   s              rX   model_constructzBaseModel.model_construct   s    KK(*#%+1133 	N 	NKD%{ Nu{f44&,jj&=&=d##&,jj&6&6d##&&(( N!&!2!2!2!M!Mm002233KX&&&(,((G33F  1q		   (((:}5554kBBB* 	=A3V<<<% 	=d####, 	= A5t<<<rZ   )r~   deeprh   r~   r   boolc                  |r|                                  n|                                 }|r| j                            d          dk    rG|                                D ]1\  }}|| j        v r||j        |<   |j        i |_        ||j        |<   2n|j                            |           |j	                            |
                                           |S )a  Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#model_copy

        Returns a copy of the model.

        Args:
            update: Values to change/add in the new model. Note: the data is not validated
                before creating the new model. You should trust this data.
            deep: Set to `True` to make a deep copy of the model.

        Returns:
            New model instance.
        ru   rv   )__deepcopy____copy__r5   r   rf   r6   rN   rF   r~   rH   r}   )rh   r~   r   copiedrb   rc   s         rX   
model_copyzBaseModel.model_copy   s     )-A""$$$$--// 	A $$W--88"LLNN 9 9DAqD----.**!4<8:F5781!449 &&v...*11&++--@@@rZ   python)	modeincludeexcludeby_aliasexclude_unsetexclude_defaultsexclude_none
round_tripwarningsr   Literal['json', 'python'] | strr   r2   r   r   r   r   r   r   r   dict[str, Any]c       	        J    | j                             | |||||||||	
  
        S )a  Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump

        Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

        Args:
            mode: The mode in which `to_python` should run.
                If mode is 'json', the dictionary will only contain JSON serializable types.
                If mode is 'python', the dictionary may contain any Python objects.
            include: A list of fields to include in the output.
            exclude: A list of fields to exclude from the output.
            by_alias: Whether to use the field's alias in the dictionary key if defined.
            exclude_unset: Whether to exclude fields that have not been explicitly set.
            exclude_defaults: Whether to exclude fields that are set to their default value from the output.
            exclude_none: Whether to exclude fields that have a value of `None` from the output.
            round_trip: Whether to enable serialization and deserialization round-trip support.
            warnings: Whether to log warnings when invalid fields are encountered.

        Returns:
            A dictionary representation of the model.
        )	r   r   r   r   r   r   r   r   r   )rB   	to_python)
rh   r   r   r   r   r   r   r   r   r   s
             rX   
model_dumpzBaseModel.model_dump  sC    B +55'-%! 6 
 
 	
rZ   	indentr   r   r   r   r   r   r   r   r   
int | Nonestrc       	        n    | j                             | |||||||||	
  
                                        S )aI  Usage docs: https://docs.pydantic.dev/2.5/concepts/serialization/#modelmodel_dump_json

        Generates a JSON representation of the model using Pydantic's `to_json` method.

        Args:
            indent: Indentation to use in the JSON output. If None is passed, the output will be compact.
            include: Field(s) to include in the JSON output. Can take either a string or set of strings.
            exclude: Field(s) to exclude from the JSON output. Can take either a string or set of strings.
            by_alias: Whether to serialize using field aliases.
            exclude_unset: Whether to exclude fields that have not been explicitly set.
            exclude_defaults: Whether to exclude fields that have the default value.
            exclude_none: Whether to exclude fields that have a value of `None`.
            round_trip: Whether to use serialization/deserialization between JSON and class instance.
            warnings: Whether to show any warnings that occurred during serialization.

        Returns:
            A JSON string representation of the model.
        r   )rB   to_jsondecode)
rh   r   r   r   r   r   r   r   r   r   s
             rX   model_dump_jsonzBaseModel.model_dump_jsonA  sM    > +33'-%! 4 
 
 &((	rZ   
validationref_templateschema_generatortype[GenerateJsonSchema]r   c                *    t          | ||||          S )a  Generates a JSON schema for a model class.

        Args:
            by_alias: Whether to use attribute aliases or not.
            ref_template: The reference template.
            schema_generator: To override the logic used to generate the JSON schema, as a subclass of
                `GenerateJsonSchema` with your desired modifications
            mode: The mode in which to generate the schema.

        Returns:
            The JSON schema for the given model class.
        )r   r   r   r   )r   )rn   r   r   r   r   s        rX   r   zBaseModel.model_json_schemam  s(    ( !(P`gk
 
 
 	
rZ   paramstuple[type[Any], ...]c                    t          | t          j                  st          d          d |D             }d                    |          }| j         d| dS )a}  Compute the class name for parametrizations of generic classes.

        This method can be overridden to achieve a custom naming scheme for generic BaseModels.

        Args:
            params: Tuple of types of the class. Given a generic class
                `Model` with 2 type variables and a concrete model `Model[str, int]`,
                the value `(str, int)` would be passed to `params`.

        Returns:
            String representing the new class where `params` are passed to `cls` as type variables.

        Raises:
            TypeError: Raised when trying to generate concrete names for non-generic models.
        z;Concrete names should only be generated for generic models.c                d    g | ]-}t          |t                    r|nt          j        |          .S r^   )
isinstancer   r   display_as_typera   params     rX   
<listcomp>z5BaseModel.model_parametrized_name.<locals>.<listcomp>  s8    mmm]b
5# 6 6XuuE<QRW<X<XmmmrZ   , [])
issubclasstypingGeneric	TypeErrorjoin__name__)rn   r   param_namesparams_components       rX   model_parametrized_namez!BaseModel.model_parametrized_name  sk    " #v~.. 	[YZZZ
 nmflmmm99[11,44!14444rZ   _BaseModel__contextc                    dS )zOverride this method to perform additional initialization after `__init__` and `model_construct`.
        This is useful if you want to do some validation that requires the entire model to be initialized.
        Nr^   )rh   r   s     rX   r   zBaseModel.model_post_init  s	     	rZ      )forceraise_errors_parent_namespace_depth_types_namespacer   r   r   intr   bool | Nonec                  |s	| j         rdS d| j        v rt          | d           ||                                }n|dk    rRt	          j        |          pi }t          j        | j                  pi }i ||}t          j	        |          | _        nt          j        | j                  }t	          j
        | |          }i | j        ddi}t          j        | | j        t          j        |d          ||          S )	a1  Try to rebuild the pydantic-core schema for the model.

        This may be necessary when one of the annotations is a ForwardRef which could not be resolved during
        the initial attempt to build the schema, and automatic rebuilding fails.

        Args:
            force: Whether to force the rebuilding of the model schema, defaults to `False`.
            raise_errors: Whether to raise errors, defaults to `True`.
            _parent_namespace_depth: The depth level of the parent namespace, defaults to 2.
            _types_namespace: The types namespace, defaults to `None`.

        Returns:
            Returns `None` if the schema is already "complete" and rebuilding was not required.
            If rebuilding _was_ required, returns `True` if rebuilding was successful, otherwise `False`.
        Nr;   r   )parent_depthdefer_buildF)check)r   types_namespace)r:   rN   delattrr   r   parent_frame_namespacer   unpack_lenient_weakvaluedictr?   build_lenient_weakvaluedictget_cls_types_namespacer5   complete_model_classr   r   ConfigWrapper)	rn   r   r   r   r   r   frame_parent_nscls_parent_nsconfigs	            rX   model_rebuildzBaseModel.model_rebuild  s=   0  	2 	4)S\997888+9I9N9N9P9P*Q..&3&JXo&p&p&p&vtvO+HIjkkqoq " 'K&J/&JO8K8ghw8x8xC55&9&V9' 'O #0"G_"]"] @(?-??F&;%fE:::) /   rZ   strictfrom_attributescontextobjr   r   r   c               B    d}| j                             ||||          S )a  Validate a pydantic model instance.

        Args:
            obj: The object to validate.
            strict: Whether to raise an exception on invalid fields.
            from_attributes: Whether to extract data from object attributes.
            context: Additional context to pass to the validator.

        Raises:
            ValidationError: If the object could not be validated.

        Returns:
            The validated model instance.
        Tr   rT   )rn   r   r   r   r   rW   s         rX   model_validatezBaseModel.model_validate  s3    0 !)99 : 
 
 	
rZ   r   r   	json_datastr | bytes | bytearrayc               @    d}| j                             |||          S )a  Usage docs: https://docs.pydantic.dev/2.5/concepts/json/#json-parsing

        Validate the given JSON data against the Pydantic model.

        Args:
            json_data: The JSON data to validate.
            strict: Whether to enforce types strictly.
            context: Extra variables to pass to the validator.

        Returns:
            The validated Pydantic model.

        Raises:
            ValueError: If `json_data` is not a JSON string.
        Tr   )rC   validate_json)rn   r   r   r   rW   s        rX   model_validate_jsonzBaseModel.model_validate_json  s)    0 !)77	&Za7bbbrZ   c               @    d}| j                             |||          S )aR  Validate the given object contains string data against the Pydantic model.

        Args:
            obj: The object contains string data to validate.
            strict: Whether to enforce types strictly.
            context: Extra variables to pass to the validator.

        Returns:
            The validated Pydantic model.
        Tr   )rC   validate_strings)rn   r   r   r   rW   s        rX   model_validate_stringsz BaseModel.model_validate_strings  s)    & !)::3vW^:___rZ   _BaseModel__sourcetype[BaseModel]_BaseModel__handlerr   r#   c                R    d| j         v r| j        d         s| j        S  ||          S )a  Hook into generating the model's CoreSchema.

        Args:
            __source: The class we are generating a schema for.
                This will generally be the same as the `cls` argument if this is a classmethod.
            __handler: Call into Pydantic's internal JSON schema generation.
                A callable that calls into Pydantic's internal CoreSchema generation logic.

        Returns:
            A `pydantic-core` `CoreSchema`.
        r;   origin)rN   r>   r;   )rn   r   r   s      rX   __get_pydantic_core_schema__z&BaseModel.__get_pydantic_core_schema__,  s<     &55 4X> 433y"""rZ   _BaseModel__core_schemar   r   c                     ||          S )ac  Hook into generating the model's JSON schema.

        Args:
            __core_schema: A `pydantic-core` CoreSchema.
                You can ignore this argument and call the handler with a new CoreSchema,
                wrap this CoreSchema (`{'type': 'nullable', 'schema': current_schema}`),
                or just call the handler with the original schema.
            __handler: Call into Pydantic's internal JSON schema generation.
                This will raise a `pydantic.errors.PydanticInvalidForJsonSchema` if JSON schema
                generation fails.
                Since this gets called by `BaseModel.model_json_schema` you can override the
                `schema_generator` argument to that function to change JSON schema generation globally
                for a type.

        Returns:
            A JSON schema, as a Python object.
        r^   )rn   r   r   s      rX   __get_pydantic_json_schema__z&BaseModel.__get_pydantic_json_schema__D  s    . y'''rZ   kwargsc                    dS )a  This is intended to behave just like `__init_subclass__`, but is called by `ModelMetaclass`
        only after the class is actually fully initialized. In particular, attributes like `model_fields` will
        be present when this is called.

        This is necessary because `__init_subclass__` will always be called by `type.__new__`,
        and it would require a prohibitively large refactor to the `ModelMetaclass` to ensure that
        `type.__new__` was called in such a manner that the class would already be sufficiently initialized.

        This will receive the same `kwargs` that would be passed to the standard `__init_subclass__`, namely,
        any kwargs passed to the class definition that aren't used internally by pydantic.

        Args:
            **kwargs: Any keyword arguments passed to the class definition that aren't used internally
                by pydantic.
        Nr^   rn   r   s     rX   __pydantic_init_subclass__z$BaseModel.__pydantic_init_subclass__]  s	    " 	rZ   typevar_values!type[Any] | tuple[type[Any], ...]3type[BaseModel] | _forward_ref.PydanticRecursiveRefc                  
 t          j        | |          }||S | t          u rt          d          t	          | d          st          |  d          | j        d         s%t          j        | j        vrt          |  d          t          |t                    s|f}t          j        | |           t          t          | j        d         |                    
t          j        
                                
                                          r
r| }t          j        | ||           nI| j        d         }|s|}nt          
fd|D                       }| j        d         p| }|                    |          }t          d	 t          j        
                                          D                       }t          j        ||          5 }	|	|	cd d d            S t          j        | |||          }||cd d d            S 	 |                    d
           n# t0          $ r Y nw xY wt          j        ||||          }t          j        | ||||           d d d            n# 1 swxY w Y   |S )NzAType parameters should be placed on typing.Generic, not BaseModel__parameters__zG cannot be parametrized because it does not inherit from typing.Generic
parametersz is not a generic classargsc              3  B   K   | ]}t          j        |          V  d S N)r   replace_types)ra   argtypevars_maps     rX   	<genexpr>z.BaseModel.__class_getitem__.<locals>.<genexpr>  s0      __CY4S,GG______rZ   r   c                    i | ]}|d S r   r^   r   s     rX   rd   z/BaseModel.__class_getitem__.<locals>.<dictcomp>  s    ccccccrZ      )r   )r   get_cached_generic_type_earlyr0   r   hasattrr>   r   r   	__bases__r   tuplecheck_parameters_countdictzipr   all_identicalr}   rr   set_cached_generic_typer   iter_contained_typevarsgeneric_recursion_self_typeget_cached_generic_type_later   r   create_generic_submodel)rn   r   cachedsubmodelparent_argsr   r   
model_namer   maybe_self_typer  s             @rX   __class_getitem__zBaseModel.__class_getitem__p  si    8nMMM)_```s,-- 	mskkklll0> 	=6>Y\YfCfCfs;;;<<<.%00 	/,.N(n=== DH1,?PPD
 D
  1 1 3 3\5H5H5J5JKK %	_P\ %	_H-c>8LLLL;FCK `%____S^_____6x@GCF77==Jcc)*KLL_L_LaLa*b*bccc F 6vtDD _".*_ _ _ _ _ _ _ _ #?^U[]abb%!_ _ _ _ _ _ _ _(((CCCC2    D	 %<ZQUW]^^ 1#~xQWY]^^^+_ _ _ _ _ _ _ _ _ _ _ _ _ _ _. s<   I/%I/H$#I/$
H1.I/0H112I//I36I3c                   t          |           }|                    |          }t          |dt          | j                             t          |dt          | j                             t          |dt          | j                             | j        t          |dd           n2t          |dd | j                                        D                        |S )z$Returns a shallow copy of the model.rN   rF   rH   NrI   c                ,    i | ]\  }}|t           u||S r^   r   r`   s      rX   rd   z&BaseModel.__copy__.<locals>.<dictcomp>  s)    bbb$!QqPaGaGaAGaGaGarZ   )	typerw   r   r   rN   rF   rH   rI   rf   )rh   rn   r   s      rX   r   zBaseModel.__copy__  s    4jjKK:tDM':':;;;/d6M1N1NOOO4d4;W6X6XYYY$,A5t<<<<&bb$";"A"A"C"Cbbb   rZ   memodict[int, Any] | Nonec           	        t          |           }|                    |          }t          |dt          | j        |                     t          |dt          | j        |                     t          |dt          | j                             | j        t          |dd           nAt          |dt          d | j        	                                D             |                     |S )z!Returns a deep copy of the model.rN   )r  rF   rH   NrI   c                ,    i | ]\  }}|t           u||S r^   r   r`   s      rX   rd   z*BaseModel.__deepcopy__.<locals>.<dictcomp>  s*    kkk41aPQYjPjPj!QPjPjPjrZ   )
r  rw   r   r   rN   rF   r   rH   rI   rf   )rh   r  rn   r   s       rX   r   zBaseModel.__deepcopy__  s    4jjKK:xD'I'I'IJJJ/$:QX\1]1]1]^^^ 	4d4;W6X6XYYY$,A5t<<<<&kk4+D+J+J+L+Lkkkrvwww   rZ   itemc                   t                               | d          }||v r||         }t          |d          r#|                    | t	          |                     S 	 | j        |         S # t          $ r,}t          t	          |           j        d|          |d }~ww xY w	 t                               | d          }n# t          $ r d }Y nw xY w|B	 ||         S # t          $ r,}t          t	          |           j        d|          |d }~ww xY wt          | j	        |          r!t                                          |          S t          t	          |           j        d|          )Nr8   __get__ object has no attribute rF   )object__getattribute__r  r"  r  rI   KeyErrorAttributeErrorr   	__class__super)rh   r   private_attributes	attributeexcpydantic_extrar(  s         rX   __getattr__zBaseModel.__getattr__  s   !'!8!8?W!X!X))).t4	9i00 ?$,,T4::>>>o4T:: o o o(DJJ,?)d)d\`)d)deeknno
*%+%<%<TCW%X%XNN% * * *%)NNN* "-s-d33# s s s,T

0C-h-h`d-h-hiiorrs t~t44 j$ww77=== -T

0C-h-h`d-h-hiiisB   A* *
B 4'BB $C   CCC 
D''DDr   valuec           
     `   || j         v r/t          |d| j        j         d| j        j         d| d          t	          j        |          sb| j        	|| j        vrt          | ||           n>| j        |         }t          |d          r|
                    | |           n
|| j        |<   d S |                     ||           t          | j        |d           }t          |t                    r|
                    | |           d S | j                            dd           r| j                            | ||           d S | j                            d          dk    r)|| j        vr t)          d	| j        j         d
| d	          | j                            d          dk    rd|| j        vr[| j        r|| j        v r|| j        |<   d S 	 t          | |           t          | ||           d S # t          $ r || j        |<   Y d S w xY w|| j        |<   | j                            |           d S )Nz is a ClassVar of `zR` and cannot be set on an instance. If you want to set a value on the class, use `.z
 = value`.__set__validate_assignmentru   rv   "z" object has no field ")r7   r'  r(  r   r   is_valid_field_namerI   r8   r   r  r2  _check_frozengetattrr   propertyr5   r   rC   r3  r6   
ValueErrorrk   rF   rN   rH   add)rh   r   r/  r+  attrs        rX   __setattr__zBaseModel.__setattr__  s   4&&&  l ldn.E l lAEAXl l[_l l l   ,T22 		(0D@[4[4[dE2222 7=	9i00 <%%dE22226;D-d3F4'''t~tT22dH%% 	3LLu%%%%%""#8$?? 	3';;D$NNNNN""7++w664tGX;X;XX!8XXQUXXXYYY""7++w664tGX;X;X 
7DD,<$<$<05'---7D$''' $D$66666 & : : :49D+D1111: #(DM$(,,T22222s   G/ /HHc                T   || j         v rx| j         |         }t          |d          r|                    |            d S 	 | j        |= d S # t          $ r,}t          t          |           j        d|          |d }~ww xY w|                     |d            || j	        v rt                              | |           d S | j        || j        v r
| j        |= d S 	 t                              | |           d S # t
          $ r' t          t          |           j        d|          w xY w)N
__delete__r#  )r8   r  r>  rI   r&  r'  r  r   r6  r6   r$  __delattr__rF   )rh   r   r+  r,  s       rX   r?  zBaseModel.__delattr__&  sz   4...3D9Iy,// $$T***k-d3 k k k$T

(;%`%`X\%`%`aagjjk 	4&&&4$$$tT*****$0TT=T5T5T'---b""4.....! b b b$T

(;%`%`X\%`%`aaabs#   A	 	
A?'A::A?C6 61D'c                    | j                             dd           rd}n.t          | j                            |          dd          rd}nd S ||f|d}t          j                            | j        j        |g          )Nfrozenfrozen_instanceFfrozen_fieldr  locinput)	r5   r   r7  r6   pydantic_coreValidationErrorfrom_exception_datar(  r   )rh   r   r/  typerrors        rX   r6  zBaseModel._check_frozen@  s      400 	#CCT&**400(EBB 	 CCF71
 1

 +??@WZ_Y`aaarZ   dict[Any, Any]c                |    | j         }|rd |                                D             }| j        | j        | j        |dS )Nc                ,    i | ]\  }}|t           u||S r^   r   r`   s      rX   rd   z*BaseModel.__getstate__.<locals>.<dictcomp>Q  s)    VVV11DU;U;Uq!;U;U;UrZ   )rN   rF   rH   rI   )rI   rf   rN   rF   rH   )rh   privates     rX   __getstate__zBaseModel.__getstate__N  sQ    + 	WVVVVVG"&"9'+'C$+	
 
 	
rZ   statec                    t          | d|d                    t          | d|d                    t          | d|d                    t          | d|d                    d S )NrH   rF   rI   rN   )r   )rh   rQ  s     rX   __setstate__zBaseModel.__setstate__Y  sj    7?X9YZZZ2E:N4OPPP4e<R6STTTj%
*;<<<<<rZ   otherc                    t          |t                    r^| j        d         p| j        }|j        d         p|j        }||k    o/| j        |j        k    o| j        |j        k    o| j        |j        k    S t          S )Nr   )r   r0   r>   r(  rN   rI   rF   NotImplemented)rh   rT  	self_type
other_types       rX   __eq__zBaseModel.__eq___  s    eY'' 	" :8DVI<XFY%/J Z' HMU^3H-1KKH +u/GG	 "!rZ   Unpack[ConfigDict]c                    dS )a  This signature is included purely to help type-checkers check arguments to class declaration, which
            provides a way to conveniently set model_config key/value pairs.

            ```py
            from pydantic import BaseModel

            class MyModel(BaseModel, extra='allow'):
                ...
            ```

            However, this may be deceiving, since the _actual_ calls to `__init_subclass__` will not receive any
            of the config arguments, and will only receive any keyword arguments passed during class initialization
            that are _not_ expected keys in ConfigDict. (This is due to the way `ModelMetaclass.__new__` works.)

            Args:
                **kwargs: Keyword arguments passed to the class definition, which set model_config

            Note:
                You may want to override `__pydantic_init_subclass__` instead, which behaves similarly but is called
                *after* the class is fully initialized.
            Nr^   r   s     rX   __init_subclass__zBaseModel.__init_subclass__u  s      rZ   TupleGeneratorc              #     K   d | j                                         D             E d{V  | j        }|r|                                E d{V  dS dS )zSo `dict(model)` works.c                F    g | ]\  }}|                     d           ||fS )_)
startswithr`   s      rX   r   z&BaseModel.__iter__.<locals>.<listcomp>  s2    XXXv1allSVFWFWXQFXXXrZ   N)rN   rf   rF   )rh   ru   s     rX   __iter__zBaseModel.__iter__  sz      XX)<)<)>)>XXXXXXXXXX' 	%{{}}$$$$$$$$$	% 	%rZ   c                \    |                                   d|                     d           dS )N(r   ))__repr_name____repr_str__rg   s    rX   __repr__zBaseModel.__repr__  s3    $$&&CC):):4)@)@CCCCrZ   _repr.ReprArgsc              #     K    j                                         D ].\  }} j                            |          }|r|j        r||fV  /	 t
                               d          }n# t          $ r d }Y nw xY w|$d |                                D             E d {V   fd j                                        D             E d {V  d S )NrF   c              3  $   K   | ]\  }}||fV  d S r   r^   r`   s      rX   r  z*BaseModel.__repr_args__.<locals>.<genexpr>  s*      BB41aABBBBBBrZ   c              3  P   K   | ] \  }}|j         |t          |          fV  !d S r   )reprr7  )ra   rb   rc   rh   s      rX   r  z*BaseModel.__repr_args__.<locals>.<genexpr>  s?      ccda\]\bcQa(()ccccccrZ   )	rN   rf   r6   r   rm  r$  r%  r'  ri   )rh   rb   rc   r   r-  s   `    rX   __repr_args__zBaseModel.__repr_args__  s     M'')) 	 	DAq%))!,,E  d


	"#44T;OPPNN 	" 	" 	"!NNN	" %BB>+?+?+A+ABBBBBBBBBBccccd6P6V6V6X6Xccccccccccccs   A) )A87A8c                ,    |                      d          S )N )rg  rg   s    rX   __str__zBaseModel.__str__  s      %%%rZ   EThe `__fields__` attribute is deprecated, use `model_fields` instead.)categorydict[str, FieldInfo]c                D    t          j        dt                     | j        S )Nrr  )r   warnDeprecationWarningr6   rg   s    rX   
__fields__zBaseModel.__fields__  s!    
 	]_qrrr  rZ   MThe `__fields_set__` attribute is deprecated, use `model_fields_set` instead.c                D    t          j        dt                     | j        S )Nry  )r   rv  rw  rH   rg   s    rX   __fields_set__zBaseModel.__fields_set__  s)     	[]o	
 	
 	
 ++rZ   :The `dict` method is deprecated; use `model_dump` instead.r   r   r   r   r   r   typing.Dict[str, Any]c               l    t          j        dt                     |                     ||||||          S )Nr|  r}  )r   rv  rw  r   )rh   r   r   r   r   r   r   s          rX   r  zBaseModel.dict  sE     	RTfggg'-%  
 
 	
rZ   ?The `json` method is deprecated; use `model_dump_json` instead.)r   r   r   r   r   r   encodermodels_as_dictr  "typing.Callable[[Any], Any] | Noner  dumps_kwargsc                   t          j        dt                     |t          urt	          d          |t          urt	          d          |	rt	          d          |                     ||||||          S )Nr  zMThe `encoder` argument is no longer supported; use field serializers instead.zUThe `models_as_dict` argument is no longer supported; use a model serializer instead.z9`dumps_kwargs` keyword arguments are no longer supported.r}  )r   rv  rw  r	   r   r   )
rh   r   r   r   r   r   r   r  r  r  s
             rX   jsonzBaseModel.json  s      	WYklll+++klll!222sttt 	YWXXX##'-% $ 
 
 	
rZ   CThe `parse_obj` method is deprecated; use `model_validate` instead.c                `    t          j        dt                     |                     |          S )Nr  r   rv  rw  r   rn   r   s     rX   	parse_objzBaseModel.parse_obj  s,    
 	[]oppp!!#&&&rZ   The `parse_raw` method is deprecated; if your data is JSON use `model_validate_json`, otherwise load the data then use `model_validate` instead.utf8)content_typeencodingprotoallow_picklebstr | bytesr  
str | Noner  r  DeprecatedParseProtocol | Noner  c               
   t          j        dt                     ddlm} 	 |                    |||||          }n# t          t          f$ r}dd l}	t          |t                    rd}
n2t          ||	j                  rd}
nt          |t                    rd}
nd	}
t          j        |
t          |                    d
|d}t          j                            | j        |g          d }~ww xY w|                     |          S )Nr  r
   parser  r  r  r  r   zvalue_error.unicodedecodezvalue_error.jsondecodevalue_error
type_error)__root__rD  )r   rv  rw  
deprecatedr  load_str_bytesr9  r   r  r   UnicodeDecodeErrorJSONDecodeErrorrG  PydanticCustomErrorr   rH  rI  r   r   )rn   r  r  r  r  r  r  r   r,  r  type_strrK  s               rX   	parse_rawzBaseModel.parse_raw  sP    	I	
 	
 	

 	&%%%%%	[&&)!) '  CC I& 	[ 	[ 	[KKK #122 (6C!566 (3C,, (('
 &9(CHHMM$	5 5E  /CCCLSXRYZZZ)	[* !!#&&&s   = C-BC((C-zThe `parse_file` method is deprecated; load the data from file, then if your data is JSON use `model_validate_json`, otherwise `model_validate` instead.path
str | Pathc                   t          j        dt                     ddlm} |                    |||||          }|                     |          S )NzThe `parse_file` method is deprecated; load the data from file, then if your data is JSON use `model_validate_json` otherwise `model_validate` instead.r
   r  r  )r   rv  rw  r  r  	load_filer  )rn   r  r  r  r  r  r  r   s           rX   
parse_filezBaseModel.parse_file:  sp     	L	
 	
 	

 	&%%%%%oo%%  
 
 }}S!!!rZ   zqThe `from_orm` method is deprecated; set `model_config['from_attributes']=True` and use `model_validate` instead.c                    t          j        dt                     | j                            dd           st          dd           |                     |          S )NzqThe `from_orm` method is deprecated; set `model_config["from_attributes"]=True` and use `model_validate` instead.r   zHYou must set the config attribute `from_attributes=True` to use from_ormrL   )r   rv  rw  r5   r   r   r   r  s     rX   from_ormzBaseModel.from_ormY  sq     	0	
 	
 	

 ##$5t<< 	#Zae    !!#&&&rZ   DThe `construct` method is deprecated; use `model_construct` instead.c                T    t          j        dt                      | j        dd|i|S )Nr  rp   r^   )r   rv  rw  r   )rn   rp   rr   s      rX   	constructzBaseModel.constructk  s6    
 	\^pqqq"s"EE{EfEEErZ   z8The copy method is deprecated; use `model_copy` instead.)r   r   r~   r   +AbstractSetIntStr | MappingIntStrAny | Nonetyping.Dict[str, Any] | Nonec          
        t          j        dt                     ddlm} t          |                    | dd||d          fi |pi }| j        d}n#d | j                                        D             }| j	        d}n|| j	        
                                }t          | j	                  D ]}	|	|vr|                    |	           t          |          D ]#}	|	| j	        v r|                    |	          ||	<   $|r| j        |                                z  }
nt          | j                  }
|r|
t          |          z  }
|                    | ||
|||          S )	a  Returns a copy of the model.

        !!! warning "Deprecated"
            This method is now deprecated; use `model_copy` instead.

        If you need `include` or `exclude`, use:

        ```py
        data = self.model_dump(include=include, exclude=exclude, round_trip=True)
        data = {**data, **(update or {})}
        copied = self.model_validate(data)
        ```

        Args:
            include: Optional set or mapping
                specifying which fields to include in the copied model.
            exclude: Optional set or mapping
                specifying which fields to exclude in the copied model.
            update: Optional dictionary of field-value pairs to override field values
                in the copied model.
            deep: If True, the values of fields that are Pydantic models will be deep copied.

        Returns:
            A copy of the model with included, excluded and updated fields as specified.
        zThe `copy` method is deprecated; use `model_copy` instead. See the docstring of `BaseModel.copy` for details about how to handle `include` and `exclude`.r
   copy_internalsF)to_dictr   r   r   r   Nc                ,    i | ]\  }}|t           u||S r^   r   r`   s      rX   rd   z"BaseModel.copy.<locals>.<dictcomp>  s)    hhh1QVgMgMgq!MgMgMgrZ   )r   )r   rv  rw  r  r  r  _iterrI   rf   rF   r   listry   rH   r}   r|   _copy_and_set_values)rh   r   r   r~   r   r  rr   rO  ru   rb   
fields_sets              rX   r   zBaseModel.copys  s   H 	m	
 	
 	

 	/.....  eeWgej !  
 
 |	
 
 $,GGhh(A(G(G(I(IhhhG"*+/EE+0022E$122 ! !F??IIaLLL&\\ - -///%zz!}}E!H  	;5EJJT9::J  	'#g,,&J224UT[bf2gggrZ   CThe `schema` method is deprecated; use `model_json_schema` instead.c                d    t          j        dt                     |                     ||          S )Nr  r   r   )r   rv  rw  r   )rn   r   r   s      rX   schemazBaseModel.schema  s1     	[]oppp$$h\$RRRrZ   WThe `schema_json` method is deprecated; use `model_json_schema` and json.dumps instead.r  c                   dd l }t          j        dt                     ddlm}  |j        |                     ||          fd|i|S )Nr   r  r
   )pydantic_encoderr  default)r  r   rv  rw  deprecated.jsonr  dumpsr   )rn   r   r   r  r  r  s         rX   schema_jsonzBaseModel.schema_json  s~     	e	
 	
 	
 	655555tz!!8,!OO
 
$
 
 
 	
rZ   BThe `validate` method is deprecated; use `model_validate` instead.c                `    t          j        dt                     |                     |          S )Nr  r  )rn   r/  s     rX   validatezBaseModel.validate  s,    
 	Z\nooo!!%(((rZ   LThe `update_forward_refs` method is deprecated; use `model_rebuild` instead.localnsc                    t          j        dt                     |rt          d          |                     d           d S )Nr  z,`localns` arguments are not longer accepted.T)r   )r   rv  rw  r   r   )rn   r  s     rX   update_forward_refszBaseModel.update_forward_refs  sU     	Z\n	
 	
 	
  	LJKKK%%%%%rZ   HThe private method `_iter` will be removed and should no longer be used.r   c                d    t          j        dt                     ddlm}  |j        | g|R i |S )Nr  r
   r  )r   rv  rw  r  r  r  rh   r   r   r  s       rX   r  zBaseModel._iter  sM     	`btuuu......#~#D:4:::6:::rZ   zWThe private method `_copy_and_set_values` will be removed and should no longer be used.c                d    t          j        dt                     ddlm}  |j        | g|R i |S )NzXThe private method  `_copy_and_set_values` will be removed and should no longer be used.r
   r  )r   rv  rw  r  r  r  r  s       rX   r  zBaseModel._copy_and_set_values  sU    
 	f	
 	
 	
 	/.....2~24I$III&IIIrZ   zMThe private method `_get_value` will be removed and should no longer be used.c                d    t          j        dt                     ddlm}  |j        | g|R i |S )NzNThe private method  `_get_value` will be removed and should no longer be used.r
   r  )r   rv  rw  r  r  
_get_value)rn   r   r   r  s       rX   r  zBaseModel._get_value  sU     	\^p	
 	
 	
 	/.....(~(>t>>>v>>>rZ   RThe private method `_calculate_keys` will be removed and should no longer be used.c                d    t          j        dt                     ddlm}  |j        | g|R i |S )Nr  r
   r  )r   rv  rw  r  r  _calculate_keysr  s       rX   r  zBaseModel._calculate_keys  sU    
 	`bt	
 	
 	
 	/.....-~-dDTDDDVDDDrZ   )rO   r   rP   rQ   )rP   r[   )rP   rE   )rP   rG   r   )rn   ro   rp   rq   rr   r   rP   r/   )rh   r/   r~   rE   r   r   rP   r/   )r   r   r   r2   r   r2   r   r   r   r   r   r   r   r   r   r   r   r   rP   r   )r   r   r   r2   r   r2   r   r   r   r   r   r   r   r   r   r   r   r   rP   r   )
r   r   r   r   r   r   r   r   rP   r   )r   r   rP   r   )r   r   rP   rQ   )
r   r   r   r   r   r   r   rE   rP   r   )rn   ro   r   r   r   r   r   r   r   rE   rP   r/   )
rn   ro   r   r   r   r   r   rE   rP   r/   )
rn   ro   r   r   r   r   r   rE   rP   r/   )r   r   r   r   rP   r#   )r   r#   r   r   rP   r   )r   r   rP   rQ   )r   r   rP   r   )rh   r/   rP   r/   )rh   r/   r  r  rP   r/   )r   r   rP   r   )r   r   r/  r   rP   rQ   )rP   rL  )rQ  rL  rP   rQ   )rT  r   rP   r   )r   rZ  )rP   r]  )rP   r   )rP   ri  )rP   rt  )r   r2   r   r2   r   r   r   r   r   r   r   r   rP   r~  )r   r2   r   r2   r   r   r   r   r   r   r   r   r  r  r  r   r  r   rP   r   )rn   ro   r   r   rP   r/   )rn   ro   r  r  r  r  r  r   r  r  r  r   rP   r/   )rn   ro   r  r  r  r  r  r   r  r  r  r   rP   r/   )rh   r/   r   r  r   r  r~   r  r   r   rP   r/   )r   r   r   r   rP   r~  )r   r   r   r   r  r   rP   r   )rn   ro   r/  r   rP   r/   )r  r   rP   rQ   )r   r   r   r   rP   r   )[r   
__module____qualname____doc__r   TYPE_CHECKING__annotations___FieldrF   rH   rI   r6   r   DecoratorInfosr=   r   
MockValSerrC   rB   	__slots__r   r5   r:   rA   rY   __pydantic_base_init__r8  ri   rk   rm   classmethodr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r   r   r.  r<  r?  r6  rP  rS  rY  r\  rb  rh  rn  r   Representationrf  rg  
__pretty____rich_repr__rq  typing_extensionsr  r    rx  r{  r  r	   r  r  r  r  r  r  r   r  r  r  r  r  r  r  r  __classcell__)r(  s   @rX   r0   r0   <   s         8  8
 	+***	 	5444	 	+***EEEE****----66660000EEEERRRRFFFFKKKK////;;;;9999
 5;F4F4F4FFFFF,2F,>,>,>>>>>6<f%6H6H6HHHHHH "<+"<">">!9!9f"*"
 "
 "

 #;-":f#*#
 #
 #
 dI:<<L!#h h h h '+H#\ \ \ X\ ' ' ' X' , , , X, / / / / [/b DHV[      > 19#!&" ,
 ,
 ,
 ,
 ,
 ,
b "#!&" * * * * * *X  05G+
 
 
 
 [
. 5 5 5 [54     !'(265 5 5 5 5 [5n 
 #'+)-
 
 
 
 
 [
8 
 #)-c c c c c [c4 
 #)-` ` ` ` ` [`* # # # [#. ( ( ( [(0    [$> > > >@   &    *  !j	j 	j 	j 	j 	j 	j@)3 )3 )3 )3Vb b b b4b b b b	
 	
 	
 	
= = = =" " " ""  
	 	 	 	.% % % %D D D Dd d d d( (6M'4L%0J(6M& & & & !!OZs  ! ! !  X! !!W*  , , ,	  X
, "!DOh   #!&"
 
 
 
 
 
( "!ITm   #!&"6G0
 
 
 
 
 
: !!MXq  ' ' '  [' !!	E*   $(04"-' -' -' -' -'  [-'^ !!	I*   $(04"" " " " "  ["2 !!	S*  

' 
' 
'  [
' !!NYr  F F F F  [F "!BMf   @D?C/3Hh Hh Hh Hh Hh HhT !!MXq   #8LS S S S  [S !!a*  
 "&;O
 
 
 
 
	  [

" !!LWp  ) ) )  [) !!V*  & & &	  [
& "!R]v  ; ; ; ; "!a*  J J J	 J !!W*  ? ? ?	  [
? "!\*  E E E	 E E E E ErZ   )	metaclass)
__config__r  __base__r  __validators____cls_kwargs____model_namer   r  ConfigDict | Noner  r  r  rQ   r  r  dict[str, classmethod] | Noner  rE   field_definitionsr   rP   r   c                   d S r   r^   r  r  r  r  r  r  r  r  s           rX   r3   r3   (  	     CrZ   )r  r  r  r  r  %type[Model] | tuple[type[Model], ...]ro   c                   d S r   r^   r  s           rX   r3   r3   7  r  rZ   )r  r  r  r  r  r  r  ,type[Model] | tuple[type[Model], ...] | Noner  tuple[str, ...] | Nonec               *   |t          j        dt                     |,|t          dd          t	          |t
                    s|f}n+t          j        t          j        d         t                    f}|pi }i }	i }
|
                                D ]\  }}t          j        |          st          j        d| dt                     t	          |t
                    r@t          j        d	|          }	 |\  }}n(# t          $ r}t          d
d          |d}~ww xY wd|}}|r||
|<   ||	|<   |!t          j        d          }|j        d         }|
|d}|r|                    d|i           |r|                    |           |                    |	           |rt%          j        |          j        |d<   t+          j        |          }t+          j        | ||          \  }}}||ur||d<   |                    |            || ||fd|d|S )a+  Dynamically creates and returns a new Pydantic model, in other words, `create_model` dynamically creates a
    subclass of [`BaseModel`][pydantic.BaseModel].

    Args:
        __model_name: The name of the newly created model.
        __config__: The configuration of the new model.
        __doc__: The docstring of the new model.
        __base__: The base class for the new model.
        __module__: The name of the module that the model belongs to,
            if `None` the value is taken from `sys._getframe(1)`
        __validators__: A dictionary of methods that validate fields.
        __cls_kwargs__: A dictionary of keyword arguments for class creation.
        __slots__: Deprecated. Should not be passed to `create_model`.
        **field_definitions: Attributes of the new model. They should be passed in the format:
            `<name>=(<type>, <default value>)` or `<name>=(<type>, <FieldInfo>)`.

    Returns:
        The new [model][pydantic.BaseModel].

    Raises:
        PydanticUserError: If `__base__` and `__config__` are both passed.
    Nz.__slots__ should not be passed to create_modelzFto avoid confusion `__config__` and `__base__` cannot be used togetherzcreate-model-config-baser  r/   z3fields may not start with an underscore, ignoring "r4  ztuple[str, Any]z4Field definitions should be a `(<type>, <default>)`.zcreate-model-field-definitionsr
   r   )r  r  r  r5   )kwds__orig_bases__F)#__pydantic_reset_parent_namespace___create_model_module)r   rv  RuntimeWarningr   r   r	  r   castTyper0   rf   r   r5  r9  sys	_getframe	f_globalsr~   r   r   config_dicttypesresolve_basesprepare_class)r  r  r  r  r  r  r  r  r  fieldsr   f_namef_deff_annotationf_valueef	namespaceresolved_basesmetansr  s                         rX   r3   r3   F  s   D FWWW!#X/    (E** 	# {HKG 4i@@B#)rNFK*0022 ! !*622 	kMYPVYYY[ijjjeU## 
	0K 1599E(-%gg   'J9    %)%'L 	/".K vM![,
4?z Z ZI /)W-... )(((V R$+$9*$E$E$Q	.!(22N(~N[[[ND"dX%%'R4 -2'    s   4C::
DDD)r  r   r  r  r  r  r  rQ   r  r   r  r  r  rE   r  r   rP   r   )r  r   r  r  r  r  r  r  r  r   r  r  r  rE   r  r   rP   ro   )r  r   r  r  r  r  r  r  r  r  r  r  r  rE   r  r  r  r   rP   ro   )Sr  
__future__r   _annotationsr  r  r   r   r   r   r   r   rG  r  r	   	_internalr   r   r   r   r   r   r   r   r   r   
_migrationr   annotated_handlersr   r   r   r   errorsr   r   json_schemar   r   r   r   r   r    r  inspectr!   pathlibr"   r#   r$   r%   r&   r'   _internal._utilsr(   r)   deprecated.parser*   DeprecatedParseProtocolr  r+   r,   r-   r.   r  	GeneratorTupler   r]  TypeVarr/   r2   r  rw  __all__object_setattrr   ModelMetaclassr0   overloadr   r3   r.  r^   rZ   rX   <module>r"     s         2 2 2 2 2 2 



                                    + + + + + +                        * ) ) ) ) ) J J J J J J J J       B B B B B B B B u u u u u u u u u u u u u u / / / / / /	 3!!!!!!KKKKKKKKKK11111111EEEEEEEEEEEEEEFFFFFFFFFF''''''%fl38&<dD&HINFN7+666E)gEggggg 3
%%4iE iE iE iE iE-< iE iE iE iEX'  %)48,0       %)48,0     " %)=A!48,0(,b b b b b bJ  ))rZ   