Skip to content

Commit

Permalink
Fix urlparse imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémy HUBSCHER committed Jan 30, 2017
1 parent 78a102b commit 4c36396
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions kinto/core/statsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
statsd_module = None

from pyramid.exceptions import ConfigurationError
import urlparse
from urllib.parse import urlparse

from kinto.core import utils

Expand Down Expand Up @@ -53,7 +53,7 @@ def load_from_config(config):

settings = config.get_settings()
uri = settings['statsd_url']
uri = urlparse.urlparse(uri)
uri = urlparse(uri)

if settings['project_name'] != '':
prefix = settings['project_name']
Expand Down
4 changes: 2 additions & 2 deletions kinto/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import time
from base64 import b64decode, b64encode
from binascii import hexlify
import urlparse
from urllib.parse import unquote
from enum import Enum

import ujson as json # NOQA
Expand Down Expand Up @@ -343,7 +343,7 @@ def build_response(response, request):
:param request: the request that was used to get the response.
"""
dict_obj = {}
dict_obj['path'] = urlparse.unquote(request.path)
dict_obj['path'] = unquote(request.path)
dict_obj['status'] = response.status_code
dict_obj['headers'] = dict(response.headers)

Expand Down
2 changes: 1 addition & 1 deletion tests/core/resource/test_pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from base64 import b64encode, b64decode

import mock
from urlparse import parse_qs, urlparse
from urllib.parse import parse_qs, urlparse
from pyramid.httpexceptions import HTTPBadRequest

from kinto.core.utils import json
Expand Down

0 comments on commit 4c36396

Please sign in to comment.