Skip to content

Commit

Permalink
Add lowercase proxy vars and make priority consistent with other tools (
Browse files Browse the repository at this point in the history
#16287)

* Add lowercase proxy vars and make priority consistent with other tools

* Add explanatory comments for lowercase vars

Co-authored-by: Jason Weill <93281816+JasonWeill@users.noreply.github.com>

---------

Co-authored-by: Jason Weill <93281816+JasonWeill@users.noreply.github.com>
  • Loading branch information
jgoodson and JasonWeill committed May 11, 2024
1 parent 66bc3b0 commit 7ae2d43
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions jupyterlab/extensions/pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,12 @@ def make_connection(self, host):
xmlrpc_transport_override = None

all_proxy_url = environ.get("ALL_PROXY")
http_proxy_url = environ.get("HTTP_PROXY") or all_proxy_url
https_proxy_url = environ.get("HTTPS_PROXY") or all_proxy_url or http_proxy_url
# For historical reasons, we also support the lowercase environment variables.
# Info: https://about.gitlab.com/blog/2021/01/27/we-need-to-talk-no-proxy/
http_proxy_url = environ.get("http_proxy") or environ.get("HTTP_PROXY") or all_proxy_url
https_proxy_url = (
environ.get("https_proxy") or environ.get("HTTPS_PROXY") or http_proxy_url or all_proxy_url
)
proxies = None

if http_proxy_url:
Expand Down

0 comments on commit 7ae2d43

Please sign in to comment.