This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients BreamoreBoy, Nidan, giampaolo.rodola, josiahcarlson, python-dev, stutzbach, vstinner, xdegaye
Date 2014-06-27.21:01:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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 asyncore should not convert the exception to a magic value (None).

Modifying the behaviour of recv() in asyncore breaks the backward compatibility. Returning None makes it harder to write asyncore code working on Python 3.4 and 3.5 (if the change is done in Python 3.5).

I prefer EWOULDBLOCK.patch approach: document the issue in asyncore documentation and handle BlockingIOError in asynchat.
Date User Action Args
2014-06-27 21:01:43vstinnersetrecipients: + vstinner, josiahcarlson, giampaolo.rodola, stutzbach, BreamoreBoy, xdegaye, python-dev, Nidan
2014-06-27 21:01:43vstinnersetmessageid: <>
2014-06-27 21:01:43vstinnerlinkissue16133 messages
2014-06-27 21:01:43vstinnercreate