Skip to content

tweak(sdist_configure): suppress setup.py stdout/stderr unless eval fails#888

Merged
arrdem merged 1 commit intomainfrom
arrdem/tweak-mask-setup-output
Mar 20, 2026
Merged

tweak(sdist_configure): suppress setup.py stdout/stderr unless eval fails#888
arrdem merged 1 commit intomainfrom
arrdem/tweak-mask-setup-output

Conversation

@arrdem
Copy link
Copy Markdown
Contributor

@arrdem arrdem commented Mar 20, 2026

Redirect stdout/stderr to temporary files during _parse_setup_py_requires's exec() so stray print() calls from evaluated setup.py files don't corrupt the JSON output on stdout. Captured output is replayed to stderr only when the evaluation fails, preserving debuggability.

cc @zbarsky-openai

Changes are visible to end-users: no

Test plan

  • Covered by existing test cases

🤖 Generated with Claude Code

Redirect stdout/stderr to temporary files during setup.py exec() so
stray print() calls don't corrupt the JSON output on stdout. The
captured output is only replayed to stderr if the evaluation fails.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@arrdem arrdem changed the title fix(sdist_configure): suppress setup.py stdout/stderr unless eval fails tweak(sdist_configure): suppress setup.py stdout/stderr unless eval fails Mar 20, 2026
Copy link
Copy Markdown
Contributor

@zbarsky-openai zbarsky-openai left a comment

Choose a reason for hiding this comment

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

thanks

@arrdem arrdem merged commit 28c9e13 into main Mar 20, 2026
4 checks passed
@arrdem arrdem deleted the arrdem/tweak-mask-setup-output branch March 20, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants