Author martin.panter
Recipients jstasiak, martin.panter, pitrou, vstinner
Date 2016-06-13.02:21:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Victor, why did you change the title to specify non-blocking mode? I think blocking mode can also be handled at the same time.

I propose:

1. In existing versions (2.7, 3.5): Document that it is undefined what IOBase.writelines() will do if a write() call does a partial write, returns None, or encounters a blocking error. Explicitly document that BufferedIOBase.writelines() and TextIOBase.writelines() will completely write all the data passed, or raise an exception. Document that BlockingIOError.characters_written is undefined even for BufferedIOBase.writelines().

2. Commit my Issue 26721 change to socketserver, so that StreamRequestHandler.wfile implements BufferedIOBase instead of RawIOBase.

3. In a new version (3.6): Deprecate IOBase.writelines() and thus RawIOBase.writelines(), in favour of either using BufferedIOBase, or manually calling write(). Emit a DeprecationWarning, but add BufferedIOBase and TextIOBase implementations that do not emit the warning.

BufferedIOBase.writelines() could be fixed to report the correct BlockingIOError.characters_written value, but that could be handled as a separate bug if anyone cares.
Date User Action Args
2016-06-13 02:21:38martin.pantersetrecipients: + martin.panter, pitrou, vstinner, jstasiak
2016-06-13 02:21:37martin.pantersetmessageid: <>
2016-06-13 02:21:37martin.panterlinkissue26292 messages
2016-06-13 02:21:36martin.pantercreate