[Python-checkins] cpython (merge 3.2 -> default): revert the changes done for issue14826 - quoting witin Request is not desirable.
senthil.kumaran
python-checkins at python.org
Mon Jul 9 03:00:09 CEST 2012
http://hg.python.org/cpython/rev/a4bdb637d818
changeset: 78018:a4bdb637d818
parent: 78016:a809c6ffa332
parent: 78017:ebd37273e0fe
user: Senthil Kumaran <senthil at uthcode.com>
date: Sun Jul 08 18:00:47 2012 -0700
summary:
revert the changes done for issue14826 - quoting witin Request is not desirable.
files:
Lib/test/test_urllib.py | 5 -----
Lib/urllib/request.py | 1 -
Misc/NEWS | 5 -----
3 files changed, 0 insertions(+), 11 deletions(-)
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -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 --git a/Lib/urllib/request.py b/Lib/urllib/request.py
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -264,7 +264,6 @@
method=None):
# unwrap('<URL:type://host/path>') --> '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 --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -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"
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list