summaryrefslogtreecommitdiff
path: root/django/http
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-02-09 13:19:34 -0500
committerTim Graham <timograham@gmail.com>2015-02-09 14:24:06 -0500
commita8b70d251d238b4e6cfc7bb4296da15494f8dff3 (patch)
tree94ef5bc53e59131906aecfcf792eeac86242aa62 /django/http
parenteb406aa686ff1809903366ef6896037af2f1f69b (diff)
[1.8.x] Sorted imports with isort; refs #23860.
Backport of 0ed7d155635da9f79d4dd67e4889087d3673c6da from master
Diffstat (limited to 'django/http')
-rw-r--r--django/http/cookie.py4
-rw-r--r--django/http/multipartparser.py6
-rw-r--r--django/http/request.py9
-rw-r--r--django/http/response.py8
4 files changed, 15 insertions, 12 deletions
diff --git a/django/http/cookie.py b/django/http/cookie.py
index 3bd9065d3a..a3dbd2a0b2 100644
--- a/django/http/cookie.py
+++ b/django/http/cookie.py
@@ -1,11 +1,11 @@
from __future__ import unicode_literals
+
import sys
-from django.utils.encoding import force_str
from django.utils import six
+from django.utils.encoding import force_str
from django.utils.six.moves import http_cookies
-
# Some versions of Python 2.7 and later won't need this encoding bug fix:
_cookie_encodes_correctly = http_cookies.SimpleCookie().value_encode(';') == (';', '"\\073"')
# See ticket #13007, http://bugs.python.org/issue2193 and http://trac.edgewall.org/ticket/2256
diff --git a/django/http/multipartparser.py b/django/http/multipartparser.py
index e1de03f8b1..53e4149519 100644
--- a/django/http/multipartparser.py
+++ b/django/http/multipartparser.py
@@ -13,12 +13,14 @@ import sys
from django.conf import settings
from django.core.exceptions import SuspiciousMultipartForm
+from django.core.files.uploadhandler import (
+ SkipFile, StopFutureHandlers, StopUpload,
+)
+from django.utils import six
from django.utils.datastructures import MultiValueDict
from django.utils.encoding import force_text
-from django.utils import six
from django.utils.six.moves.urllib.parse import unquote
from django.utils.text import unescape_entities
-from django.core.files.uploadhandler import StopUpload, SkipFile, StopFutureHandlers
__all__ = ('MultiPartParser', 'MultiPartParserError', 'InputStreamExhausted')
diff --git a/django/http/request.py b/django/http/request.py
index ea32574c68..398cf20dfb 100644
--- a/django/http/request.py
+++ b/django/http/request.py
@@ -14,12 +14,13 @@ from django.core.exceptions import DisallowedHost, ImproperlyConfigured
from django.core.files import uploadhandler
from django.http.multipartparser import MultiPartParser, MultiPartParserError
from django.utils import six
-from django.utils.datastructures import MultiValueDict, ImmutableList
+from django.utils.datastructures import ImmutableList, MultiValueDict
from django.utils.encoding import (
- force_bytes, force_text, force_str, escape_uri_path, iri_to_uri,
+ escape_uri_path, force_bytes, force_str, force_text, iri_to_uri,
+)
+from django.utils.six.moves.urllib.parse import (
+ parse_qsl, quote, urlencode, urljoin, urlsplit,
)
-from django.utils.six.moves.urllib.parse import parse_qsl, urlencode, quote, urljoin, urlsplit
-
RAISE_ERROR = object()
host_validation_re = re.compile(r"^([a-z0-9.-]+|\[[a-f0-9]*:[a-f0-9:]+\])(:\d+)?$")
diff --git a/django/http/response.py b/django/http/response.py
index eedd6c2c72..1389a92c26 100644
--- a/django/http/response.py
+++ b/django/http/response.py
@@ -8,18 +8,18 @@ import time
from email.header import Header
from django.conf import settings
-from django.core import signals
-from django.core import signing
+from django.core import signals, signing
from django.core.exceptions import DisallowedRedirect
from django.core.serializers.json import DjangoJSONEncoder
from django.http.cookie import SimpleCookie
from django.utils import six, timezone
-from django.utils.encoding import force_bytes, force_text, force_str, iri_to_uri
+from django.utils.encoding import (
+ force_bytes, force_str, force_text, iri_to_uri,
+)
from django.utils.http import cookie_date
from django.utils.six.moves import map
from django.utils.six.moves.urllib.parse import urlparse
-
# See http://www.iana.org/assignments/http-status-codes
REASON_PHRASES = {
100: 'CONTINUE',