summaryrefslogtreecommitdiff
path: root/django/core/serializers/python.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/core/serializers/python.py')
-rw-r--r--django/core/serializers/python.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/django/core/serializers/python.py b/django/core/serializers/python.py
index 08739c98fc..5a5d8a7036 100644
--- a/django/core/serializers/python.py
+++ b/django/core/serializers/python.py
@@ -3,7 +3,6 @@ A Python "serializer". Doesn't do much serializing per se -- just converts to
and from basic Python data types (lists, dicts, strings, etc.). Useful as a basis for
other serializers.
"""
-from collections import OrderedDict
from django.apps import apps
from django.core.serializers import base
@@ -26,14 +25,14 @@ class Serializer(base.Serializer):
pass
def start_object(self, obj):
- self._current = OrderedDict()
+ self._current = {}
def end_object(self, obj):
self.objects.append(self.get_dump_object(obj))
self._current = None
def get_dump_object(self, obj):
- data = OrderedDict([('model', str(obj._meta))])
+ data = {'model': str(obj._meta)}
if not self.use_natural_primary_keys or not hasattr(obj, 'natural_key'):
data["pk"] = self._value_from_field(obj, obj._meta.pk)
data['fields'] = self._current