diff options
| author | Ran Benita <ran234@gmail.com> | 2019-05-03 13:15:52 +0300 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-06-08 09:15:40 +0200 |
| commit | 459f30f73e489356cf128abb3e9f357a7bffed0a (patch) | |
| tree | d11d4ea06b1da2f9d7e32a2341b9ff6182a038c5 | |
| parent | c7ba2e3cbb478d5337dc160610e4b05d062e8a03 (diff) | |
Removed unnecessary wrapping of __bytes__ in proxy class in lazy().
| -rw-r--r-- | django/utils/functional.py | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/django/utils/functional.py b/django/utils/functional.py index 4220cbc4b6..be5fac23ad 100644 --- a/django/utils/functional.py +++ b/django/utils/functional.py @@ -126,8 +126,6 @@ def lazy(func, *resultclasses): "Cannot call lazy() with both bytes and text return types." ) - if cls._delegate_bytes: - cls.__bytes__ = cls.__bytes_cast @classmethod def __promise__(cls, method_name): @@ -140,9 +138,6 @@ def lazy(func, *resultclasses): return __wrapper__ - def __bytes_cast(self): - return bytes(func(*self.__args, **self.__kw)) - def __cast(self): return func(*self.__args, **self.__kw) |
