[issue16133] asyncore.dispatcher.recv doesn't handle EAGAIN / EWOULDBLOCK

Xavier de Gaye report at bugs.python.org
Fri May 10 11:22:14 CEST 2013


Xavier de Gaye added the comment:

> Deciding what's best to do at this point without breaking existent
> code is not easy, that is why I think that on python <= 3.3 we
> should fix *asynchat* in order to take EAGAIN/EWOULDBLOCK into
> account and leave asyncore's recv() alone.

IMHO for all python versions, asynchat should be fixed and recv() left
unchanged raising OSError with EAGAIN/EWOULDBLOCK. With the proposed
change on recv(), asyncore users would need to handle this new
None returned value anyway, instead of handling the exception which is
much more explicit.

The attached patch does this on the default branch.

----------
Added file: http://bugs.python.org/file30193/EWOULDBLOCK.patch

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


More information about the Python-bugs-list mailing list