summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-08-14 19:48:38 +0200
committerClaude Paroz <claude@2xlibre.net>2012-08-14 19:54:53 +0200
commitf2fe7a3e36bebb529f33f5b702b7643a3db85c72 (patch)
tree58c19f611533b66d7925459ef9d8db299eacc107 /django
parent7d48e077b573afb4184301be6565a88e8a9b6e28 (diff)
[py3] Fixed serializers tests
Diffstat (limited to 'django')
-rw-r--r--django/core/serializers/base.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/django/core/serializers/base.py b/django/core/serializers/base.py
index bdb43db9f3..276f9a4738 100644
--- a/django/core/serializers/base.py
+++ b/django/core/serializers/base.py
@@ -2,8 +2,6 @@
Module for abstract serializer/unserializer base classes.
"""
-from io import BytesIO
-
from django.db import models
from django.utils.encoding import smart_text
from django.utils import six
@@ -35,7 +33,7 @@ class Serializer(object):
"""
self.options = options
- self.stream = options.pop("stream", BytesIO())
+ self.stream = options.pop("stream", six.StringIO())
self.selected_fields = options.pop("fields", None)
self.use_natural_keys = options.pop("use_natural_keys", False)
@@ -125,7 +123,7 @@ class Deserializer(object):
"""
self.options = options
if isinstance(stream_or_string, six.string_types):
- self.stream = BytesIO(stream_or_string)
+ self.stream = six.StringIO(stream_or_string)
else:
self.stream = stream_or_string
# hack to make sure that the models have all been loaded before