+
    P\i/  c                  s   ^ RI Ht ^ RIHt ^ RIHtHt ^ RIHtH	t	H
t
 ^ RIHt ^ RIHtHtHtHt ]! RRR	7      t]! R
RRR7      t ! R R]]]3,          4      t ! R R]]]3,          4      t ! R R4      t ! R R4      tR# )i    )annotations)abstractmethod)AbstractAsyncContextManagerAbstractContextManager)
isasyncgeniscoroutineisgenerator)TracebackType)ProtocolTypeVarcastfinal_T_coT)	covariant	_ExitT_cozbool | None)r   Zboundc                  s"    ] tR t^tR R ltRtR# )_SupportsCtxMgrc                   V ^8  d   QhRR/# )   returnz(AbstractContextManager[_T_co, _ExitT_co] Zformat   "A/usr/lib/python3.14/site-packages/anyio/_core/_contextmanagers.py__annotate__Z_SupportsCtxMgr.__annotate__   s    QQ$LQ    c                	    R # Nr   self   &r   __contextmanager__Z"_SupportsCtxMgr.__contextmanager__   s    cr   r   N)__name__
__module____qualname____firstlineno__r   __static_attributes__r   r   r   r   r      s    QQr   r   c                  s"    ] tR t^tR R ltRtR# )_SupportsAsyncCtxMgrc               r   )r   r   z-AbstractAsyncContextManager[_T_co, _ExitT_co]r   r   r   r   r   Z!_SupportsAsyncCtxMgr.__annotate__   s     < <	6<r   c                	r   r   r   r   r   r   __asynccontextmanager__Z,_SupportsAsyncCtxMgr.__asynccontextmanager__   s    8;r   r   N)r   r    r!   r"   r%   r#   r   r   r   r$   r$      s    < <r   r$   c                  sl    ] tR t^t$ RtRtR]R&   ]R R l4       t]R R l4       t	]
R	 R
 l4       tRtR# )ContextManagerMixina  
Mixin class providing context manager functionality via a generator-based
implementation.

This class allows you to implement a context manager via :meth:`__contextmanager__`
which should return a generator. The mechanics are meant to mirror those of
:func:`@contextmanager <contextlib.contextmanager>`.

.. note:: Classes using this mix-in are not reentrant as context managers, meaning
    that once you enter it, you can't re-enter before first exiting it.

.. seealso:: :doc:`contextmanagers`
Nz2AbstractContextManager[object, bool | None] | None_ContextManagerMixin__cmc                    V ^8  d   QhRRRR/# )r   r   z#_SupportsCtxMgr[_T_co, bool | None]r   r   r   r   r   r   r    ContextManagerMixin.__annotate__)   s      ;  r   c                	s   \        V \        4      '       g   Q hV P                  e$   \        RV P                  P
                   R24      hV P                  4       p\        V\        4      '       g6   \        V4      '       d   \        R4      h\        RVP                  : 24      hWJ d#   \        V P                  P
                   R24      hVP                  4       pWn        V# )Nthis  has already been enteredz__contextmanager__() returned a generator object instead of a context manager. Did you forget to add the @contextmanager decorator?zB__contextmanager__() did not return a context manager object, but zq.__contextmanager__() returned self. Did you forget to add the @contextmanager decorator and a 'yield' statement?)
isinstancer&   r'   RuntimeError	__class__r!   r   r   r   	TypeError	__enter__r   cmZvalue   &  r   r0   ZContextManagerMixin.__enter__(   s     $ 3444499 3344MN  $$&"4552!  ||&( 
 :>>../ 0% &  	r   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r   r   z"_SupportsCtxMgr[object, _ExitT_co]exc_typetype[BaseException] | Noneexc_valBaseException | Noneexc_tbTracebackType | Noner   r   r   r   r   r   r   r)   K   sA     G G0G,G &G %	G
 
Gr   c                	s    \        V \        4      '       g   Q hV P                  f$   \        RV P                  P
                   R24      hV P                  pV =\        \        VP                  WV4      4      # Nr*   z has not been entered yet)	r,   r&   r'   r-   r.   r!   r
   r   __exit__r   r5   r7   r9   r2      &&&& r   r<   ZContextManagerMixin.__exit__J   so     $ 34444993344MN 
 YYIIr{{8fEFFr   c               r   )r   r   z+AbstractContextManager[object, bool | None]r   r   r   r   r   r)   _   s      $O r   c                    R# )aI  
Implement your context manager logic here.

