Message303397
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. |
|
Date |
User |
Action |
Args |
2017-09-30 07:03:11 | martin.panter | set | recipients:
+ martin.panter, vstinner, xdegaye, cstratak, Cornelius Diekmann |
2017-09-30 07:03:11 | martin.panter | set | messageid: <1506754991.5.0.213398074469.issue31158@psf.upfronthosting.co.za> |
2017-09-30 07:03:11 | martin.panter | link | issue31158 messages |
2017-09-30 07:03:11 | martin.panter | create | |
|