[issue26292] Raw I/O writelines() broken for non-blocking I/O

2019-10-10 Thread STINNER Victor
STINNER Victor added the comment: I close this issue as duplicate of bpo-13322 which is older and has a longer history. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> buffered read() and write() does not raise BlockingIOError

[issue26292] Raw I/O writelines() broken for non-blocking I/O

2016-07-04 Thread raylu
Changes by raylu : -- nosy: +raylu ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue26292] Raw I/O writelines() broken for non-blocking I/O

2016-06-20 Thread Martin Panter
Martin Panter added the comment: Here is a patch documenting that RawIOBase.writelines() is undefined for partial writes and blocking errors, as mentioned in (1) above. The alternative of requiring write() to be retried would IMO be unfair to existing writelines() implementations. It also

[issue26292] Raw I/O writelines() broken for non-blocking I/O

2016-06-12 Thread Martin Panter
Martin Panter added the comment: 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

[issue26292] Raw I/O writelines() broken for non-blocking I/O

2016-02-11 Thread STINNER Victor
Changes by STINNER Victor : -- title: Raw I/O writelines() broken -> Raw I/O writelines() broken for non-blocking I/O ___ Python tracker

[issue26292] Raw I/O writelines() broken

2016-02-05 Thread Martin Panter
Martin Panter added the comment: For BufferedIOBase, the documentation says write() will not return a short number of bytes, so I don’t see how writelines() is a problem there. For TextIOBase, the documentation is not so clear

[issue26292] Raw I/O writelines() broken

2016-02-05 Thread STINNER Victor
STINNER Victor added the comment: "(it's probably broken with non-blocking streams too, for the same reason)" Yes it is :-) We hitted this issue on eventlet when I changed the socket.send() method in eventlet 0.18 to stop sending data on partial write, whereas eventlet < 0.18 used a loop to

[issue26292] Raw I/O writelines() broken

2016-02-05 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +pitrou versions: +Python 3.5 ___ Python tracker ___

[issue26292] Raw I/O writelines() broken

2016-02-05 Thread STINNER Victor
New submission from STINNER Victor: Copy of Antoine Pitrou's email (sent in 2012 ;-): https://mail.python.org/pipermail/python-dev/2012-August/121396.html Hello, I was considering a FileIO.writelines() implementation based on writev() and I noticed that the current RawIO.writelines()

[issue26292] Raw I/O writelines() broken

2016-02-05 Thread STINNER Victor
STINNER Victor added the comment: > Is deprecating RawIOBase.writelines() an option, and only recommending > BufferedIOBase.writelines() and TextIOBase.writelines()? IMHO the problem is the same for other classes. -- ___ Python tracker

[issue26292] Raw I/O writelines() broken

2016-02-05 Thread Martin Panter
Martin Panter added the comment: Is deprecating RawIOBase.writelines() an option, and only recommending BufferedIOBase.writelines() and TextIOBase.writelines()? Otherwise, I think it would make most sense to keep retrying until all the data is written. This mirrors how I understand readline()

[issue26292] Raw I/O writelines() broken

2016-02-05 Thread Jakub Stasiak
Changes by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker ___ ___