Refs #23919 -- Removed LazyObject.__getstate__() needed only on Python 2.

This commit is contained in:
Sergey Fedoseev 2017-07-12 13:08:51 +05:00
parent d7881d2020
commit 59a4b12a23
1 changed files with 0 additions and 8 deletions

View File

@ -277,14 +277,6 @@ class LazyObject:
self._setup() self._setup()
return (unpickle_lazyobject, (self._wrapped,)) 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): def __copy__(self):
if self._wrapped is empty: if self._wrapped is empty:
# If uninitialized, copy the wrapper. Use type(self), not # If uninitialized, copy the wrapper. Use type(self), not