Skip to content

Commit

Permalink
Update update_query calls to work with latest yarl
Browse files Browse the repository at this point in the history
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 aio-libs#7259
  • Loading branch information
danigm committed Apr 27, 2023
1 parent ecd9c72 commit 7dcc235
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aiohttp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ async def _request(
redirects = 0
history = []
version = self._version
params = params or {}

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

url = parsed_url
params = None
params = {}
resp.release()
continue

Expand Down

0 comments on commit 7dcc235

Please sign in to comment.