diff --git a/pyproject.toml b/pyproject.toml index 428df32..9adf164 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ classifiers = [ ] dependencies = [ "aiohttp >=3.13.0", - "anyio >=4.10.0", + "cyares[aiohttp,anyio,idna] >=0.4.0", "distributed >=2026.1.1", "filelock >=3.20.0", "hishel[fastapi,httpx,requests] >=1.1.5", diff --git a/src/mahoraga/_core/_context.py b/src/mahoraga/_core/_context.py index 6e625d8..f9b2cec 100644 --- a/src/mahoraga/_core/_context.py +++ b/src/mahoraga/_core/_context.py @@ -35,6 +35,7 @@ import aiohttp import anyio +import cyares.aiohttp import hishel.httpx import httpx import httpx_aiohttp @@ -225,6 +226,9 @@ def get_client(self) -> aiohttp.ClientSession: keepalive_timeout=self.limits.keepalive_expiry, ssl=self.ssl_context, local_addr=(self.local_address, 0) if self.local_address else None, + resolver=cyares.aiohttp.CyAresResolver( + loop=asyncio.get_running_loop(), + ), ) if _logger.isEnabledFor(logging.INFO): trace_config = aiohttp.TraceConfig()