
    dh                    ^    d Z ddlmZ ddlZddlmZ dZdZ		 dZ
ddZdd	Zdd
ZddZddZy)z@The `version` module holds the version information for Pydantic.    )annotationsN)__version__)VERSIONversion_infoz2.12.1z2.41.3c                 P    dj                  t        j                  d      dd       S )zmReturn the `major.minor` part of Pydantic version.

    It returns '2.1' if Pydantic version is '2.1.1'.
    .N   )joinr   split     C/var/www/zara/venv/lib/python3.12/site-packages/pydantic/version.pyversion_shortr      s#    
 88GMM#&r*++r   c                    ddl } ddl}ddlm} ddlm} ddlm} h d}g }| j                  j                         D ]6  }|j                  d   }||v s|j                  | d|j                          8  |t              j                  d   j                         }	|j                  |	      r!|j!                         r|j#                  |	      nd	}
t$        t&        t)        |d
d      xs |j*                  t,        j                  |j                         dj/                  |      |
d}dj/                  d |j1                         D              S )zFReturn complete version information for Pydantic and its dependencies.r   N)Path   )_git>   email-validatorpydantic-settingspydantic-extra-typesmypyfastapipyrighttyping_extensionsName-unknown
build_info )zpydantic versionzpydantic-core versionzpydantic-core buildzpython versionplatformzrelated packagescommit
c              3  ~   K   | ]5  \  }}d j                  |dz   t        |      j                  dd             7 yw)z	{:>30} {}:r"   r   N)formatstrreplace).0kvs      r   	<genexpr>zversion_info.<locals>.<genexpr>J   s7     ePTPQST[''CQc1JKes   ;=)importlib.metadatar    pathlibr   pydantic_core._pydantic_core_pydantic_core	_internalr   metadatadistributionsappendversion__file__parentsresolveis_git_repohave_gitgit_revisionr   __pydantic_core_version__getattrbuild_profilesysr
   items)	importlibr    r   pdcgitpackage_namesrelated_packagesdistnamepydantic_dirmost_recent_commitinfos               r   r   r   !   s#   .&M ""002 >}}V$= ##tfAdll^$<=>
 >))!,446L*-//,*GCLLN&`i 
 $!:&sL$?T3CTCT++%%'HH%56$D 99eX\XbXbXdeeer   c                     t         t        k(  S )zBCheck that the installed `pydantic-core` dependency is compatible.)r;   !_COMPATIBLE_PYDANTIC_CORE_VERSIONr   r   r   check_pydantic_core_versionrL   M   s    $(IIIr   c                     t               sdd} t        j                  dk\  r2ddlm}  |d      }t        t        |j                  dd       dd      rd} | rt        d	t         d
t         d      y y )NT)      r   )distributionpydanticdir_infoeditableFz%The installed pydantic-core version (zD) is incompatible with the current pydantic version, which requires zZ. If you encounter this error, make sure that you haven't upgraded pydantic-core manually.)
rL   r>   r   r,   rP   r<   originSystemErrorr;   rK   )raise_errorrP   rE   s      r   _ensure_pydantic_core_versionrW   R   s    &(w&7
+Dwt{{J=z5Q#78Q7R SEEfDg hkk   )r   c                v    t        t        t        | j                  d      d   j	                  d                  S )a>  Parse `mypy` string version to a 3-tuple of ints.

    It parses normal version like `1.11.0` and extra info followed by a `+` sign
    like `1.11.0+dev.d6d9d8cd4f27c52edac1f537e236ec48a01e54cb.dirty`.

    Args:
        version: The mypy version string.

    Returns:
        A triple of ints, e.g. `(1, 11, 0)`.
    +r   r   )tuplemapint	partitionr   )r4   s    r   parse_mypy_versionr^   e   s1     S'++C0399#>?@@r   )returnr&   )r_   bool)r_   None)r4   r&   r_   ztuple[int, int, int])__doc__
__future__r   _annotationsr>   pydantic_corer   r;   __all__r   rK   r   r   rL   rW   r^   r   r   r   <module>rg      sE    F 2 
 B
#
 %- !,)fXJ
&Ar   