]> granicus.if.org Git - python/commitdiff
Issue #1664: Make nntplib IPv6-capable. Patch by Derek Morr.
authorAntoine Pitrou <solipsis@pitrou.net>
Thu, 14 May 2009 21:22:08 +0000 (21:22 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Thu, 14 May 2009 21:22:08 +0000 (21:22 +0000)
(Unfortunately, nntplib doesn't have a test suite)

Lib/nntplib.py
Misc/ACKS
Misc/NEWS

index cc51d1da8225045823b17ca276ba990eecd4c957..f519b06e55b0fbcbda7c29f5f0bfe94260139fbf 100644 (file)
@@ -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()
index 5cae037fac4b253e49c48a17df1f501998290b97..abcad74cb86cf0179c63b25273c05ed0391dcdfd 100644 (file)
--- 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
index 5d7a81ea5c62121566d49265e624d70db8df11df..58f381b45d4edff2f1130d2f94669330a7217657 100644 (file)
--- 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.