From 59a4b12a2356633936e6888641c2a3a9232a0bdd Mon Sep 17 00:00:00 2001 From: Sergey Fedoseev Date: Wed, 12 Jul 2017 13:08:51 +0500 Subject: [PATCH] Refs #23919 -- Removed LazyObject.__getstate__() needed only on Python 2. --- django/utils/functional.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/django/utils/functional.py b/django/utils/functional.py index 05c17d6e64..71e5238c1e 100644 --- a/django/utils/functional.py +++ b/django/utils/functional.py @@ -277,14 +277,6 @@ class LazyObject: self._setup() return (unpickle_lazyobject, (self._wrapped,)) - def __getstate__(self): - """ - Prevent older versions of pickle from trying to pickle the __dict__ - (which in the case of a SimpleLazyObject may contain a lambda). The - value will be ignored by __reduce__() and the custom unpickler. - """ - return {} - def __copy__(self): if self._wrapped is empty: # If uninitialized, copy the wrapper. Use type(self), not