[python] honor proxy environment settings#24082
Merged
wing328 merged 1 commit intoJun 23, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
1 issue found across 6 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
139d8fc to
e64974b
Compare
Contributor
Author
02bf7e7 to
d79e860
Compare
Member
|
thanks for the PR cc @cbornet (2017/09) @tomplus (2018/10) @krjakbrjak (2023/02) @fa0311 (2023/10) @multani (2023/10) |
d79e860 to
0fb5275
Compare
Contributor
Author
|
Updated to regenerate all the other samples. |
Contributor
Author
|
Sent #24092 to fix the unrelated failures which seem to date back to 2023. |
Member
|
merged those. please update this PR with the latest master when you've time |
0fb5275 to
ae4ea4f
Compare
Contributor
Author
Done. |
wing328
reviewed
Jun 23, 2026
ae4ea4f to
5324086
Compare
urllib3 does not read proxy environment variables, so generated clients require users to copy them into Configuration.proxy. 97e079f added no_proxy handling, but 01ed597 replaced the Python templates without carrying it forward. Resolve scheme-specific proxy and no-proxy defaults through urllib.request while preserving explicit empty values as opt-outs. Match domain, port, IPv4 CIDR, and IPv6 CIDR bypass entries without adding requests to generated clients.
5324086 to
4d74f03
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The default
urllib3client does not read proxy environment variables,so generated clients require users to copy them into
Configuration.proxy. 97e079f addedno_proxyhandling, but01ed597 replaced the Python templates without carrying it forward.
Read scheme-specific proxies and
no_proxyfrom the standard library'senvironment proxy configuration. Explicit empty values remain opt-outs,
and bypass matching covers domains, ports, IPv4 CIDRs, and IPv6 CIDRs
without adding
requestsas a generated dependency.This is limited to the synchronous
urllib3client. The async backendshave separate proxy implementations.
Fixes #6786.
Partially addresses #20226.