summaryrefslogtreecommitdiffstats
path: root/Lib/cgi.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2008-06-18 20:49:58 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2008-06-18 20:49:58 (GMT)
commit1afc1696167547a5fa101c53e5a3ab4717f8852c (patch)
treee989e72e71530d892214562785df7e11f84c1111 /Lib/cgi.py
parenta656d2cd8984f1ecb5a7e2cd09a18f72452f2b78 (diff)
downloadcpython-1afc1696167547a5fa101c53e5a3ab4717f8852c.zip
cpython-1afc1696167547a5fa101c53e5a3ab4717f8852c.tar.gz
cpython-1afc1696167547a5fa101c53e5a3ab4717f8852c.tar.bz2
Make a new urllib package .
It consists of code from urllib, urllib2, urlparse, and robotparser. The old modules have all been removed. The new package has five submodules: urllib.parse, urllib.request, urllib.response, urllib.error, and urllib.robotparser. The urllib.request.urlopen() function uses the url opener from urllib2. Note that the unittests have not been renamed for the beta, but they will be renamed in the future. Joint work with Senthil Kumaran.
Diffstat (limited to 'Lib/cgi.py')
-rwxr-xr-xLib/cgi.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/cgi.py b/Lib/cgi.py
index 5b8e40f..d0a2c61 100755
--- a/Lib/cgi.py
+++ b/Lib/cgi.py
@@ -35,7 +35,7 @@ from operator import attrgetter
from io import StringIO
import sys
import os
-import urllib
+import urllib.parse
import email.parser
__all__ = ["MiniFieldStorage", "FieldStorage",
@@ -216,8 +216,8 @@ def parse_qsl(qs, keep_blank_values=0, strict_parsing=0):
else:
continue
if len(nv[1]) or keep_blank_values:
- name = urllib.unquote(nv[0].replace('+', ' '))
- value = urllib.unquote(nv[1].replace('+', ' '))
+ name = urllib.parse.unquote(nv[0].replace('+', ' '))
+ value = urllib.parse.unquote(nv[1].replace('+', ' '))
r.append((name, value))
return r