Remove obsolete XXX comment about non-blocking I/O

The comment suggested rewriting Popen._communicate() to use
non-blocking I/O on file objects now that Python 3's io module
is used instead of C stdio.

This is unnecessary - the current approach using select() to
detect ready fds followed by os.read()/os.write() is correct
and efficient. The selector already solves "when is data ready?"
so non-blocking mode would add complexity with no benefit.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Gregory P. Smith using claude.ai/code 2025-11-29 00:34:04 +00:00
parent a3e98a73be
commit 3c28ed6e93
No known key found for this signature in database

View file

@ -2655,9 +2655,6 @@ def _communicate(self, input, endtime, orig_timeout):
ready = selector.select(timeout) ready = selector.select(timeout)
self._check_timeout(endtime, orig_timeout, stdout, stderr) self._check_timeout(endtime, orig_timeout, stdout, stderr)
# XXX Rewrite these to use non-blocking I/O on the file
# objects; they are no longer using C stdio!
for key, events in ready: for key, events in ready:
if key.fileobj is self.stdin: if key.fileobj is self.stdin:
chunk = input_view[self._input_offset : chunk = input_view[self._input_offset :