[issue25476] close() behavior on non-blocking BufferedIO objects with sockets

eryksun report at bugs.python.org
Mon Oct 26 03:46:54 EDT 2015


eryksun added the comment:

Per issue 16597, when an exception occurs in flush(), the file is closed anyway. You'd have to check the exception and only skip to the end for EWOULDBLOCK or EAGAIN. That way you're not introducing a regression for ENOSPC and other exceptions for which retrying will just repeatedly fail. 

I'm adding 2.7 to keep the io module consistent; however, socket.makefile in 2.7 doesn't use the io module.

----------
nosy: +eryksun
versions: +Python 2.7, Python 3.4, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25476>
_______________________________________


More information about the Python-bugs-list mailing list