Skip to content

gh-150046: Pass -E to subprocesses from check_add_python_opts#150089

Open
pradyunsg wants to merge 2 commits into
python:mainfrom
pradyunsg:fixup-test_add_python_opts
Open

gh-150046: Pass -E to subprocesses from check_add_python_opts#150089
pradyunsg wants to merge 2 commits into
python:mainfrom
pradyunsg:fixup-test_add_python_opts

Conversation

@pradyunsg
Copy link
Copy Markdown
Member

@pradyunsg pradyunsg commented May 19, 2026

Avoid the runtime environment from affecting the tests' behaviours, which checks the warning filters. The filters can be affected by various PYTHON* environment variables.

Avoid the runtime environment from affecting the tests' behaviours,
which notably checks the warning filters which can be controlled by
various environment variables.
@pradyunsg pradyunsg requested a review from vstinner May 19, 2026 15:04
@pradyunsg pradyunsg added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels May 19, 2026
@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label May 19, 2026
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this needs a blurb, as noted in the devguide, test are excluded since they are of little interest to end users.

Comment thread Lib/test/test_regrtest.py
proc = subprocess.run(cmd,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
text=True)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer passing env=support.make_clean_env() option rather than adding -E option, since the test checks that regrtest adds the -E option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants