Ë
    r™ãj™'  ã                  óð  — d dl mZ d dlZd dlZd dlZd dlmZ d dlmZ d dlmZ d dlm	Z	 d dlm
Z
 d dlmZ d d	lmZ d d
lmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlZddlmZ ddlmZ ddlmZ  ede¬«      Z eded¬«      Z ede¬«      Zd(d„Z  G d„ d ee   «      Z! G d!„ d"e	e   ejD                  «      Z# G d#„ d$e#e   «      Z$	 	 	 	 d)d%„Z% G d&„ d'e!e   «      Z&y)*é    )ÚannotationsN)ÚAny)ÚAsyncGenerator)ÚAsyncIterator)Ú	Awaitable)ÚCallable)ÚClassVar)Ú	Coroutine)ÚDict)Ú	Generator)ÚGeneric)ÚLiteral)ÚNoReturn)ÚOptional)Úoverload)ÚTuple)ÚTypeVaré   )Úexcé   )Úutil)ÚSelfÚ_T)ÚboundÚ_T_coT)r   Ú	covariantÚ_PTc              ƒ  óð   K  — t        j                  | «      }d}	 	 t        j                  |«      ƒ d{  –—† }	 |�|‚|S 7 Œ# t         j                  $ r}|j	                  «       r‚ |}Y d}~nd}~ww xY wŒ[­w)ab  Run ``coro`` in a task of its own and wait for it to complete, even
    if the calling task is cancelled meanwhile.

    Used for cleanup, such as the ``close()`` performed by an async context
    manager on exit, that must not be abandoned partway through.  A
    cancellation received while waiting is re-raised once ``coro`` has
    completed, so that the caller does not return before its cleanup has
    finished; were it to return early, the cleanup would carry on in the
    background, where for example it could return a connection into a pool
    that the application has meanwhile disposed of.

    N)ÚasyncioÚcreate_taskÚshieldÚCancelledErrorÚdone)ÚcoroÚtaskÚ	cancelledÚresultÚerrs        úf/var/www/html/python-recuperauto-other/env/lib/python3.12/site-packages/sqlalchemy/ext/asyncio/base.pyÚ_run_to_completionr*   *   s|   è ø€ ô ×Ñ˜tÓ$€DØ€IØ
ð	Ü"Ÿ>™>¨$Ó/×/ˆFð ØÐØˆØ€Mð 0ùÜ×%Ñ%ò 	Ø�y‰yŒ{ØØ�Iûð	úð ùs=   ‚A6œA ´A µA ¹A6Á A ÁA2ÁA-Á(A6Á-A2Á2A6c                  ó
  — e Zd ZU i Zded<   dZedd„«       Zedd„«       Zdd„Ze	 d	 	 	 	 	 dd„«       Z	e	 	 	 	 	 	 dd	„«       Z
ee	 d	 	 	 	 	 	 	 dd
„«       «       Zee	 d	 	 	 	 	 	 	 dd„«       «       Ze	 d	 	 	 	 	 	 	 dd„«       Zy)ÚReversibleProxyzCClassVar[Dict[weakref.ref[Any], weakref.ref[ReversibleProxy[Any]]]]Ú_proxy_objects)Ú__weakref__c                 ó   — y ©N© ©ÚselfÚtargets     r)   Ú_assign_proxiedzReversibleProxy._assign_proxiedM   s   € Ø36ó    c                 ó   — y r0   r1   r2   s     r)   r5   zReversibleProxy._assign_proxiedP   s   € Ø58r6   c                óè   — |�ot        j                  |t        j                  «      }t        j                  | t	        j
                  t        j                  |«      «      }|t        j                  |<   |S r0   )ÚweakrefÚrefr,   Ú_target_gcedÚ	functoolsÚpartialr-   )r3   r4   Ú
