From eed30d830b26d325d04630cd5ee3af22f4d234da Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Thu, 14 May 2009 21:22:08 +0000 Subject: [PATCH] Issue #1664: Make nntplib IPv6-capable. Patch by Derek Morr. (Unfortunately, nntplib doesn't have a test suite) --- Lib/nntplib.py | 3 +-- Misc/ACKS | 1 + Misc/NEWS | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Lib/nntplib.py b/Lib/nntplib.py index cc51d1da822..f519b06e55b 100644 --- a/Lib/nntplib.py +++ b/Lib/nntplib.py @@ -109,8 +109,7 @@ class NNTP: """ self.host = host self.port = port - self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - self.sock.connect((self.host, self.port)) + self.sock = socket.create_connection((host, port)) self.file = self.sock.makefile('rb') self.debugging = 0 self.welcome = self.getresp() diff --git a/Misc/ACKS b/Misc/ACKS index 5cae037fac4..abcad74cb86 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -492,6 +492,7 @@ Doug Moen The Dragon De Monsyne Skip Montanaro Paul Moore +Derek Morr James A Morrison Sjoerd Mullender Sape Mullender diff --git a/Misc/NEWS b/Misc/NEWS index 5d7a81ea5c6..58f381b45d4 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -293,6 +293,8 @@ Core and Builtins Library ------- +- Issue #1664: Make nntplib IPv6-capable. Patch by Derek Morr. + - Issue #6022: a test file was created in the current working directory by test_get_outputs in Distutils.