grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026a àMÒeì ã@sžUddlmZddlZddlmZmZmZmZda iZ ee efe d<dZ Gdd„dejjƒZe edœd d „Ze d œd d „Zed œdd„Ze edœdd„ZdS)é)ÚDictN)ÚBackendÚDatagramSocketÚSocketÚ StreamSocketÚ _backendsFc@s eZdZdS)ÚAsyncLibraryNotFoundErrorN)Ú__name__Ú __module__Ú __qualname__©r r ú4/usr/lib/python3.9/site-packages/dns/asyncbackend.pyrsr)ÚnameÚreturncCsdt |¡}|r|S|dkr.ddl}|j ¡}n*|dkrJddl}|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. ZtriorNÚasynciozunimplemented async backend )rÚgetZdns._trio_backendZ _trio_backendrZdns._asyncio_backendZ_asyncio_backendÚNotImplementedError)rZbackendÚdnsr r r Ú get_backends   r)rc CsŠz>tr t‚ddl}z | ¡WWS|jy:tdƒ‚Yn0WnFty„ddl}z| ¡WYdSty~tdƒ‚Yn0Yn0dS)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ÚsniffioZcurrent_async_libraryrrZget_running_loopÚ RuntimeError)rrr r r Úsniff7s   rcCstrtSttƒƒS)z6Get the default backend, initializing it if necessary.)Ú_default_backendÚset_default_backendrr r r r Úget_default_backendRsrcCs 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)rr r r rZs r)ÚtypingrZ dns.exceptionrZdns._asyncbackendrrrrrrÚstrÚ__annotations__rÚ exceptionZ DNSExceptionrrrrrr r r r Ús