[PR #12238/24cb8c9c backport][3.14] Skip TLS-in-TLS warning when proxy is not HTTPS#12248
Merged
Dreamsorcerer merged 1 commit into3.14from Mar 16, 2026
Conversation
(cherry picked from commit 24cb8c9)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 3.14 #12248 +/- ##
==========================================
- Coverage 98.36% 98.35% -0.01%
==========================================
Files 131 131
Lines 45852 45854 +2
Branches 2493 2494 +1
==========================================
- Hits 45102 45101 -1
- Misses 571 574 +3
Partials 179 179
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
This is a backport of PR #12238 as merged into master (24cb8c9).
Summary
_warn_about_tls_in_tlswarning was firing for all HTTPS requests through any proxy, but TLS-in-TLS only applies when the proxy itself uses HTTPS.start_tlsupgrades a plain TCP connection, which is not TLS-in-TLS and works fine everywhere.req.proxy.schemeso the warning is only emitted when the proxy is actually HTTPS.Fixes #10683
Test plan
test_https_proxy_unsupported_tls_in_tlscovers the HTTPS-proxy case and should still pass (warning still fires for HTTPS proxies on old Python).