From 104c5c45f4da15a1d5e0b0d28a0f01210772ad47 Mon Sep 17 00:00:00 2001 From: Christopher Petito <47751006+krissetto@users.noreply.github.com> Date: Wed, 22 May 2024 09:54:56 +0000 Subject: [PATCH] Hotfix for requests 2.32.2 Signed-off-by: Christopher Petito <47751006+krissetto@users.noreply.github.com> --- docker/transport/basehttpadapter.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docker/transport/basehttpadapter.py b/docker/transport/basehttpadapter.py index dfbb193b9..2301b6b07 100644 --- a/docker/transport/basehttpadapter.py +++ b/docker/transport/basehttpadapter.py @@ -6,3 +6,8 @@ def close(self): super().close() if hasattr(self, 'pools'): self.pools.clear() + + # Fix for requests 2.32.2+: + # https://github.com/psf/requests/commit/c98e4d133ef29c46a9b68cd783087218a8075e05 + def get_connection_with_tls_context(self, request, verify, proxies=None, cert=None): + return self.get_connection(request.url, proxies)