Message224412
| Author |
vstinner |
| Recipients |
amrith, gps, pitrou, r.david.murray, vstinner |
| Date |
2014年07月31日.15:19:10 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1406819950.62.0.271046783507.issue22114@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Instead of just catching EAGAIN, you can catch BlockingIOError. In Python 2.7, it means catching: (EAGAIN, EALREADY, EINPROGRESS, EWOULDBLOCK) errors.
I made a similar change in asyncore recently:
---
changeset: 91833:d422062d7d36
branch: 2.7
parent: 91830:841cdb6145e9
user: Victor Stinner <victor.stinner@gmail.com>
date: Thu Jul 24 19:15:00 2014 +0200
files: Doc/library/asyncore.rst Lib/asynchat.py Lib/test/test_asynchat.py Misc/NEWS
description:
Issue #16133: The asynchat.async_chat.handle_read() method now ignores
socket.error() exceptions with blocking I/O errors: EAGAIN, EALREADY,
EINPROGRESS, or EWOULDBLOCK. Initial patch written by Xavier de Gaye.
---
This issue is another reason to not use eventlet with monkey-patching :-) It's time to switch to asyncio (trollius for Python 2)! |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年07月31日 15:19:10 | vstinner | set | recipients:
+ vstinner, pitrou, gps, r.david.murray, amrith |
| 2014年07月31日 15:19:10 | vstinner | set | messageid: <1406819950.62.0.271046783507.issue22114@psf.upfronthosting.co.za> |
| 2014年07月31日 15:19:10 | vstinner | link | issue22114 messages |
| 2014年07月31日 15:19:10 | vstinner | create |
|