Repository navigation
[py] Use ssl_proxy descriptor when initializing Proxy from raw dict - #18237
Merged
cgoldberg merged 2 commits intoOct 27, 2026
Merged
Conversation
Contributor
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
Setting self.sslProxy directly in Proxy.__init__ bypassed the ssl_proxy descriptor, preventing the proxy type compatibility check from running and failing to set proxyType to MANUAL when sslProxy was provided alone. Using self.ssl_proxy ensures the descriptor sets proxyType properly and validates compatibility.
saiyam-jain-dev
force-pushed
the
fix-proxy-raw-sslproxy
branch
from
October 25, 2026 06:47
4e8027e to
e6a8958
Compare
cgoldberg
self-requested a review
October 25, 2026 18:08
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.
Description
When initializing a
Proxyinstance from a dictionary, all proxy properties (http_proxy,o_proxy,proxy_autoconfig_url,auto_detect,socks_proxy, etc.) use their corresponding descriptor onProxy, exceptsslProxywhich directly assignedself.sslProxy = raw["sslProxy"].Setting
self.sslProxydirectly bypassed the_ProxyTypeDescriptor, causing two issues whensslProxyis supplied withouthttpProxy:proxy.proxy_typeremainedProxyType.UNSPECIFIEDinstead of transitioning toProxyType.MANUAL.o_capabilities()emitted{'proxyType': 'unspecified', ...}ando_bidi_dict()omittedsslProxycompletely._verify_proxy_type_compatibility) was skipped.This PR changes s
elf.sslProxy = raw["sslProxy"]toself.ssl_proxy = raw["sslProxy"]and adds tests to verifyproxy.proxy_typeis correctly set toMANUALand compatibility is enforced.Motivation and Context
Fixes unexpected
UNSPECIFIEDproxy type and missing proxy configuration when creating aProxyfrom a dictionary containingsslProxy.Types of changes
Checklist