diff options
Diffstat (limited to 'rest_framework/serializers.py')
| -rw-r--r-- | rest_framework/serializers.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py index fcc0744a..51e0b664 100644 --- a/rest_framework/serializers.py +++ b/rest_framework/serializers.py @@ -22,11 +22,11 @@ class DictWithMetadata(dict): """ A dict-like object, that can have additional properties attached. """ - def __getstate__(self): - """ Used by pickle (e.g., caching). - Overriden to remove metadata from the dict, since it shouldn't be pickled - and may in some instances be unpickleable. + """ + Used by pickle (e.g., caching). + Overriden to remove metadata from the dict, since it shouldn't be pickled + and may in some instances be unpickleable. """ # return an instance of the first dict in MRO that isn't a DictWithMetadata for base in self.__class__.__mro__: @@ -41,7 +41,6 @@ class SortedDictWithMetadata(SortedDict, DictWithMetadata): pass - def _is_protected_type(obj): """ True if the object is a native datatype that does not need to |
