(original) (raw)
changeset: 78017:ebd37273e0fe branch: 3.2 parent: 78012:ea670d71a36d user: Senthil Kumaran senthil@uthcode.com date: Sun Jul 08 17:47:25 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 ea670d71a36d -r ebd37273e0fe Lib/test/test_urllib.py --- a/Lib/test/test_urllib.py Sun Jul 08 17:36:14 2012 -0400 +++ b/Lib/test/test_urllib.py Sun Jul 08 17:47:25 2012 -0700 @@ -1246,11 +1246,6 @@ # ftp.close() - 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 ea670d71a36d -r ebd37273e0fe Lib/urllib/request.py --- a/Lib/urllib/request.py Sun Jul 08 17:36:14 2012 -0400 +++ b/Lib/urllib/request.py Sun Jul 08 17:47:25 2012 -0700 @@ -181,7 +181,6 @@ origin_req_host=None, unverifiable=False): # 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 ea670d71a36d -r ebd37273e0fe Misc/NEWS --- a/Misc/NEWS Sun Jul 08 17:36:14 2012 -0400 +++ b/Misc/NEWS Sun Jul 08 17:47:25 2012 -0700 @@ -87,11 +87,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 #14990: Correctly fail with SyntaxError on invalid encoding declaration./senthil@uthcode.com