+
    i                         ^ RI Ht ^ RIHt ^ RIt^ RIt]! RRR7      t ! R R]P                  4      t]! 4       t	 ! R R	]
4      tR
 R ltR# )    )
ContextVar)OptionalNcurrent_async_library_cvar)defaultc                       ] tR t^tRtRtR# )_ThreadLocalN )__name__
__module____qualname____firstlineno__name__static_attributes__r	       `/Users/igloo/.openclaw/workspace/scratch/fb_ad_env/lib/python3.14/site-packages/sniffio/_impl.pyr   r      s	     Dr   r   c                       ] tR t^tRtR# )AsyncLibraryNotFoundErrorr	   N)r
   r   r   r   r   r	   r   r   r   r      s    r   r   c                $    V ^8  d   QhR\         /# )   return)str)formats   "r   __annotate__r      s     F Fs Fr   c                    \         P                  p V e   V # \        P                  4       p V e   V # R\        P
                  9   d   ^ RIp VP                  p V! 4       e   R#  R\        P
                  9   d   ^ RIHp V! 4       '       d   R# \        R4      h  \         d    TP                  P                  p Lei ; i  \         d     Lii ; i)a  Detect which async library is currently running.

The following libraries are currently supported:

================   ===========  ============================
Library             Requires     Magic string
================   ===========  ============================
**Trio**            Trio v0.6+   ``"trio"``
**Curio**           -            ``"curio"``
**asyncio**                      ``"asyncio"``
**Trio-asyncio**    v0.8.2+     ``"trio"`` or ``"asyncio"``,
                                depending on current mode
================   ===========  ============================

Returns:
  A string like ``"trio"``.

Raises:
  AsyncLibraryNotFoundError: if called from synchronous context,
    or if the current async library was not recognized.

Examples:

    .. code-block:: python3

       from sniffio import current_async_library

       async def generic_sleep(seconds):
           library = current_async_library()
           if library == "trio":
               import trio
               await trio.sleep(seconds)
           elif library == "asyncio":
               import asyncio
               await asyncio.sleep(seconds)
           # ... and so on ...
           else:
               raise RuntimeError(f"Unsupported library {library!r}")

Nasynciocurio)curio_runningz.unknown async library, or not in async context)thread_localr   r   getsysmodulesr   current_taskAttributeErrorTaskRuntimeError
curio.metar   r   )valuer   r"   r   s       r   current_async_libraryr(      s    R E&**,E CKK	5"//L	~)  * #++,??
#8   	5"<<44L	5
  		s$   B 	C  !B=<B= CC)contextvarsr   typingr   r    	threadingr   localr   r   r%   r   r(   r	   r   r   <module>r-      sL    "  
 ' $ 
9??  ~	 	Fr   