]> granicus.if.org Git - python/commitdiff
(Merge 3.2) Issue #12133: fix a ResourceWarning in urllib.request
authorVictor Stinner <victor.stinner@haypocalc.com>
Fri, 17 Jun 2011 12:02:18 +0000 (14:02 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Fri, 17 Jun 2011 12:02:18 +0000 (14:02 +0200)
AbstractHTTPHandler.do_open() of urllib.request closes the HTTP connection if
its getresponse() method fails with a socket error. Patch written by Ezio
Melotti.

1  2 
Lib/test/test_urllib2.py
Lib/urllib/request.py
Misc/NEWS

Simple merge
Simple merge
diff --cc Misc/NEWS
index 38850c7a51f3387a1774896690263faf0c600730,6cc0f03637d8ca026c24f4b2fc55ce5efcd3ea1b..630b8905912e92eb17611f2af7ea29db92810972
+++ b/Misc/NEWS
@@@ -193,9 -25,10 +193,13 @@@ Core and Builtin
  Library
  -------
  
+ - Issue #12133: AbstractHTTPHandler.do_open() of urllib.request closes the HTTP
+   connection if its getresponse() method fails with a socket error. Patch
+   written by Ezio Melotti.
 +- Issue #12240: Allow multiple setup hooks in packaging's setup.cfg files.
 +  Original patch by Erik Bray.
 +
  - Issue #9284: Allow inspect.findsource() to find the source of doctest
    functions.