8000 Switch to parse_qs() from urllib.parse · Dj0ulo/python-stdnum@c5d3bf4 · GitHub
[go: up one dir, main page]

Skip to content

Commit c5d3bf4

Browse files
committed
Switch to parse_qs() from urllib.parse
The function was removed from the cgi module in Python 3.8.
1 parent 8b5b07a commit c5d3bf4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

online_check/stdnum.wsgi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919

2020
"""Simple WSGI application to check numbers."""
2121

22-
import cgi
2322
import inspect
2423
import json
2524
import os
2625
import re
2726
import sys
27+
import urllib.parse
2828

2929

3030
sys.stdout = sys.stderr
@@ -97,7 +97,7 @@ def application(environ, start_response):
9797
_template = to_unicode(open(os.path.join(basedir, 'template.html'), 'rt').read())
9898
is_ajax = environ.get(
9999
'HTTP_X_REQUESTED_WITH', '').lower() == 'xmlhttprequest'
100-
parameters = cgi.parse_qs(environ.get('QUERY_STRING', ''))
100+
parameters = urllib.parse.parse_qs(environ.get('QUERY_STRING', ''))
101101
results = []
102102
number = ''
103103
if 'number' in parameters:

0 commit comments

Comments
 (0)
0