From a6cf2704260d191cdc783b7446b4ba281c471136 Mon Sep 17 00:00:00 2001 From: Stefan Negru Date: Tue, 28 Nov 2023 12:48:33 +0200 Subject: [PATCH] ignored as this should work according to https://multidict.aio-libs.org/en/stable/multidict.html#multidict.MultiDictProxy.copy which is what request uses it should be available --- swift_browser_ui/ui/api.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/swift_browser_ui/ui/api.py b/swift_browser_ui/ui/api.py index 38b657525..c9ec10578 100644 --- a/swift_browser_ui/ui/api.py +++ b/swift_browser_ui/ui/api.py @@ -67,7 +67,10 @@ async def swift_list_containers( f"{request.remote}, session: {session} :: {time.ctime()}" ) - query = request.query.copy() + # as of v 3.9.1 the return type of query is "MultiMapping[str]" + # however the actual function returns MultiDictProxy which has copy + # https://github.com/aio-libs/multidict/blob/master/multidict/_multidict_py.py#L146-L163 + query = request.query.copy() # type: ignore[attr-defined] query["format"] = "json" try: async with client.get( @@ -241,7 +244,10 @@ async def swift_list_objects(request: aiohttp.web.Request) -> aiohttp.web.Stream f"{request.remote}, sess: {session} :: {time.ctime()}" ) - query = request.query.copy() + # as of v 3.9.1 the return type of query is "MultiMapping[str]" + # however the actual function returns MultiDictProxy which has copy + # https://github.com/aio-libs/multidict/blob/master/multidict/_multidict_py.py#L146-L163 + query = request.query.copy() # type: ignore[attr-defined] query["format"] = "json" endpoint = session["projects"][project]["endpoint"]