ó
    §ZÇh  ã                   ó–   • S SK Jr  S SKJr  S SKrS SKr\" SSS9r " S S\R                  5      r\" 5       r	 " S S	\
5      rS
\4S jrg)é    )Ú
ContextVar)ÚOptionalNÚcurrent_async_library_cvar)Údefaultc                   ó   • \ rS rSrSrSrg)Ú_ThreadLocalé   N© )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__ÚnameÚ__static_attributes__r
   ó    ÚJ/home/mande/repo/quber/.venv/lib/python3.13/site-packages/sniffio/_impl.pyr   r      s	   † ð ƒDr   r   c                   ó   • \ rS rSrSrg)ÚAsyncLibraryNotFoundErroré   r
   N)r   r   r   r   r   r
   r   r   r   r      s   † Úr   r   Úreturnc                  óŽ  • [         R                  n U b  U $ [        R                  5       n U b  U $ S[        R
                  ;   a  SSKn UR                  n U" 5       b  g S[        R
                  ;   a  SSKJn  U" 5       (       a  g[        S5      e! [         a    UR                  R                  n N_f = f! [         a     Ndf = f)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Úasyncior   Ú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ØÑØˆð ”C—K‘KÓÛð	5Ø"×/Ñ/ˆLð	Ù‹~Ñ)Ø ð *ð ”#—+‘+ÓÝ,Ù�?‰?Øä
#Ø8óð øô ó 	5Ø"Ÿ<™<×4Ñ4ŠLð	5ûô
 ó 	Ùð	ús$   ÁB ÁB7 Â B4Â3B4Â7
CÃC)Úcontextvarsr   Útypingr   r   Ú	threadingr   Úlocalr   r   r"   r   Ústrr%   r
   r   r   Ú<module>r+      sT   ðÝ "Ý Û 
Û á'Ø ¨$ñÐ ô
�9—?‘?ô ñ ‹~€ô	 ô 	ðF˜sõ Fr   