37 lines
1.1 KiB
Diff
37 lines
1.1 KiB
Diff
From 2be9318dc95a26940e9095673ebcbbf77dfd087b Mon Sep 17 00:00:00 2001
|
|
From: danigm <daniel.garcia@suse.com>
|
|
Date: Tue, 2 May 2023 21:28:50 +0200
|
|
Subject: [PATCH] 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:
|
|
|
|
https://github.com/aio-libs/yarl/commit/dd86b3435093b9ca251ecb7831346b92a3f16b25
|
|
|
|
Fix https://github.com/aio-libs/aiohttp/issues/7259
|
|
|
|
---------
|
|
|
|
Co-authored-by: Sam Bull <aa6bs0@sambull.org>
|
|
--- a/aiohttp/client.py
|
|
+++ b/aiohttp/client.py
|
|
@@ -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)
|
|
@@ -613,7 +614,7 @@ async def _request(
|
|
headers.pop(hdrs.AUTHORIZATION, None)
|
|
|
|
url = parsed_url
|
|
- params = None
|
|
+ params = {}
|
|
resp.release()
|
|
continue
|
|
|