diff options
-rw-r--r-- | Lib/asyncore.py | 6 | ||||
-rw-r--r-- | Misc/NEWS | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/Lib/asyncore.py b/Lib/asyncore.py index 7b922a9..7f06e43 100644 --- a/Lib/asyncore.py +++ b/Lib/asyncore.py @@ -51,7 +51,7 @@ import socket import sys import time import os -from errno import EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, \ +from errno import EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, EINVAL, \ ENOTCONN, ESHUTDOWN, EINTR, EISCONN, EBADF, ECONNABORTED, errorcode try: @@ -333,8 +333,8 @@ class dispatcher: def connect(self, address): self.connected = False err = self.socket.connect_ex(address) - # XXX Should interpret Winsock return values - if err in (EINPROGRESS, EALREADY, EWOULDBLOCK): + if err in (EINPROGRESS, EALREADY, EWOULDBLOCK) \ + or err == EINVAL and os.name in ('nt', 'ce'): return if err in (0, EISCONN): self.addr = address @@ -95,6 +95,9 @@ C-API Library ------- +- Issue #658749: asyncore's connect() method now correctly interprets winsock + errors. + - Issue #9214: Set operations on KeysView or ItemsView in the collections module now correctly return a set. (Patch by Eli Bendersky.) |