[Python-checkins] r84284 - in python/branches/py3k: Lib/asyncore.py Misc/NEWS
giampaolo.rodola
python-checkins at python.org
Mon Aug 23 23:53:41 CEST 2010
Author: giampaolo.rodola
Date: Mon Aug 23 23:53:41 2010
New Revision: 84284
Log:
fix issue 658749: correctly interprets asyncore's windows errors on connect()
Modified:
python/branches/py3k/Lib/asyncore.py
python/branches/py3k/Misc/NEWS
Modified: python/branches/py3k/Lib/asyncore.py
==============================================================================
--- python/branches/py3k/Lib/asyncore.py (original)
+++ python/branches/py3k/Lib/asyncore.py Mon Aug 23 23:53:41 2010
@@ -53,7 +53,7 @@
import warnings
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:
@@ -337,8 +337,8 @@
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
Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS (original)
+++ python/branches/py3k/Misc/NEWS Mon Aug 23 23:53:41 2010
@@ -123,6 +123,9 @@
Library
-------
+- Issue #658749: asyncore's connect() method now correctly interprets winsock
+ errors;
+
- Issue #9501: Fixed logging regressions in cleanup code.
- Fix functools.total_ordering() to actually work.
More information about the Python-checkins
mailing list