From 570b20a1aeec09af50bd37ad28bcbf010574f726 Mon Sep 17 00:00:00 2001 From: Thiago Date: Tue, 23 Nov 2021 10:10:35 +0100 Subject: [PATCH] Update sessions.py This change will make the hierarchy request **kwargs -> Session args -> environment to be respected. This also solves problems with pip as discussed [here](https://github.com/pypa/pip/issues/9691#issuecomment-791608247) and #5735 --- requests/sessions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requests/sessions.py b/requests/sessions.py index ae4bcc8e79..4854fd469d 100644 --- a/requests/sessions.py +++ b/requests/sessions.py @@ -527,7 +527,7 @@ def request(self, method, url, ) prep = self.prepare_request(req) - proxies = proxies or {} + proxies = proxies or self.proxies settings = self.merge_environment_settings( prep.url, proxies, stream, verify, cert