Skip to content

Commit

Permalink
Fix function signature of monkeypatched HTTP adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelm committed Dec 12, 2023
1 parent 7f948bf commit 0e832a7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/pretix/helpers/monkeypatching.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,13 @@ def monkeypatch_requests_timeout():
"""
old_httpadapter_send = HTTPAdapter.send

def httpadapter_send(self, request, timeout=None, **kwargs):
def httpadapter_send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None, **kwargs):
if timeout is None:
timeout = 30
return types.MethodType(old_httpadapter_send, self)(request, timeout=timeout, **kwargs)
timeout = 3
return types.MethodType(old_httpadapter_send, self)(
request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies,
**kwargs
)

HTTPAdapter.send = httpadapter_send

Expand Down

0 comments on commit 0e832a7

Please sign in to comment.