Commit 84fb4a89 authored by Kirill Smelkov's avatar Kirill Smelkov

Fix PendingDeprecationWarning about cgi.parse_qsl

I was running py.test based tests on a project which uses zodburi and
got many warnings:

	.../python2.7/site-packages/zodburi/resolvers.py:86: PendingDeprecationWarning: cgi.parse_qsl is deprecated, use urlparse.parse_qsl instead
	  kw = dict(parse_qsl(query))

Since for Python2 cig.parse_qsl was migrated to urlparse.parse_qsl in 2008:

	https://github.com/python/cpython/commit/c585df9476

it is safe to change to urlparse.parse_qsl unconditionally.
parent c59d6660
try: try:
from urllib.parse import parse_qsl from urllib.parse import parse_qsl
except ImportError: #pragma NO COVER except ImportError: #pragma NO COVER
from cgi import parse_qsl from urlparse import parse_qsl
try: try:
from urllib.parse import quote from urllib.parse import quote
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment