Fix error message: says stdout but checks stdin#3398
Open
bysiber wants to merge 1 commit intopython-trio:mainfrom
Open
Fix error message: says stdout but checks stdin#3398bysiber wants to merge 1 commit intopython-trio:mainfrom
bysiber wants to merge 1 commit intopython-trio:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (99.91763%) is below the target coverage (100.00000%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #3398 +/- ##
====================================================
- Coverage 100.00000% 99.91763% -0.08237%
====================================================
Files 128 128
Lines 19424 19424
Branches 1318 1318
====================================================
- Hits 19424 19408 -16
- Misses 0 12 +12
- Partials 0 4 +4
🚀 New features to boost your workflow:
|
The ValueError raised when stdin=subprocess.PIPE is used without nursery.start incorrectly says 'stdout=subprocess.PIPE'. This is confusing for users since the actual problem is with the stdin argument, not stdout.
62e1a78 to
3972342
Compare
A5rocks
approved these changes
Feb 20, 2026
Contributor
A5rocks
left a comment
There was a problem hiding this comment.
Thanks! Please fix the tests and add a newsfragment.
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.
Problem
In
_run_process(), whenstdin=subprocess.PIPEis passed without usingnursery.start, the error message incorrectly says:The condition checks
stdin is subprocess.PIPE, but the message refers tostdout. This sends users looking at the wrong argument.Fix
Changed
"stdout=subprocess.PIPE"to"stdin=subprocess.PIPE"in the error message so it matches the actual condition being checked.