diff options
| author | Tymur Maryokhin | 2014-12-04 15:47:42 +0100 | 
|---|---|---|
| committer | Tymur Maryokhin | 2014-12-04 15:47:42 +0100 | 
| commit | 95af92ca01435c32f4374d26eb448f964d77c81a (patch) | |
| tree | 7d2711f462f3c451d1afd779505c36d7020b2686 /rest_framework | |
| parent | d54c67d79d0f5661ef33d860efe80a4272e22b3e (diff) | |
| download | django-rest-framework-95af92ca01435c32f4374d26eb448f964d77c81a.tar.bz2 | |
Removed custom urlparse compat
Diffstat (limited to 'rest_framework')
| -rw-r--r-- | rest_framework/compat.py | 8 | ||||
| -rw-r--r-- | rest_framework/parsers.py | 3 | ||||
| -rw-r--r-- | rest_framework/relations.py | 2 | ||||
| -rw-r--r-- | rest_framework/templatetags/rest_framework.py | 2 | 
4 files changed, 5 insertions, 10 deletions
| diff --git a/rest_framework/compat.py b/rest_framework/compat.py index 91723b45..c58aa4ce 100644 --- a/rest_framework/compat.py +++ b/rest_framework/compat.py @@ -10,6 +10,7 @@ import inspect  from django.core.exceptions import ImproperlyConfigured  from django.utils.encoding import force_text +from django.utils.six.moves.urllib import parse as urlparse  from django.conf import settings  from django.utils import six  import django @@ -60,13 +61,6 @@ if 'guardian' in settings.INSTALLED_APPS:          pass -# urlparse compat import (Required because it changed in python 3.x) -try: -    from urllib import parse as urlparse -except ImportError: -    import urlparse - -  # UserDict moves in Python 3  try:      from UserDict import UserDict diff --git a/rest_framework/parsers.py b/rest_framework/parsers.py index 7b948362..3e3395c0 100644 --- a/rest_framework/parsers.py +++ b/rest_framework/parsers.py @@ -12,8 +12,9 @@ from django.http import QueryDict  from django.http.multipartparser import MultiPartParser as DjangoMultiPartParser  from django.http.multipartparser import MultiPartParserError, parse_header, ChunkIter  from django.utils import six +from django.utils.six.moves.urllib import parse as urlparse  from django.utils.encoding import force_text -from rest_framework.compat import etree, yaml, urlparse +from rest_framework.compat import etree, yaml  from rest_framework.exceptions import ParseError  from rest_framework import renderers  import json diff --git a/rest_framework/relations.py b/rest_framework/relations.py index b889acc8..d0cd3154 100644 --- a/rest_framework/relations.py +++ b/rest_framework/relations.py @@ -1,5 +1,4 @@  from django.utils.encoding import smart_text -from rest_framework.compat import urlparse  from rest_framework.fields import get_attribute, empty, Field  from rest_framework.reverse import reverse  from rest_framework.utils import html @@ -7,6 +6,7 @@ from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured  from django.core.urlresolvers import resolve, get_script_prefix, NoReverseMatch, Resolver404  from django.db.models.query import QuerySet  from django.utils import six +from django.utils.six.moves.urllib import parse as urlparse  from django.utils.translation import ugettext_lazy as _ diff --git a/rest_framework/templatetags/rest_framework.py b/rest_framework/templatetags/rest_framework.py index f8686439..69e03af4 100644 --- a/rest_framework/templatetags/rest_framework.py +++ b/rest_framework/templatetags/rest_framework.py @@ -3,11 +3,11 @@ from django import template  from django.core.urlresolvers import reverse, NoReverseMatch  from django.http import QueryDict  from django.utils import six +from django.utils.six.moves.urllib import parse as urlparse  from django.utils.encoding import iri_to_uri, force_text  from django.utils.html import escape  from django.utils.safestring import SafeData, mark_safe  from django.utils.html import smart_urlquote -from rest_framework.compat import urlparse  from rest_framework.renderers import HTMLFormRenderer  import re | 
