summaryrefslogtreecommitdiff
path: root/django/utils/functional.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2016-12-29 16:27:49 +0100
committerClaude Paroz <claude@2xlibre.net>2017-01-18 20:18:46 +0100
commit7b2f2e74adb36a4334e83130f6abc2f79d395235 (patch)
tree313387ba6a6f1311b43cf5fb4f2576d2d6c4f805 /django/utils/functional.py
parentf6acd1d271122d66de8061e75ae26137ddf02658 (diff)
Refs #23919 -- Removed six.<various>_types usage
Thanks Tim Graham and Simon Charette for the reviews.
Diffstat (limited to 'django/utils/functional.py')
-rw-r--r--django/utils/functional.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/django/utils/functional.py b/django/utils/functional.py
index 933085391d..3e35582cbf 100644
--- a/django/utils/functional.py
+++ b/django/utils/functional.py
@@ -88,7 +88,7 @@ def lazy(func, *resultclasses):
meth = cls.__promise__(method_name)
setattr(cls, method_name, meth)
cls._delegate_bytes = bytes in resultclasses
- cls._delegate_text = six.text_type in resultclasses
+ cls._delegate_text = str in resultclasses
assert not (cls._delegate_bytes and cls._delegate_text), (
"Cannot call lazy() with both bytes and text return types.")
if cls._delegate_text:
@@ -148,7 +148,7 @@ def lazy(func, *resultclasses):
def __mod__(self, rhs):
if self._delegate_text:
- return six.text_type(self) % rhs
+ return str(self) % rhs
return self.__cast() % rhs
def __deepcopy__(self, memo):
@@ -175,7 +175,7 @@ def lazystr(text):
Shortcut for the common case of a lazy callable that returns str.
"""
from django.utils.encoding import force_text # Avoid circular import
- return lazy(force_text, six.text_type)(text)
+ return lazy(force_text, str)(text)
def keep_lazy(*resultclasses):
@@ -207,7 +207,7 @@ def keep_lazy_text(func):
"""
A decorator for functions that accept lazy arguments and return text.
"""
- return keep_lazy(six.text_type)(func)
+ return keep_lazy(str)(func)
empty = object()