Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert fix MultiDict typing with multidict-6.0.0 (#64733) #64792

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions homeassistant/package_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions homeassistant/util/aiohttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand All @@ -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))

Expand Down
4 changes: 4 additions & 0 deletions script/gen_requirements_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down