[docs] [issue25586] socket.sendall broken when a socket has a timeout
STINNER Victor
report at bugs.python.org
Mon Nov 9 16:24:08 EST 2015
STINNER Victor added the comment:
I don't really understand why do even you consider the behaviour has a bug or a trap. On timeout, the most common behaviour is to give up on the whole client. I don't know code trying to resend the same data in case of timeout.
Describing the behaviour on the documentation helps, but no warning is need.
When you *read* data, it's different. It can be interesting to get the partial read.
--
For example, the asyncio.StreamReader.readexactly() coroutine raises an asyncio.IncompleteReadError exception which contains the partial data:
https://docs.python.org/dev/library/asyncio-stream.html#asyncio.StreamReader.readexactly
The HTTP client has a similar exception.
I proposed to add similar method to socket.socket which also raises a similar exception to return partial data: issue #1103213.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25586>
_______________________________________
More information about the docs
mailing list