diff --git a/Lib/imaplib.py b/Lib/imaplib.py index 6469df2dcf0..df35cb14b02 100644 --- a/Lib/imaplib.py +++ b/Lib/imaplib.py @@ -222,9 +222,7 @@ class IMAP4: def _create_socket(self): - sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - sock.connect((self.host, self.port)) - return sock + return socket.create_connection((self.host, self.port)) def open(self, host = '', port = IMAP4_PORT): """Setup connection to remote server on "host:port" diff --git a/Misc/NEWS b/Misc/NEWS index 9173a72e0d5..d3f4177c656 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -23,6 +23,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.