Skip to content

Commit 50203c4

Browse files
hugovkwebknjaz
andauthored
Increase the upper boundary of the multidict dependency allowing v6
The `multidict` dependency used to be `multidict >=4.5, < 7.0` in `aiohttp` v3.8.1, but was pinned down to `multidict >=4.5, < 6.0` in `aiohttp` v3.8.2 (#6550) in an attempt to help avoid new errors. However, https://github.com/python/bedevere/ uses `multidict==6.0.2` so the requirements resolution fails with `aiohttp==3.8.2`: ```console ERROR: Cannot install -r requirements.txt (line 1) and multidict==6.0.2 because these package versions have conflicting dependencies. The conflict is caused by: The user requested multidict==6.0.2 aiohttp 3.8.2 depends on multidict<6.0 and >=4.5 To fix this you could try to: 1. loosen the range of package versions you've specified 2. remove package versions to allow pip attempt to solve the dependency conflict ``` https://github.com/hugovk/bedevere/actions/runs/3095794573/jobs/5010600772 This patch makes it possible to have `multidict` v6 installed in the same env as `aiohttp` v3.8.3, as with `aiohttp` v3.8.1. Partially related to closed #6600 and merged #6550. PR #6950 Co-Authored-By: Sviatoslav Sydorenko <[email protected]>
1 parent ee5e951 commit 50203c4

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

CHANGES/6950.bugfix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Increased the upper boundary of the :doc:`multidict:index` dependency
2+
to allow for the version 6 -- by :user:`hugovk`.
3+
4+
It used to be limited below version 7 in :doc:`aiohttp <index>` v3.8.1 but
5+
was lowered in v3.8.2 via :pr:`6550` and never brought back, causing
6+
problems with dependency pins when upgrading. :doc:`aiohttp <index>` v3.8.3
7+
fixes that by recovering the original boundary of ``< 7``.

aiohttp/web_ws.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ def _handshake(
196196
accept_val = base64.b64encode(
197197
hashlib.sha1(key.encode() + WS_KEY).digest()
198198
).decode()
199-
response_headers = CIMultiDict( # type: ignore[var-annotated]
199+
response_headers = CIMultiDict(
200200
{
201-
hdrs.UPGRADE: "websocket", # type: ignore[arg-type]
201+
hdrs.UPGRADE: "websocket",
202202
hdrs.CONNECTION: "upgrade",
203203
hdrs.SEC_WEBSOCKET_ACCEPT: accept_val,
204204
}

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ include_package_data = True
5050
install_requires =
5151
attrs >= 17.3.0
5252
charset-normalizer >=2.0, < 3.0
53-
multidict >=4.5, < 6.0
53+
multidict >=4.5, < 7.0
5454
async_timeout >= 4.0.0a3, < 5.0
5555
asynctest == 0.13.0; python_version<"3.8"
5656
yarl >= 1.0, < 2.0

0 commit comments

Comments
 (0)