%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/dns/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/dns/__pycache__/asyncbackend.cpython-312.pyc

�

5��e�
����UddlmZddlZddlmZmZmZmZda	iZ
eeefed<dZ
Gd�dejj�Zded	efd
�Zd	efd�Zd	efd�Zded	efd
�Zy)�)�DictN)�Backend�DatagramSocket�Socket�StreamSocket�	_backendsFc��eZdZy)�AsyncLibraryNotFoundErrorN)�__name__�
__module__�__qualname__���2/usr/lib/python3/dist-packages/dns/asyncbackend.pyr
r
s��rr
�name�returnc��tj|�}|r|S|dk(rddl}|jj	�}n2|dk(rddl}|jj	�}ntd|����|t|<|S)z�Get 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.
    �triorN�asynciozunimplemented async backend )r�get�dns._trio_backend�
_trio_backendr�dns._asyncio_backend�_asyncio_backend�NotImplementedError)r�backend�dnss   r�get_backendrsx���m�m�D�!�G�����v�~� ��#�#�+�+�-��	
��	�#��&�&�.�.�0��!�$@���"G�H�H��I�d�O��Nrc��	trt�ddl}	|j�S#|j$rt	d��wxYw#t$r0ddl}	|j
�Yy#t$rt	d��wxYwwxYw)z�Attempt 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.
    rNz&sniffio cannot determine async libraryrzno async library detected)�_no_sniffio�ImportError�sniffio�current_async_libraryr
r�get_running_loop�RuntimeError)r"rs  r�sniffr&7s���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:�A!�!A6�6A:c�@�trtStt��S)z6Get the default backend, initializing it if necessary.)�_default_backend�set_default_backendr&rrr�get_default_backendr*Rs������u�w�'�'rc�$�t|�atS)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.
    )rr()rs rr)r)Zs��#�4�(���r)�typingr�
dns.exceptionr�dns._asyncbackendrrrrr(r�str�__annotations__r �	exception�DNSExceptionr
rr&r*r)rrr�<module>r3s��������� "�	�4��W���"���	��
�
� :� :�	��c��g��4I�s�I�6(�W�(��c��g�r

Zerion Mini Shell 1.0