Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyPI extension search not functional with lowercase http_proxy environment variable. #16286

Closed
jgoodson opened this issue May 6, 2024 · 1 comment · Fixed by #16287
Closed
Labels

Comments

@jgoodson
Copy link
Contributor

jgoodson commented May 6, 2024

Description

Even after #15219, extension lookup in proxy-requiring environments fail if only the lower-case http_proxy variant is provided. Although there is no standard for these variables, the lower-case variant is "more standard", working in most major tools that handle these environments. For reference, see https://about.gitlab.com/blog/2021/01/27/we-need-to-talk-no-proxy/#http_proxy-and-https_proxy for a discussion of these variables.

While you might expect environment variables to be all-caps, http_proxy came first, so that's the de facto standard. When in doubt, go with the lowercase form because that's universally supported.

Reproduce

Start up Jupyter Lab in an environment which requires an HTTP proxy to connect, with that proxy URL set in http_proxy.

Expected behavior

Lab connects to PyPI through the proxy.

Very simple fix

All that needs to be done is to add http_proxy/https_proxy to the logic for obtaining a proxy URL. The previously-linked discussion from the Gitlab engineering blog has some strong recommendations for the use (or lack of) of the uppercase form. Since Lab is already using the uppercase form, it could potentially break things if removed.

@jgoodson jgoodson added the bug label May 6, 2024
@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to new issues that need triage label May 6, 2024
Copy link

welcome bot commented May 6, 2024

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants