Skip to content

Commit

Permalink
As per psf#5893 & psf#5891 address a performance regression by not re…
Browse files Browse the repository at this point in the history
…building proxies if proxies have been supplied.

Signed-off-by: David Black <dblack@atlassian.com>
  • Loading branch information
dbaxa committed Jul 29, 2021
1 parent b227e3c commit 3c32ae8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion requests/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,8 @@ def send(self, request, **kwargs):
kwargs.setdefault('stream', self.stream)
kwargs.setdefault('verify', self.verify)
kwargs.setdefault('cert', self.cert)
kwargs.setdefault('proxies', self.rebuild_proxies(request, self.proxies))
if 'proxies' not in kwargs:
kwargs['proxies'] = self.rebuild_proxies(request, self.proxies)

# It's possible that users might accidentally send a Request object.
# Guard against that specific failure case.
Expand Down

0 comments on commit 3c32ae8

Please sign in to comment.