mirror of https://github.com/django/django.git
Refs #23919 -- Removed LazyObject.__getstate__() needed only on Python 2.
This commit is contained in:
parent
d7881d2020
commit
59a4b12a23
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue