
    g
                         % S SK Jr  S SKrS SKJrJrJrJr  Sq	0 r
\\\4   \S'   Sr " S S\R                  R                  5      rS\S	\4S
 jrS	\4S jrS	\4S jrS\S	\4S jrg)    )DictN)BackendDatagramSocketSocketStreamSocket	_backendsFc                       \ rS rSrSrg)AsyncLibraryNotFoundError    N)__name__
__module____qualname____firstlineno____static_attributes__r       I/home/matz/Project1/venv/lib/python3.13/site-packages/dns/asyncbackend.pyr
   r
      s    r   r
   namereturnc                    [         R                  U 5      nU(       a  U$ U S:X  a  SSKnUR                  R	                  5       nO3U S:X  a  SSKnUR                  R	                  5       nO[        SU  35      eU[         U '   U$ )zGet the specified asynchronous backend.

*name*, a ``str``, the name of the backend.  Currently the "trio"
and "asyncio" backends are available.

Raises NotImplementedError if an unknown backend name is specified.
trior   Nasynciozunimplemented async backend )r   getdns._trio_backend_trio_backendr   dns._asyncio_backend_asyncio_backendNotImplementedError)r   backenddnss      r   get_backendr!      sx     mmD!Gv~ ##++-		#&&..0!$@"GHHIdONr   c                  
    [         (       a  [        eSSKn  U R                  5       $ ! U R                   a    [	        S5      ef = f! [         a1    SSKn UR                  5          g! [         a    [	        S5      ef = ff = f)zAttempt to determine the in-use asynchronous I/O library by using
the ``sniffio`` module if it is available.

Returns the name of the library, or raises AsyncLibraryNotFoundError
if the library cannot be determined.
r   Nz&sniffio cannot determine async libraryr   zno async library detected)_no_sniffioImportErrorsniffiocurrent_async_libraryr
   r   get_running_loopRuntimeError)r%   r   s     r   sniffr)   7   s    I;	V002200 	V+,TUU	V I	I$$& 	I+,GHH	IIs,   A ( AA BA((A>>Bc                  J    [         (       a  [         $ [        [        5       5      $ )z6Get the default backend, initializing it if necessary.)_default_backendset_default_backendr)   r   r   r   get_default_backendr-   R   s    uw''r   c                 $    [        U 5      q[        $ )a  Set the default backend.

It's not normally necessary to call this method, as
``get_default_backend()`` will initialize the backend
appropriately in many cases.  If ``sniffio`` is not installed, or
in testing situations, this function allows the backend to be set
explicitly.
)r!   r+   )r   s    r   r,   r,   Z   s     #4(r   )typingr   dns.exceptionr    dns._asyncbackendr   r   r   r   r+   r   str__annotations__r#   	exceptionDNSExceptionr
   r!   r)   r-   r,   r   r   r   <module>r6      s         "	4W " 	 : : 	c g 4Is I6(W (c g r   