From: Antoine Pitrou Date: Fri, 15 May 2009 11:50:29 +0000 (+0000) Subject: Issue #1655: Make imaplib IPv6-capable. Patch by Derek Morr. X-Git-Tag: v2.7a1~1187 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52035a04abc8b75c1481064639150e4089cd80c7;p=python Issue #1655: Make imaplib IPv6-capable. Patch by Derek Morr. --- diff --git a/Lib/imaplib.py b/Lib/imaplib.py index 7807e8f3b8..f13350e322 100644 --- a/Lib/imaplib.py +++ b/Lib/imaplib.py @@ -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) diff --git a/Misc/NEWS b/Misc/NEWS index 109297ec8a..46e02fcfab 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -293,6 +293,8 @@ Core and Builtins Library ------- +- Issue #1655: Make imaplib IPv6-capable. Patch by Derek Morr. + - Issue #5918: Fix a crash in the parser module. - Issue #1664: Make nntplib IPv6-capable. Patch by Derek Morr.