Message305750
I don't know which part of _WindowsConsoleIO.write() fails to handle empty bytes string, but the simplest and the most efficient way to fix this bug it to add an explicit check for zero length at the begin of this method and return Python integer 0 in this case.
The test should check that sys.stdout.buffer.write(b''), sys.stdout.buffer.write(b'') and sys.stdout.buffer.raw.write(b'') return 0 (the latter to checks should be performed only if the corresponding buffer and raw attributes exist). There are special tests for WindowsConsoleIO, it would be nice to add an explicit test here too. |
|
Date |
User |
Action |
Args |
2017-11-07 13:04:56 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, paul.moore, vstinner, tim.golden, zach.ware, steve.dower, Guillaume Aldebert |
2017-11-07 13:04:56 | serhiy.storchaka | set | messageid: <1510059896.19.0.213398074469.issue31966@psf.upfronthosting.co.za> |
2017-11-07 13:04:56 | serhiy.storchaka | link | issue31966 messages |
2017-11-07 13:04:56 | serhiy.storchaka | create | |
|