
    c?i                    @   S SK Jr  S SKJr  S SKJr  S SKJr  S SKrS SK	r	S SK
Jr  S SKrS SKrS SKJr  S SKJr  S S	KJr   S SKJr  S SKJr  \	R*                  S:H  r\R.                  S:  r\R.                  S:  r\R.                  S:  r\R.                  S:  r " S S\R8                  5      r\(       a  S SKrOS SKr\(       a  S
S.     SS jjr SS.       SS jjr!OS
S.     SS jjr SS.       SS jjr!S S jr" S!     S"S jjr#      S#S jr$g)$    )annotations)ConfigParser)metadata)
EntryPointN)Path)Any)Iterator)SequenceT)inspect_getfullargspec)inspect_formatargspecposix)      )r      )r      )r      c                      \ rS rSrSS jrSrg)	EncodedIO%   c                    g N )selfs    W/var/www/html/livechat/backend/venv/lib/python3.13/site-packages/alembic/util/compat.pycloseEncodedIO.close&   s        r   N)returnNone)__name__
__module____qualname____firstlineno__r   __static_attributes__r   r   r   r   r   %   s    r   r   )top_downc               .    [         R                  " U 5      $ r   )r   walk)pathr%   s     r   	path_walkr)   2   s     yyr   Fwalk_upc                    U R                  XS9$ )Nr*   )relative_to)r(   otherr+   s      r   path_relative_tor/   7   s     77r   c             #  f   #    [         R                  " XS9 H  u  p#n[        U5      X44v   M     g 7f)N)topdown)osr'   r   )r(   r%   rootdirsfiless        r   r)   r)   >   s/      "$!@Dt*d)) "As   /1c                    U R                  U5      $ ! [         a`    U(       aW  [        UR                  5      U/-   nU H(  n U R                  U5      s  s $ ! [         a     M&  f = f   [        U  SU 35      ee f = f)z
Calculate the relative path of 'path' with respect to 'other',
optionally allowing 'path' to be outside the subtree of 'other'.

OK I used AI for this, sorry

z is not in the same subtree as )r-   
ValueErrorlistparents)r(   r.   r+   other_ancestorsancestors        r   r/   r/   D   s    	##E** 	"&u}}"5"? /H!#//99% ! ! !0
 !f;E7C  	s-    /A=AA=
A&"A=%A&&A=c                F    [         R                  " 5       R                  U S9$ )zprovide a facade for metadata.entry_points().

This is no longer a "compat" function as of Python 3.10, however
the function is widely referenced in the test suite and elsewhere so is
still in this module for compatibility reasons.

group)r   entry_pointsselectr=   s    r   importlib_metadata_getrA   _   s!       ")))66r   c                   [        U [        5      (       a  U $ [        U SS5      S:X  a+  [        U 5      R	                  SS5      R	                  SS5      $ [        U [
        5      (       aC  U R                  SU4;   a  [        U R                  5      $ U R                  S-   U R                  -   $ [        U [        R                  5      (       a  [        U 5      R	                  SS5      $ [        U 5      R	                  SS5      $ )	zvendored from python 3.7r!   Ntypingztyping. ~builtins.)

isinstancestrgetattrreprreplacetyper!   r"   rC   TypeVar)
annotationbase_modules     r   formatannotation_fwdrefrQ   j   s     *c""z<.(:J''	26>>sBGG*d##  Z$==
//00$$s*Z-D-DDD	J	/	/J''R00
##C,,r   c                "    U R                  USS9$ )Nlocale)encoding)read)file_configfile_arguments     r   read_config_parserrX   ~   s     MH==r   )r(   r   r%   boolr   z+Iterator[tuple[Path, list[str], list[str]]])r(   r   r.   r   r+   rY   r   r   )r>   rI   r   zSequence[EntryPoint]r   )rO   r   rP   z
Any | Noner   rI   )rV   r   rW   zlist[str | os.PathLike[str]]r   z	list[str])%
__future__r   configparserr   	importlibr   importlib.metadatar   ior2   pathlibr   sysrC   r   r	   r
   sqlalchemy.utilr   sqlalchemy.util.compatr   nameis_posixversion_infopy314py313py312py311TextIOWrapperr   tomllibtomlir)   r/   rA   rQ   rX   r   r   r   <module>rm      s   # %  ) 	 	  
     77gG#G#G#G#   
 	 	 )-!%	4 5:888-18	8 )-**!%*	4* 5:-1	67 04--",--(>>/> >r   