Skip to content

🐛 fix(cli): drain verbose subprocess output without a worker thread#1098

Merged
henryiii merged 3 commits into
pypa:mainfrom
henryiii:henryiii/fix/subprocess-log-thread
Jun 13, 2026
Merged

🐛 fix(cli): drain verbose subprocess output without a worker thread#1098
henryiii merged 3 commits into
pypa:mainfrom
henryiii:henryiii/fix/subprocess-log-thread

Conversation

@henryiii

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖

Remove the unnecessary ThreadPoolExecutor from the verbose subprocess logging path in run_subprocess. Since stderr is already merged into stdout via stderr=STDOUT, there is only one stream to drain — the thread provides no concurrency. Worse, concurrent.futures.wait() silently swallows any exception raised inside the submitted callable, so logging errors are hidden. Draining stdout inline is simpler and correctly propagates errors.

Refs #1097

henryiii added 3 commits June 13, 2026 01:51
The single-worker ThreadPoolExecutor in the verbose subprocess path added
complexity without benefit: stderr is merged into stdout so there is only
one stream, and concurrent.futures.wait() silently discards any exception
raised inside the submitted callable. Drain stdout inline instead.

Assisted-by: ClaudeCode:claude-sonnet-4.6
Assisted-by: ClaudeCode:claude-sonnet-4.6
Assisted-by: ClaudeCode:claude-opus-4.8
@henryiii henryiii marked this pull request as ready for review June 13, 2026 05:59
@henryiii henryiii merged commit d7076e2 into pypa:main Jun 13, 2026
59 checks passed
@henryiii henryiii deleted the henryiii/fix/subprocess-log-thread branch June 13, 2026 12:20
henryiii added a commit to henryiii/build that referenced this pull request Jun 14, 2026
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.

3 participants