cpython: d34fdd1736f2 (original) (raw)

Mercurial > cpython

changeset 99957:d34fdd1736f2 2.7

Issue #6500: Fixed infinite recursion in urllib2.Request.__getattr__(). [#6500]

Serhiy Storchaka storchaka@gmail.com
date Mon, 18 Jan 2016 10:35:40 +0200
parents 668827be66d6
children f602dfd35cd4
files Lib/test/test_urllib2.py Lib/urllib2.py Misc/NEWS
diffstat 3 files changed, 10 insertions(+), 5 deletions(-)[+] [-] Lib/test/test_urllib2.py 5 Lib/urllib2.py 8 Misc/NEWS 2

line wrap: on

line diff

--- a/Lib/test/test_urllib2.py +++ b/Lib/test/test_urllib2.py @@ -1350,6 +1350,11 @@ class RequestTests(unittest.TestCase): req = Request(url) self.assertEqual(req.get_full_url(), url)

+ def test_HTTPError_interface(self): """ Issue 13211 reveals that HTTPError didn't implement the URLError

--- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -248,11 +248,9 @@ class Request: # methods getting called in a non-standard order. this may be # too complicated and/or unnecessary. # XXX should the __r_XXX attributes be public?

def get_method(self):

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -39,6 +39,8 @@ Core and Builtins Library ------- +- Issue #6500: Fixed infinite recursion in urllib2.Request.getattr(). +