(original) (raw)
changeset: 78018:a4bdb637d818 parent: 78016:a809c6ffa332 parent: 78017:ebd37273e0fe user: Senthil Kumaran senthil@uthcode.com date: Sun Jul 08 18:00:47 2012 -0700 files: Lib/test/test_urllib.py Lib/urllib/request.py Misc/NEWS description: revert the changes done for issue14826 - quoting witin Request is not desirable. diff -r a809c6ffa332 -r a4bdb637d818 Lib/test/test_urllib.py --- a/Lib/test/test_urllib.py Sun Jul 08 16:04:03 2012 -0700 +++ b/Lib/test/test_urllib.py Sun Jul 08 18:00:47 2012 -0700 @@ -1272,11 +1272,6 @@ request.method = 'HEAD' self.assertEqual(request.get_method(), 'HEAD') - def test_quote_url(self): - Request = urllib.request.Request - request = Request("http://www.python.org/foo bar") - self.assertEqual(request.full_url, "http://www.python.org/foo%20bar") - def test_main(): support.run_unittest( diff -r a809c6ffa332 -r a4bdb637d818 Lib/urllib/request.py --- a/Lib/urllib/request.py Sun Jul 08 16:04:03 2012 -0700 +++ b/Lib/urllib/request.py Sun Jul 08 18:00:47 2012 -0700 @@ -264,7 +264,6 @@ method=None): # unwrap('') --> 'type://host/path' self.full_url = unwrap(url) - self.full_url = quote(self.full_url, safe="%/:=&?~#+!$,;'@()*[]|") self.full_url, self.fragment = splittag(self.full_url) self.data = data self.headers = {} diff -r a809c6ffa332 -r a4bdb637d818 Misc/NEWS --- a/Misc/NEWS Sun Jul 08 16:04:03 2012 -0700 +++ b/Misc/NEWS Sun Jul 08 18:00:47 2012 -0700 @@ -31,11 +31,6 @@ Library ------- -- Issue #14826: Quote urls in urllib.request.Request similar to how they - are quoted by urllib.request.URLopener. Allows urls to spaces in them to work - transparently with urllib.request.urlopen(...). Patch contributed by Stephen - Thorne. - - Issue #5931: wsgiref environ variable SERVER_SOFTWARE will specify an implementation specific term like Cpython, Jython instead of generic "Python"/senthil@uthcode.com