Skip to content

[3.15] gh-148919: Make test_redirect_no_path independent of proxy environment variables (GH-148920) - #160846

Merged
orsenthil merged 1 commit into
python:3.15from
miss-islington:backport-d854380-3.15
Oct 28, 2026
Merged

orsenthil merged 1 commit into
python:3.15from
miss-islington:backport-d854380-3.15

Conversation

@miss-islington

Copy link
Copy Markdown
Contributor

test_redirect_encoding uses build_opener(), which installs the default
ProxyHandler, so it failed the same way when http_proxy was set. Move
the environment cleanup into a helper and use EnvironmentVarGuard.unset().

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com


(cherry picked from commit d854380)

Co-authored-by: sendaoYan yansendao@hygon.cn
Co-authored-by: Senthil Kumaran senthil@python.org
Co-authored-by: Claude Opus 5.5 noreply@anthropic.com

…ronment variables (pythonGH-148920)

* pythongh-148919: Make test_redirect_no_path independent of proxy environment variables

* pythongh-148919: Also make test_redirect_encoding independent of proxy env

test_redirect_encoding uses build_opener(), which installs the default
ProxyHandler, so it failed the same way when http_proxy was set.  Move
the environment cleanup into a helper and use EnvironmentVarGuard.unset().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------
(cherry picked from commit d854380)

Co-authored-by: sendaoYan <yansendao@hygon.cn>
Co-authored-by: Senthil Kumaran <senthil@python.org>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@orsenthil
orsenthil enabled auto-merge (squash) October 28, 2026 19:52
@orsenthil
orsenthil merged commit 1509a88 into python:3.15 Oct 28, 2026
61 checks passed
@miss-islington
miss-islington deleted the backport-d854380-3.15 branch October 28, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants