diff options
author | Claude Paroz <claude@2xlibre.net> | 2012-05-05 19:47:03 +0200 |
---|---|---|
committer | Claude Paroz <claude@2xlibre.net> | 2012-05-05 21:41:44 +0200 |
commit | d7dfab59ead97b35c6f6786784225f377783e376 (patch) | |
tree | d357f2b94ef010d60e9ad6602bda5537f1a28b8d /django/core/serializers/json.py | |
parent | 1583d402240d88ad2a4acc024d348a21657ccaba (diff) | |
download | django-d7dfab59ead97b35c6f6786784225f377783e376.tar.gz |
Replaced cStringIO.StringIO by io.BytesIO.
Also replaced StringIO.StringIO by BytesIO in some other appropriate
places. StringIO is not available in Python 3.
Diffstat (limited to 'django/core/serializers/json.py')
-rw-r--r-- | django/core/serializers/json.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/serializers/json.py b/django/core/serializers/json.py index eb9fcfbacd..4da8581f68 100644 --- a/django/core/serializers/json.py +++ b/django/core/serializers/json.py @@ -8,7 +8,7 @@ from __future__ import absolute_import import datetime import decimal import json -from StringIO import StringIO +from io import BytesIO from django.core.serializers.base import DeserializationError from django.core.serializers.python import Serializer as PythonSerializer @@ -37,7 +37,7 @@ def Deserializer(stream_or_string, **options): Deserialize a stream or string of JSON data. """ if isinstance(stream_or_string, basestring): - stream = StringIO(stream_or_string) + stream = BytesIO(stream_or_string) else: stream = stream_or_string try: |