summaryrefslogtreecommitdiffstats
path: root/Lib/cgi.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2010-03-17 20:05:11 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2010-03-17 20:05:11 (GMT)
commit78c1871d2171b091d7249af63a4b5e3a927c0bc2 (patch)
tree43a34ea07dd9c26baf1e7b02ddf011e4d9bf82c8 /Lib/cgi.py
parent945a8ba635e2f46de0c883771f2a4b3fa1bd9df4 (diff)
downloadcpython-78c1871d2171b091d7249af63a4b5e3a927c0bc2.zip
cpython-78c1871d2171b091d7249af63a4b5e3a927c0bc2.tar.gz
cpython-78c1871d2171b091d7249af63a4b5e3a927c0bc2.tar.bz2
Fix and check cgi module deprecation warnings. Revert an unwanted rename in test_import.
Diffstat (limited to 'Lib/cgi.py')
-rwxr-xr-xLib/cgi.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/cgi.py b/Lib/cgi.py
index db10a62..310dc02 100755
--- a/Lib/cgi.py
+++ b/Lib/cgi.py
@@ -45,10 +45,10 @@ from warnings import filterwarnings, catch_warnings, warn
with catch_warnings():
if sys.py3kwarning:
filterwarnings("ignore", ".*mimetools has been removed",
- DeprecationWarning)
+ DeprecationWarning)
+ filterwarnings("ignore", ".*rfc822 has been removed",
+ DeprecationWarning)
import mimetools
- if sys.py3kwarning:
- filterwarnings("ignore", ".*rfc822 has been removed", DeprecationWarning)
import rfc822
try:
@@ -180,8 +180,8 @@ def parse(fp=None, environ=os.environ, keep_blank_values=0, strict_parsing=0):
def parse_qs(qs, keep_blank_values=0, strict_parsing=0):
"""Parse a query given as a string argument."""
- warn("cgi.parse_qs is deprecated, use urlparse.parse_qs \
- instead", PendingDeprecationWarning, 2)
+ warn("cgi.parse_qs is deprecated, use urlparse.parse_qs instead",
+ PendingDeprecationWarning, 2)
return urlparse.parse_qs(qs, keep_blank_values, strict_parsing)