target_refÚ	proxy_refs       r)   r5   zReversibleProxy._assign_proxiedS   sb   € ØÐÜ+2¯;©;Øœ×4Ñ4ó,ˆJô  Ÿ™ØÜ×!Ñ!¤/×">Ñ">À
ÓKóˆIð :CŒO×*Ñ*¨:Ñ6àˆr6   Nc                ó<   — | j                   j                  |d «       y r0   )r-   Úpop)Úclsr:   r?   s      r)   r;   zReversibleProxy._target_gced`   s   € ð 	×Ñ×Ñ˜s DÕ)r6   c                ó   — t        «       ‚r0   ©ÚNotImplementedError)rB   r4   Úadditional_kws      r)   Ú_regenerate_proxy_for_targetz,ReversibleProxy._regenerate_proxy_for_targeth   s   € ô "Ó#Ð#r6   c                 ó   — y r0   r1   ©rB   r4   Ú
regeneraterF   s       r)   Ú_retrieve_proxy_for_targetz*ReversibleProxy._retrieve_proxy_for_targetn   s   € ð r6   c                 ó   — y r0   r1   rI   s       r)   rK   z*ReversibleProxy._retrieve_proxy_for_targett   s   € ð r6   c                ó¨   — 	 | j                   t        j                  |«         } |«       }|�|S |r | j                  |fi |¤ŽS y # t        $ r Y Œ!w xY wr0   )r-   r9   r:   ÚKeyErrorrG   )rB   r4   rJ   rF   r?   Úproxys         r)   rK   z*ReversibleProxy._retrieve_proxy_for_targetz   sf   € ð	Ø×*Ñ*¬7¯;©;°vÓ+>Ñ?ˆIñ “KˆEØÐ Ø�áØ3�3×3Ñ3°FÑL¸mÑLÐLàøô ò 	Ùð	ús   ‚"A Á	AÁA)r4   r   Úreturnr   )r4   ÚNonerP   rQ   )r4   úOptional[_PT]rP   rR   r0   )r:   zweakref.ref[_PT]r?   zOptional[weakref.ref[Self]]rP   rQ   )r4   r   rF   r   rP   r   ).)r4   r   rJ   zLiteral[True]rF   r   rP   r   )T)r4   r   rJ   ÚboolrF   r   rP   zOptional[Self])Ú__name__Ú
__module__Ú__qualname__r-   Ú__annotations__Ú	__slots__r   r5   Úclassmethodr;   rG   rK   r1   r6   r)   r,   r,   G   sT  … ð 	ð ð ó ð !€IàÚ6ó Ø6àÚ8ó Ø8óð ð 26ð*àð*ð /ð*ð 
ò	*ó ð*ð ð$Øð$Ø+.ð$à	ò$ó ð$ð
 Øà69ðØðØ&3ðØLOðà	òó ó ðð Øà-1ðØðØ&*ðØDGðà	òó ó ðð à-1ðØðØ&*ðØDGðà	òó ñr6   r,   c                  ó†   — e Zd ZdZej
                  dd	d„«       Zd
d„Zdd„Zej
                  	 	 	 	 	 	 	 	 dd„«       Z	dd„Z
y)ÚStartableContextr1   c              ƒ  ó   K  — t        «       ‚­wr0   rD   )r3   Úis_ctxmanagers     r)   ÚstartzStartableContext.start�   s   è ø€ ä!Ó#Ð#ùs   ‚c                ó>   — | j                  «       j                  «       S r0   )r^   Ú	__await__©r3   s    r)   r`   zStartableContext.__await__”   s   € Ø�z‰z‹|×%Ñ%Ó'Ð'r6   c              ƒ  óB   K  — | j                  d¬«      ƒ d {  –—† S 7 Œ­w)NT)r]   )r^   ra   s    r)   Ú
__aenter__zStartableContext.__aenter__—   s   è ø€ Ø—Z‘Z¨d�ZÓ3×3Ð3Ð3ús   ‚˜™c              ƒ  ó   K  — y ­wr0   r1   )r3   Útype_ÚvalueÚ	tracebacks       r)   Ú	__aexit__zStartableContext.__aexit__š   s   è ø€ ð 	ùs   ‚c                óZ   — t        j                  d| j                  j                  z  «      ‚)Nz@%s context has not been started and object has not been awaited.)Ú	async_excÚAsyncContextNotStartedÚ	__class__rT   ra   s    r)   Ú_raise_for_not_startedz'StartableContext._raise_for_not_started    s*   € Ü×.Ñ.ØNØ�~‰~×&Ñ&ñ(ó
ð 	
r6   N©F©r]   rS   rP   r   )rP   zGenerator[Any, Any, _T_co])rP   r   )re   r   rf   r   rg   r   rP   úOptional[bool])rP   r   )rT   rU   rV   rX   ÚabcÚabstractmethodr^   r`   rc   rh   rm   r1   r6   r)   r[   r[   �   sh   „ Ø€Ià×Ñó$ó ð$ó(ó4ð 	×ÑðØðØ!$ðØ14ðà	òó ðô

r6   r[   c                  óR   — e Zd ZU dZded<   	 	 	 	 	 	 dd„Zd	d
d„Z	 	 	 	 	 	 	 	 dd„Zy)ÚGeneratorStartableContext©ÚgenzAsyncGenerator[_T_co, Any]rv   c                ó   —  ||i |¤Ž| _         y r0   ru   )r3   ÚfuncÚargsÚkwdss       r)   Ú__init__z"GeneratorStartableContext.__init__¬   s   € ñ ˜Ð& Ñ&ˆ�r6   c              ƒ  óÌ   K  — 	 t        | j                  «      ƒ d {  –—† }|s"| j                  j	                  «       ƒ d {  –—†  |S 7 Œ*# t        $ r t        d«      d ‚w xY w7 Œ!­w)Nzgenerator didn't yield)Úanextrv   ÚStopAsyncIterationÚRuntimeErrorÚaclose)r3   r]   Ústart_values      r)   r^   zGeneratorStartableContext.start´   sd   è ø€ ð	CÜ % d§h¡h£×/ˆKñ Ø—(‘(—/‘/Ó#×#Ð#àÐð 0ùÜ!ò 	CÜÐ7Ó8¸dÐBð	Cúð $ús7   ‚A$„A	 œA�A	 ¡A$Á A"ÁA$ÁA	 Á	AÁA$c              ƒ  óÔ  K  — |€)	 t        | j                  «      ƒ d {  –—†  t        d«      ‚|€ |«       }	 | j                  j	                  |«      ƒ d {  –—†  t        d«      ‚7 ŒG# t        $ r Y yw xY w7 Œ # t        $ r}||ucY d }~S d }~wt        $ r8}||u rY d }~yt        |t        t        f«      r|j                  |u rY d }~y‚ d }~wt        $ r}||ur‚ Y d }~yd }~ww xY w­w)Nzgenerator didn't stopFz$generator didn't stop after athrow())	r}   rv   r   r~   ÚathrowÚ
isinstanceÚStopIterationÚ	__cause__ÚBaseException)r3   Útyprf   rg   r   s        r)   rh   z#GeneratorStartableContext.__aexit__Ã   sò   è ø€ ð ˆ;ð<Ü˜DŸH™H“o×%Ð%ô #Ð#:Ó;Ð;àˆ}ñ ›�ð!Ø—h‘h—o‘o eÓ,×,Ð,ôB ÐEÓFÐFðY &ùÜ%ò Ùðúð -ùÜ%ò (ð  %Ð'Õ'ûÜò à˜%‘<Ü ô ˜u¤}Ô6HÐ&IÔJØŸ™¨Ñ.ä ØûÜ ò 	ð ˜eÑ#ØÜûð	üs®   ‚C(†A( žA&ŸA( £C(¸A9 ÁA7ÁA9 ÁC(Á&A( Á(	A4Á1C(Á3A4Á4C(Á7A9 Á9	C%ÂBÂC%ÂC(ÂC%ÂC
ÂC(Â $C
ÃC(Ã	C
Ã
C%ÃC ÃC(Ã C%Ã%C(N)rx   ú#Callable[..., AsyncIterator[_T_co]]ry   zTuple[Any, ...]rz   zDict[str, Any]rn   ro   )rˆ   r   rf   r   rg   r   rP   rp   )rT   rU   rV   rX   rW   r{   r^   rh   r1   r6   r)   rt   rt   §   s]   … Ø€Ià	#Ó#ð'à1ð'ð ð'ð ó	'ôð2GØð2GØ"ð2GØ/2ð2Gà	ô2Gr6   rt   c                óD   ‡ — t        j                  ‰ «      dˆ fd„«       }|S )a=  @asyncstartablecontext decorator.

    the decorated function can be called either as ``async with fn()``, **or**
    ``await fn()``.   This is decidedly different from what
    ``@contextlib.asynccontextmanager`` supports, and the usage pattern
    is different as well.

    Typical usage:

    .. sourcecode:: text

        @asyncstartablecontext
        async def some_async_generator(<arguments>):
            <setup>
            try:
                yield <value>
            except GeneratorExit:
                # return value was awaited, no context manager is present
                # and caller will .close() the resource explicitly
                pass
            else:
                <context manager cleanup>


    Above, ``GeneratorExit`` is caught if the function were used as an
    ``await``.  In this case, it's essential that the cleanup does **not**
    occur, so there should not be a ``finally`` block.

    If ``GeneratorExit`` is not invoked, this means we're in ``__aexit__``
    and we were invoked as a context manager, and cleanup should proceed.


    c                 ó   •— t        ‰| |«      S r0   )rt   )ry   rz   rx   s     €r)   Úhelperz%asyncstartablecontext.<locals>.helper  s   ø€ ä(¨¨t°TÓ:Ð:r6   )ry   r   rz   r   rP   z GeneratorStartableContext[_T_co])r<   Úwraps)rx   rŒ   s   ` r)   ÚasyncstartablecontextrŽ   ø   s(   ø€ ôJ ‡_�_�TÓô;ó ð;ð €Mr6   c                  óN   — e Zd ZdZej
                  dd„«       Zdd„Zd	d„Zd	d„Z	y)
