prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  option to disable automatic client response body decompression
  enhancement for https://github.com/aio-libs/aiohttp/issues/1992
  
  </issue>
  <code>
  [start of aiohttp/resolver.py]
  1 import socket
  2 from typing import Any, Dict, List
  3 
  4 from .abc import AbstractResolver
  5 from .helpers import get_running_loop
  6 
  7 __all__ = ("ThreadedResolver", "AsyncResolver", "DefaultResolver")
  8 
  9 try:
  10     import aiodns
  11 
  12     # aiodns_default = hasattr(aiodns.DNSResolver, 'gethostbyname')
  13 except ImportError:  # pragma: no cover
  14     aiodns = None
  15 
  16 aiodns_default = False
  17 
  18 
  19 class ThreadedResolver(AbstractResolver):
  20     """Use Executor for synchronous getaddrinfo() calls, which defaults to
  21     concurrent.futures.ThreadPoolExecutor.
  22     """
  23 
  24     def __init__(self) -> None:
  25         self._loop = get_running_loop()
  26 
  27     async def resolve(
  28         self, host: str, port: int = 0, family: int = socket.AF_INET
  29     ) -> List[Dict[str, Any]]:
  30         infos = await self._loop.getaddrinfo(
  31             host, port, type=socket.SOCK_STREAM, family=family
  32         )
  33 
  34         hosts = []
  35         for family, _, proto, _, address in infos:
  36             if family == socket.AF_INET6 and address[3]:  # type: ignore
  37                 # This is essential for link-local IPv6 addresses.
  38                 # LL IPv6 is a VERY rare case. Strictly speaking, we should use
  39                 # getnameinfo() unconditionally, but performance makes sense.
  40                 host, _port = socket.getnameinfo(
  41                     address, socket.NI_NUMERICHOST | socket.NI_NUMERICSERV
  42                 )
  43                 port = int(_port)
  44             else:
  45                 host, port = address[:2]
  46             hosts.append(
  47                 {
  48                     "hostname": host,
  49                     "host": host,
  50                     "port": port,
  51                     "family": family,
  52                     "proto": proto,
  53                     "flags": socket.AI_NUMERICHOST | socket.AI_NUMERICSERV,
  54                 }
  55             )
  56 
  57         return hosts
  58 
  59     async def close(self) -> None:
  60         pass
  61 
  62 
  63 class AsyncResolver(AbstractResolver):
  64     """Use the `aiodns` package to make asynchronous DNS lookups"""
  65 
  66     def __init__(self, *args: Any, **kwargs: Any) -> None:
  67         if aiodns is None:
  68             raise RuntimeError("Resolver requires aiodns library")
  69 
  70         self._loop = get_running_loop()
  71         self._resolver = aiodns.DNSResolver(*args, loop=self._loop, **kwargs)
  72 
  73     async def resolve(
  74         self, host: str, port: int = 0, family: int = socket.AF_INET
  75     ) -> List[Dict[str, Any]]:
  76         try:
  77             resp = await self._resolver.gethostbyname(host, family)
  78         except aiodns.error.DNSError as exc:
  79             msg = exc.args[1] if len(exc.args) >= 1 else "DNS lookup failed"
  80             raise OSError(msg) from exc
  81         hosts = []
  82         for address in resp.addresses:
  83             hosts.append(
  84                 {
  85                     "hostname": host,
  86                     "host": address,
  87                     "port": port,
  88                     "family": family,
  89                     "proto": 0,
  90                     "flags": socket.AI_NUMERICHOST | socket.AI_NUMERICSERV,
  91                 }
  92             )
  93 
  94         if not hosts:
  95             raise OSError("DNS lookup failed")
  96 
  97         return hosts
  98 
  99     async def close(self) -> None:
  100         return self._resolver.cancel()
  101 
  102 
  103 DefaultResolver = AsyncResolver if aiodns_default else ThreadedResolver
  104
  [end of aiohttp/resolver.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/aiohttp/resolver.py b/aiohttp/resolver.py
  --- a/aiohttp/resolver.py
  +++ b/aiohttp/resolver.py
  @@ -25,10 +25,10 @@
           self._loop = get_running_loop()
   
       async def resolve(
  -        self, host: str, port: int = 0, family: int = socket.AF_INET
  +        self, hostname: str, port: int = 0, family: int = socket.AF_INET
       ) -> List[Dict[str, Any]]:
           infos = await self._loop.getaddrinfo(
  -            host, port, type=socket.SOCK_STREAM, family=family
  +            hostname, port, type=socket.SOCK_STREAM, family=family
           )
   
           hosts = []
  @@ -45,7 +45,7 @@
                   host, port = address[:2]
               hosts.append(
                   {
  -                    "hostname": host,
  +                    "hostname": hostname,
                       "host": host,
                       "port": port,
                       "family": family,
  
verification_info: {"golden_diff": "diff --git a/aiohttp/resolver.py b/aiohttp/resolver.py\n--- a/aiohttp/resolver.py\n+++ b/aiohttp/resolver.py\n@@ -25,10 +25,10 @@\n         self._loop = get_running_loop()\n \n     async def resolve(\n-        self, host: str, port: int = 0, family: int = socket.AF_INET\n+        self, hostname: str, port: int = 0, family: int = socket.AF_INET\n     ) -> List[Dict[str, Any]]:\n         infos = await self._loop.getaddrinfo(\n-            host, port, type=socket.SOCK_STREAM, family=family\n+            hostname, port, type=socket.SOCK_STREAM, family=family\n         )\n \n         hosts = []\n@@ -45,7 +45,7 @@\n                 host, port = address[:2]\n             hosts.append(\n                 {\n-                    \"hostname\": host,\n+                    \"hostname\": hostname,\n                     \"host\": host,\n                     \"port\": port,\n                     \"family\": family,\n", "issue": "option to disable automatic client response body decompression\nenhancement for https://github.com/aio-libs/aiohttp/issues/1992\n", "before_files": [{"content": "import socket\nfrom typing import Any, Dict, List\n\nfrom .abc import AbstractResolver\nfrom .helpers import get_running_loop\n\n__all__ = (\"ThreadedResolver\", \"AsyncResolver\", \"DefaultResolver\")\n\ntry:\n    import aiodns\n\n    # aiodns_default = hasattr(aiodns.DNSResolver, 'gethostbyname')\nexcept ImportError:  # pragma: no cover\n    aiodns = None\n\naiodns_default = False\n\n\nclass ThreadedResolver(AbstractResolver):\n    \"\"\"Use Executor for synchronous getaddrinfo() calls, which defaults to\n    concurrent.futures.ThreadPoolExecutor.\n    \"\"\"\n\n    def __init__(self) -> None:\n        self._loop = get_running_loop()\n\n    async def resolve(\n        self, host: str, port: int = 0, family: int = socket.AF_INET\n    ) -> List[Dict[str, Any]]:\n        infos = await self._loop.getaddrinfo(\n            host, port, type=socket.SOCK_STREAM, family=family\n        )\n\n        hosts = []\n        for family, _, proto, _, address in infos:\n            if family == socket.AF_INET6 and address[3]:  # type: ignore\n                # This is essential for link-local IPv6 addresses.\n                # LL IPv6 is a VERY rare case. Strictly speaking, we should use\n                # getnameinfo() unconditionally, but performance makes sense.\n                host, _port = socket.getnameinfo(\n                    address, socket.NI_NUMERICHOST | socket.NI_NUMERICSERV\n                )\n                port = int(_port)\n            else:\n                host, port = address[:2]\n            hosts.append(\n                {\n                    \"hostname\": host,\n                    \"host\": host,\n                    \"port\": port,\n                    \"family\": family,\n                    \"proto\": proto,\n                    \"flags\": socket.AI_NUMERICHOST | socket.AI_NUMERICSERV,\n                }\n            )\n\n        return hosts\n\n    async def close(self) -> None:\n        pass\n\n\nclass AsyncResolver(AbstractResolver):\n    \"\"\"Use the `aiodns` package to make asynchronous DNS lookups\"\"\"\n\n    def __init__(self, *args: Any, **kwargs: Any) -> None:\n        if aiodns is None:\n            raise RuntimeError(\"Resolver requires aiodns library\")\n\n        self._loop = get_running_loop()\n        self._resolver = aiodns.DNSResolver(*args, loop=self._loop, **kwargs)\n\n    async def resolve(\n        self, host: str, port: int = 0, family: int = socket.AF_INET\n    ) -> List[Dict[str, Any]]:\n        try:\n            resp = await self._resolver.gethostbyname(host, family)\n        except aiodns.error.DNSError as exc:\n            msg = exc.args[1] if len(exc.args) >= 1 else \"DNS lookup failed\"\n            raise OSError(msg) from exc\n        hosts = []\n        for address in resp.addresses:\n            hosts.append(\n                {\n                    \"hostname\": host,\n                    \"host\": address,\n                    \"port\": port,\n                    \"family\": family,\n                    \"proto\": 0,\n                    \"flags\": socket.AI_NUMERICHOST | socket.AI_NUMERICSERV,\n                }\n            )\n\n        if not hosts:\n            raise OSError(\"DNS lookup failed\")\n\n        return hosts\n\n    async def close(self) -> None:\n        return self._resolver.cancel()\n\n\nDefaultResolver = AsyncResolver if aiodns_default else ThreadedResolver\n", "path": "aiohttp/resolver.py"}]}