[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 seems out of place considering 
we don’t even have a RawIOBase.writeexactly() type of method.

--
keywords: +patch
Added file: http://bugs.python.org/file43488/writelines-doc.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 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.

--
versions: +Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com