From a82489c948b56bcde53fba4c878c7948d183061e Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Thu, 30 May 2024 17:55:08 -0300 Subject: [PATCH 1/4] Add follow_redirects=True --- storage3/_sync/client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/storage3/_sync/client.py b/storage3/_sync/client.py index c3bd9c43..e9237918 100644 --- a/storage3/_sync/client.py +++ b/storage3/_sync/client.py @@ -27,7 +27,9 @@ def __init__( def _create_session( self, base_url: str, headers: dict[str, str], timeout: int ) -> SyncClient: - return SyncClient(base_url=base_url, headers=headers, timeout=timeout) + return SyncClient( + base_url=base_url, headers=headers, timeout=timeout, follow_redirects=True + ) def __enter__(self) -> SyncStorageClient: return self From 6ef469889a6fff307f90f6c69127aefc3a34da2b Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Thu, 30 May 2024 17:55:16 -0300 Subject: [PATCH 2/4] Add follow_redirects=True --- storage3/_async/client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/storage3/_async/client.py b/storage3/_async/client.py index eac22394..8b7a9b39 100644 --- a/storage3/_async/client.py +++ b/storage3/_async/client.py @@ -27,7 +27,9 @@ def __init__( def _create_session( self, base_url: str, headers: dict[str, str], timeout: int ) -> AsyncClient: - return AsyncClient(base_url=base_url, headers=headers, timeout=timeout) + return AsyncClient( + base_url=base_url, headers=headers, timeout=timeout, follow_redirects=True + ) async def __aenter__(self) -> AsyncStorageClient: return self From 61004a5581a9e3da4b4ac3d6fdcae3ae8a4a31c6 Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Wed, 5 Jun 2024 15:48:28 -0300 Subject: [PATCH 3/4] Fixes for the code --- storage3/_sync/client.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/storage3/_sync/client.py b/storage3/_sync/client.py index 164db150..90ef2d94 100644 --- a/storage3/_sync/client.py +++ b/storage3/_sync/client.py @@ -32,7 +32,11 @@ def _create_session( self, base_url: str, headers: dict[str, str], timeout: int, verify: bool = True ) -> SyncClient: return SyncClient( - base_url=base_url, headers=headers, timeout=timeout, verify=bool(verify), follow_redirects=True + base_url=base_url, + headers=headers, + timeout=timeout, + verify=bool(verify), + follow_redirects=True, ) def __enter__(self) -> SyncStorageClient: From c585d038e2df4aea07c090fc50fbcc9ef0f05abf Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Wed, 5 Jun 2024 15:48:34 -0300 Subject: [PATCH 4/4] Fixes for the code --- storage3/_async/client.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/storage3/_async/client.py b/storage3/_async/client.py index f0064e86..7a380c92 100644 --- a/storage3/_async/client.py +++ b/storage3/_async/client.py @@ -32,7 +32,11 @@ def _create_session( self, base_url: str, headers: dict[str, str], timeout: int, verify: bool = True ) -> AsyncClient: return AsyncClient( - base_url=base_url, headers=headers, timeout=timeout, verify=bool(verify), follow_redirects=True + base_url=base_url, + headers=headers, + timeout=timeout, + verify=bool(verify), + follow_redirects=True, ) async def __aenter__(self) -> AsyncStorageClient: