Martin Panter <vadmium...@gmail.com> added the comment:

I prefer Cornelius’s current proposal (rev 4f8137b) because it fixes both 
sites, rather than just patching the immediate problem site.

I don’t think read(1) is a big problem, just less efficient. But if you prefer 
to do larger reads, that should be fine too. You could even use 
os.fdopen(...).readline(), which would use BufferedReader. It is not 
documented, but BufferedReader should do large reads and return the line 
without waiting to fill its internal buffer.

FWIW I think it would be okay to remove the “chunked output” test. It isn’t 
exercising the “pty” module any more than the “Writing to slave_fd” test above 
it. All we need to do is verify that the “master_open” function returns a PTY 
master and that “slave_open” returns the corresponding slave terminal file 
descriptor. Checking “isatty” and sending one line of data through seems 
sufficient.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31158>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to