From 8cb7332b0f7c7b39689aaa2825b8542cb8b49fd7 Mon Sep 17 00:00:00 2001 From: Flo <37000563+flok@users.noreply.github.com> Date: Mon, 13 Jan 2025 15:40:48 +0100 Subject: [PATCH 1/3] Add proxies to request session Adds the provided proxies to the request session after creation. --- atlassian/rest_client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/atlassian/rest_client.py b/atlassian/rest_client.py index a5f18c293..a8282d272 100644 --- a/atlassian/rest_client.py +++ b/atlassian/rest_client.py @@ -119,6 +119,10 @@ def __init__( self._session = requests.Session() else: self._session = session + + if proxies is not None: + self._session.proxies = self.proxies + if backoff_and_retry and int(urllib3.__version__.split(".")[0]) >= 2: # Note: we only retry on status and not on any of the # other supported reasons From fd538d987106ba4c526201283d108bdfc79f7aff Mon Sep 17 00:00:00 2001 From: Flo <37000563+flok@users.noreply.github.com> Date: Mon, 13 Jan 2025 17:52:13 +0100 Subject: [PATCH 2/3] Delete trailing whitespace Delete trailing whitespace for codestyle --- atlassian/rest_client.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/atlassian/rest_client.py b/atlassian/rest_client.py index a8282d272..ef095f8a8 100644 --- a/atlassian/rest_client.py +++ b/atlassian/rest_client.py @@ -121,8 +121,7 @@ def __init__( self._session = session if proxies is not None: - self._session.proxies = self.proxies - + self._session.proxies = self.proxies if backoff_and_retry and int(urllib3.__version__.split(".")[0]) >= 2: # Note: we only retry on status and not on any of the # other supported reasons From fa5d81c0a82f229e7a2f36d758cef621d61237a6 Mon Sep 17 00:00:00 2001 From: Flo <37000563+flok@users.noreply.github.com> Date: Mon, 13 Jan 2025 17:58:12 +0100 Subject: [PATCH 3/3] Update rest_client.py --- atlassian/rest_client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/atlassian/rest_client.py b/atlassian/rest_client.py index ef095f8a8..127e7039b 100644 --- a/atlassian/rest_client.py +++ b/atlassian/rest_client.py @@ -121,7 +121,8 @@ def __init__( self._session = session if proxies is not None: - self._session.proxies = self.proxies + self._session.proxies = self.proxies + if backoff_and_retry and int(urllib3.__version__.split(".")[0]) >= 2: # Note: we only retry on status and not on any of the # other supported reasons