Skip to content

Commit 2be9318

Browse files
Update update_query calls to work with latest yarl (#7260)
This patch pass "{}" when params is "None" to the url.update_query to avoid setting the url params to None. Related to this change in yarl: aio-libs/yarl@dd86b34 Fix #7259 --------- Co-authored-by: Sam Bull <[email protected]>
1 parent 8279a76 commit 2be9318

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

CHANGES/7259.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed missing query in tracing method URLs when using ``yarl`` 1.9+.

aiohttp/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ async def _request(
374374
redirects = 0
375375
history = []
376376
version = self._version
377+
params = params or {}
377378

378379
# Merge with default headers and transform to CIMultiDict
379380
headers = self._prepare_headers(headers)
@@ -613,7 +614,7 @@ async def _request(
613614
headers.pop(hdrs.AUTHORIZATION, None)
614615

615616
url = parsed_url
616-
params = None
617+
params = {}
617618
resp.release()
618619
continue
619620

requirements/base.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ charset-normalizer==2.0.12
1111
frozenlist==1.3.1
1212
gunicorn==20.1.0
1313
uvloop==0.14.0; platform_system!="Windows" and implementation_name=="cpython" and python_version<"3.9" # MagicStack/uvloop#14
14-
yarl==1.8.1
14+
yarl==1.9.2

requirements/constraints.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ webcolors==1.11.1
253253
# via blockdiag
254254
wheel==0.37.0
255255
# via pip-tools
256-
yarl==1.8.1
256+
yarl==1.9.2
257257
# via -r requirements/base.txt
258258
zipp==3.8.1
259259
# via importlib-metadata

0 commit comments

Comments
 (0)