This method **must** be decorated with
:func:`@contextmanager <contextlib.contextmanager>`.

.. note:: Remember that the ``yield`` will raise any exception raised in the
    enclosed context block, so use a ``finally:`` block to clean up resources!

:return: a context manager object
Nr   r   r   r   r   Z&ContextManagerMixin.__contextmanager__^       r   Z__cm)r   r    r!   r"   __doc__r'   __annotations__r   r0   r<   r   r   r#   r   r   r   r&   r&      sS     @DD
<C
 B G G&  r   r&   c                  sl    ] tR t^mt$ RtRtR]R&   ]R R l4       t]R R l4       t	]
R	 R
 l4       tRtR# )AsyncContextManagerMixina  
Mixin class providing async context manager functionality via a generator-based
implementation.

This class allows you to implement a context manager via
:meth:`__asynccontextmanager__`. The mechanics are meant to mirror those of
:func:`@asynccontextmanager <contextlib.asynccontextmanager>`.

.. note:: Classes using this mix-in are not reentrant as context managers, meaning
    that once you enter it, you can't re-enter before first exiting it.

.. seealso:: :doc:`contextmanagers`
Nz7AbstractAsyncContextManager[object, bool | None] | None_AsyncContextManagerMixin__cmc               r(   )r   r   z(_SupportsAsyncCtxMgr[_T_co, bool | None]r   r   r   r   r   r   r   %AsyncContextManagerMixin.__annotate__   s     & &G &E &r   c                	s<  "   \        V \        4      '       g   Q hV P                  e$   \        RV P                  P
                   R24      hV P                  4       p\        V\        4      '       gb   \        V4      '       d   \        R4      h\        V4      '       d   VP                  4        \        R4      h\        RVP                  : 24      hWJ d#   \        V P                  P
                   R24      hVP                  4       G R j  xL
 pWn        V#  L5i)Nr*   r+   z__asynccontextmanager__() returned an async generator instead of an async context manager. Did you forget to add the @asynccontextmanager decorator?z__asynccontextmanager__() returned a coroutine object instead of an async context manager. Did you forget to add the @asynccontextmanager decorator and a 'yield' statement?zG__asynccontextmanager__() did not return an async context manager, but z{.__asynccontextmanager__() returned self. Did you forget to add the @asynccontextmanager decorator and a 'yield' statement?)r,   rD   rE   r-   r.   r!   r%   r   r   r/   r   Zclose
__aenter__r1   r3   r   rG   Z#AsyncContextManagerMixin.__aenter__~   s     $ 8999999 3344MN  ))+"9::"~~6 
 R
N  ||&( 
 :>>../ 0% &  mmo%	 &s   DDDDc          
     r4   )r   r   z'_SupportsAsyncCtxMgr[object, _ExitT_co]r5   r6   r7   r8   r9   r:   r   r   r   r   r   r   r   rF      sA     N N5N,N &N %	N
 
Nr   c                	s  "   \        V \        4      '       g   Q hV P                  f$   \        RV P                  P
                   R24      hV P                  pV =\        \        VP                  WV4      G R j  xL
 4      #  L5ir;   )	r,   rD   rE   r-   r.   r!   r
   r   	__aexit__r=   r>   r   rH   Z"AsyncContextManagerMixin.__aexit__   sx      $ 89999993344MN 
 YYIIR\\(V%LLMMLs   A7B9B
:	Bc               r   )r   r   z0AbstractAsyncContextManager[object, bool | None]r   r   r   r   r   rF      s      	9r   c                r?   )a`  
Implement your async context manager logic here.

This method **must** be decorated with
:func:`@asynccontextmanager <contextlib.asynccontextmanager>`.

.. note:: Remember that the ``yield`` will raise any exception raised in the
    enclosed context block, so use a ``finally:`` block to clean up resources!

:return: an async context manager object
Nr   r   r   r   r%   Z0AsyncContextManagerMixin.__asynccontextmanager__   r@   r   rA   )r   r    r!   r"   rB   rE   rC   r   rG   rH   r   r%   r#   r   r   r   rD   rD   m   sS     EID
AH
& &P N N$  r   rD   N)Z
__future__r    Zabcr   Z
contextlibr   r   Zinspectr   r   r   Ztypesr   Ztypingr   r	   r
   r   r   r   r   r$   r&   rD   r   r   r   <module>rI      s~    "  J 8 8  1 14(K4}E	Rhui/0 R<8E9$45 <S Sl[ [r   