From 94683d7d1a41d3feffee07d0fc4e17b5b112d8bb Mon Sep 17 00:00:00 2001 From: mib1185 Date: Sun, 23 Jan 2022 20:57:34 +0000 Subject: [PATCH 1/2] revert #64733 --- homeassistant/util/aiohttp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/util/aiohttp.py b/homeassistant/util/aiohttp.py index 765a9994a6711..aa1aea1abc370 100644 --- a/homeassistant/util/aiohttp.py +++ b/homeassistant/util/aiohttp.py @@ -44,13 +44,13 @@ def __init__( self.method = method self.url = url self.status = status - self.headers: CIMultiDict[str, str] = CIMultiDict(headers or {}) + self.headers: CIMultiDict[str] = CIMultiDict(headers or {}) self.query_string = query_string or "" self._content = content self.mock_source = mock_source @property - def query(self) -> MultiDict[str, str]: + def query(self) -> MultiDict[str]: """Return a dictionary with the query variables.""" return MultiDict(parse_qsl(self.query_string, keep_blank_values=True)) @@ -68,7 +68,7 @@ async def json(self) -> Any: """Return the body as JSON.""" return json.loads(self._text) - async def post(self) -> MultiDict[str, str]: + async def post(self) -> MultiDict[str]: """Return POST parameters.""" return MultiDict(parse_qsl(self._text, keep_blank_values=True)) From 5ca2fb4d0a9ed5b6b57ac663b2ea1daaf79f8801 Mon Sep 17 00:00:00 2001 From: mib1185 Date: Sun, 23 Jan 2022 21:38:39 +0000 Subject: [PATCH 2/2] pin down multidict to < 6.0.0 --- homeassistant/package_constraints.txt | 4 ++++ script/gen_requirements_all.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index 81d219b8ad3ec..2deba3f4d1d4f 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -95,3 +95,7 @@ pytest_asyncio==1000000000.0.0 # https://github.com/jkeljo/sisyphus-control/issues/6 python-engineio>=3.13.1,<4.0 python-socketio>=4.6.0,<5.0 + +# Constrain multidict to avoid typing issues +# https://github.com/home-assistant/core/pull/64792 +multidict<6.0.0 diff --git a/script/gen_requirements_all.py b/script/gen_requirements_all.py index 952bd8b8f48de..bfba8bddd43d5 100755 --- a/script/gen_requirements_all.py +++ b/script/gen_requirements_all.py @@ -120,6 +120,10 @@ # https://github.com/jkeljo/sisyphus-control/issues/6 python-engineio>=3.13.1,<4.0 python-socketio>=4.6.0,<5.0 + +# Constrain multidict to avoid typing issues +# https://github.com/home-assistant/core/pull/64792 +multidict<6.0.0 """ IGNORE_PRE_COMMIT_HOOK_ID = (