You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Factor out _flush_stdin() and _make_input_view() helpers
Extract common stdin preparation logic into shared helper functions
used by both _communicate_streams_posix() and Popen._communicate():
- _flush_stdin(stdin): Flush stdin, ignoring BrokenPipeError and
ValueError (for closed files)
- _make_input_view(input_data): Convert input data to a byte memoryview,
handling non-byte memoryviews by casting to "b" view
This ensures consistent behavior and makes the fixes for gh-134453
(memoryview) and gh-74389 (closed stdin) shared in one place.
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
0 commit comments