ÚProxyComparabler1   c                ó   — t        «       ‚r0   rD   ra   s    r)   Ú_proxiedzProxyComparable._proxied'  s   € ä!Ó#Ð#r6   c                ó   — t        | «      S r0   )Úidra   s    r)   Ú__hash__zProxyComparable.__hash__+  s   € Ü�$‹xˆr6   c                ód   — t        || j                  «      xr | j                  |j                  k(  S r0   ©r„   rl   r’   ©r3   Úothers     r)   Ú__eq__zProxyComparable.__eq__.  s*   € ä�u˜dŸn™nÓ-ò 0Ø—‘ §¡Ñ/ð	
r6   c                óf   — t        || j                  «       xs | j                  |j                  k7  S r0   r—   r˜   s     r)   Ú__ne__zProxyComparable.__ne__4  s-   € ä˜5 $§.¡.Ó1Ð1ò /Ø�}‰} §¡Ñ.ð	
r6   N)rP   r   )rP   Úint)r™   r   rP   rS   )
rT   rU   rV   rX   r   Úro_non_memoized_propertyr’   r•   rš   rœ   r1   r6   r)   r�   r�   $  s.   „ Ø€Ià	×"Ñ"ò$ó #ð$óó
ô
r6   r�   )r$   zCoroutine[Any, Any, _T]rP   r   )rx   r‰   rP   z/Callable[..., GeneratorStartableContext[_T_co]])'Ú
__future__r   rq   r   r<   Útypingr   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r9   Ú r   rj   r   Úutil.typingr   r   r   r   r*   r,   ÚABCr[   rt   rŽ   r�   r1   r6   r)   ú<module>r¤      sä   ðõ #ã 
Û Û Ý Ý !Ý  Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Ý Û å Ý Ý áˆT˜Ô€Ù�˜s¨dÔ3€ñ ˆe˜3Ô€óô:C�g˜c‘lô CôL
�y Ñ'¨¯©ô 
ô4NGÐ 0°Ñ 7ô NGðb)Ø
-ð)à4ó)ôX
�o cÑ*õ 
r6   