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

2014-07-24 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- Removed message: http://bugs.python.org/msg172160 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16133 ___

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

2014-07-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset b7f144d14798 by Victor Stinner in branch '3.4': Issue #16133: The asynchat.async_chat.handle_read() method now ignores http://hg.python.org/cpython/rev/b7f144d14798 New changeset aa150c7a5d24 by Victor Stinner in branch 'default': (Merge 3.4) Issue

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

2014-07-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset d422062d7d36 by Victor Stinner in branch '2.7': Issue #16133: The asynchat.async_chat.handle_read() method now ignores http://hg.python.org/cpython/rev/d422062d7d36 -- ___ Python tracker

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

2014-07-24 Thread STINNER Victor
STINNER Victor added the comment: I modified EWOULDBLOCK.patch to use BlockingIOError on Python 3 and I added a unit test. I also added EALREADY and EINPROGRESS which are used by the BlockingIOError in Python 3, just in case. Thanks Xavier for your patch, sorry for the delay. --

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

2014-06-27 Thread STINNER Victor
STINNER Victor added the comment: EWOULDBLOCK.patch: asyncio ignores BlockingIOError on sock.recv(), except BlockingIOError: is more portable and future proof than _RETRY = frozenset((EWOULDBLOCK, EAGAIN)). Except of that, EWOULDBLOCK.patch change looks correct. -- nosy: +haypo

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

2014-06-27 Thread STINNER Victor
STINNER Victor added the comment: Modifying recv() to return None doesn't look correct. I read it as: you should always use recv() output, except if the result is None: in this case, do nothing. In Python, we use exceptions for that. BUT in fact, sock.recv() already raises an exception, so

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

2014-06-27 Thread STINNER Victor
STINNER Victor added the comment: See also the issue #15982 which is the exactly the same on Windows. (By the way, the asyncore module has been marked as deprecated in Python 3.4 in favor of asyncio, and this issue is already solved in asyncio.) --

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

2014-06-15 Thread Mark Lawrence
Mark Lawrence added the comment: Could we have a review of the latest path from Xavier please. Aside, msg172160 add Windows project file for _sha3 module. I choose to build _sha3 as a sparat module as it's rather large (190k for AMD64)., presumably Christian mistyped an issue number?

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

2013-05-10 Thread Xavier de Gaye
Xavier de Gaye added the comment: For the reson why read() must still check for EWOULDBLOCK even though after select() has reported a file descriptor ready for reading, see the BUGS section of select linux man page, which says: Under Linux, select() may report a socket file descriptor as

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

2013-05-10 Thread Xavier de Gaye
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

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

2013-05-01 Thread Nidan
Nidan added the comment: Why should asynchat.handle_read care about closed sockets if asyncore.recv does that already? Currently asynchat.handle_read handles empty strings from asycore.recv gracefully (by doing some unnecessary work aka executing the remainder of the function), it doesn't

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

2013-05-01 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: recv() returning an empty string has always been an alias for connection lost though, that is why it cannot be used and I was proposing returning a new type in Python 3.4. Point is we're paying a bad design decision: asyncore shouldn't have asked the user

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

2013-04-26 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I confirm I can reproduce this issue also in pyftpdlib: https://code.google.com/p/pyftpdlib/issues/detail?id=255 Current proposed patch returning '' is not ideal as for asynchat '' is an alias for 'connection lost'. In summary recv() in case of EAGAIN should

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

2013-04-26 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Patch is in attachment. I'm a bit worried about Python versions 3.4 because this kinds of breaks backward compatibility as recv() is not expected to return None but I see no other saner solution. -- keywords: +patch Added file:

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

2012-10-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6a1d8e78b23d by Christian Heimes in branch 'default': Issue #16133: add Windows project file for _sha3 module. I choose to build _sha3 as a sparat module as it's rather large (190k for AMD64). http://hg.python.org/cpython/rev/6a1d8e78b23d

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

2012-10-04 Thread Nidan
New submission from Nidan: I recently had lots of the following exception: error: uncaptured python exception, closing channel servercore_persistent.ConnectionHandler connected 127.0.0.1:53609 at 0x8d27eec (class 'socket.error':[Errno 11] Resource temporarily unavailable

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

2012-10-04 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +giampaolo.rodola, josiahcarlson, stutzbach versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16133 ___