diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-07-20 14:48:51 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-07-22 09:29:54 +0200 |
| commit | bdca5ea345c548a82a80d198906818c9ccbef896 (patch) | |
| tree | 5c3f5fe5ad2522175d67b96a1fce1ff1763ba125 /django/utils/http.py | |
| parent | 3cb2457f46b3e40ff6b6acffcb3fd44cbea091e5 (diff) | |
[py3] Replaced unicode/str by six.text_type/bytes.
Diffstat (limited to 'django/utils/http.py')
| -rw-r--r-- | django/utils/http.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/django/utils/http.py b/django/utils/http.py index 87db284416..ec94d62903 100644 --- a/django/utils/http.py +++ b/django/utils/http.py @@ -9,6 +9,7 @@ from email.utils import formatdate from django.utils.datastructures import MultiValueDict from django.utils.encoding import smart_str, force_unicode from django.utils.functional import allow_lazy +from django.utils import six ETAG_MATCH = re.compile(r'(?:W/)?"((?:\\.|[^"])*)"') @@ -31,7 +32,7 @@ def urlquote(url, safe='/'): without double-quoting occurring. """ return force_unicode(urllib.quote(smart_str(url), smart_str(safe))) -urlquote = allow_lazy(urlquote, unicode) +urlquote = allow_lazy(urlquote, six.text_type) def urlquote_plus(url, safe=''): """ @@ -41,7 +42,7 @@ def urlquote_plus(url, safe=''): iri_to_uri() call without double-quoting occurring. """ return force_unicode(urllib.quote_plus(smart_str(url), smart_str(safe))) -urlquote_plus = allow_lazy(urlquote_plus, unicode) +urlquote_plus = allow_lazy(urlquote_plus, six.text_type) def urlunquote(quoted_url): """ @@ -49,7 +50,7 @@ def urlunquote(quoted_url): the result of django.utils.http.urlquote(). """ return force_unicode(urllib.unquote(smart_str(quoted_url))) -urlunquote = allow_lazy(urlunquote, unicode) +urlunquote = allow_lazy(urlunquote, six.text_type) def urlunquote_plus(quoted_url): """ @@ -57,7 +58,7 @@ def urlunquote_plus(quoted_url): the result of django.utils.http.urlquote_plus(). """ return force_unicode(urllib.unquote_plus(smart_str(quoted_url))) -urlunquote_plus = allow_lazy(urlunquote_plus, unicode) +urlunquote_plus = allow_lazy(urlunquote_plus, six.text_type) def urlencode(query, doseq=0): """ |
