f UddlmZddlZddlmZmZmZmZda iZ ee efe d<dZ GddejjZde d efd Zd e fd Zd efd Zde d efd Zy))DictN)BackendDatagramSocketSocket StreamSocket _backendsFc eZdZy)AsyncLibraryNotFoundErrorN)__name__ __module__ __qualname__Y/var/lib/jenkins/workspace/mettalog/venv/lib/python3.12/site-packages/dns/asyncbackend.pyr r srr namereturnctj|}|r|S|dk(rddl}|jj }n2|dk(rddl}|j j }ntd||t|<|S)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. triorNasynciozunimplemented async backend )rgetdns._trio_backend _trio_backendrdns._asyncio_backend_asyncio_backendNotImplementedError)rbackenddnss r get_backendrsxmmD!G v~ ##++-  #&&..0!$@"GHHIdO Nrc trtddl} |jS#|j$r t dwxYw#t$r0ddl} |j Yy#t$r t dwxYwwxYw)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. rNz&sniffio cannot determine async libraryrzno async library detected) _no_sniffio ImportErrorsniffiocurrent_async_libraryr rget_running_loop RuntimeError)r"rs rsniffr&7sI   V002 200 V+,TU U V I I  $ $ & I+,GH H I Is*A#>A A:A!!A66A:c@trtSttS)z6Get the default backend, initializing it if necessary.)_default_backendset_default_backendr&rrrget_default_backendr*Rs uw ''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.exceptionrdns._asyncbackendrrrrr(rstr__annotations__r exception DNSExceptionr rr&r*r)rrrr3s " 4W "   : : cg4IsI6(W( c g r