[Python-checkins] r84285 - in python/branches/release31-maint: Lib/asyncore.py Misc/NEWS

giampaolo.rodola python-checkins at python.org
Mon Aug 23 23:56:11 CEST 2010


Author: giampaolo.rodola
Date: Mon Aug 23 23:56:11 2010
New Revision: 84285

Log:
Merged revisions 84284 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r84284 | giampaolo.rodola | 2010-08-23 23:53:41 +0200 (lun, 23 ago 2010) | 1 line
  
  fix issue 658749: correctly interprets asyncore's windows errors on connect()
........


Modified:
   python/branches/release31-maint/   (props changed)
   python/branches/release31-maint/Lib/asyncore.py
   python/branches/release31-maint/Misc/NEWS

Modified: python/branches/release31-maint/Lib/asyncore.py
==============================================================================
--- python/branches/release31-maint/Lib/asyncore.py	(original)
+++ python/branches/release31-maint/Lib/asyncore.py	Mon Aug 23 23:56:11 2010
@@ -51,7 +51,7 @@
 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 @@
     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/release31-maint/Misc/NEWS
==============================================================================
--- python/branches/release31-maint/Misc/NEWS	(original)
+++ python/branches/release31-maint/Misc/NEWS	Mon Aug 23 23:56:11 2010
@@ -95,6 +95,9 @@
 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.)
 


More information about the Python-checkins mailing list