]> granicus.if.org Git - python/commitdiff
Merged revisions 72662 via svnmerge from
authorAntoine Pitrou <solipsis@pitrou.net>
Fri, 15 May 2009 12:03:56 +0000 (12:03 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Fri, 15 May 2009 12:03:56 +0000 (12:03 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r72662 | antoine.pitrou | 2009-05-15 13:50:29 +0200 (ven., 15 mai 2009) | 3 lines

  Issue #1655: Make imaplib IPv6-capable. Patch by Derek Morr.
........

Lib/imaplib.py
Misc/NEWS

index 7807e8f3b8dd3e154fd96587ee8365aa06393365..f13350e3223d98cadca32f33649302082c609041 100644 (file)
@@ -226,8 +226,7 @@ class IMAP4:
         """
         self.host = host
         self.port = port
-        self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-        self.sock.connect((host, port))
+        self.sock = socket.create_connection((host, port))
         self.file = self.sock.makefile('rb')
 
 
@@ -1145,8 +1144,7 @@ else:
             """
             self.host = host
             self.port = port
-            self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-            self.sock.connect((host, port))
+            self.sock = socket.create_connection((host, port))
             self.sslobj = ssl.wrap_socket(self.sock, self.keyfile, self.certfile)
 
 
index 93b4aacfadf02c87b21fa6d44255fd0d0b35232c..23690c271be6f5f0231f9d06dfbcda855571f3f1 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -47,6 +47,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #1655: Make imaplib IPv6-capable. Patch by Derek Morr.
+
 - Issue #1664: Make nntplib IPv6-capable. Patch by Derek Morr.
 
 - Issue #5971: StreamHandler.handleError now swallows IOErrors which occur when