Skip to content

Commit

Permalink
adapters: fix for requests 2.32.2+
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Deziel <[email protected]>
  • Loading branch information
simondeziel committed Jun 1, 2024
1 parent 31bdd06 commit 8b02ed5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions requests_unixsocket/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ def __init__(self, timeout=60, pool_connections=25, *args, **kwargs):
pool_connections, dispose_func=lambda p: p.close()
)

# Fix for requests 2.32.2+: https://github.com/psf/requests/pull/6710
def get_connection_with_tls_context(self, request, verify, proxies=None, cert=None):
return self.get_connection(request.url, proxies)

def get_connection(self, url, proxies=None):
proxies = proxies or {}
proxy = proxies.get(urlparse(url.lower()).scheme)
Expand Down

0 comments on commit 8b02ed5

Please sign in to comment.