summaryrefslogtreecommitdiff
path: root/django/core/serializers
diff options
context:
space:
mode:
Diffstat (limited to 'django/core/serializers')
-rw-r--r--django/core/serializers/base.py6
-rw-r--r--django/core/serializers/json.py9
-rw-r--r--django/core/serializers/pyyaml.py8
3 files changed, 9 insertions, 14 deletions
diff --git a/django/core/serializers/base.py b/django/core/serializers/base.py
index f6943e543e..bfd785a6fe 100644
--- a/django/core/serializers/base.py
+++ b/django/core/serializers/base.py
@@ -2,10 +2,8 @@
Module for abstract serializer/unserializer base classes.
"""
-try:
- from cStringIO import StringIO
-except ImportError:
- from StringIO import StringIO
+from StringIO import StringIO
+
from django.db import models
from django.utils.encoding import smart_str, smart_unicode
from django.utils import datetime_safe
diff --git a/django/core/serializers/json.py b/django/core/serializers/json.py
index a84206a0fe..97e5bc9b26 100644
--- a/django/core/serializers/json.py
+++ b/django/core/serializers/json.py
@@ -3,14 +3,13 @@ Serialize data to/from JSON
"""
import datetime
-from django.utils import simplejson
+from StringIO import StringIO
+
from django.core.serializers.python import Serializer as PythonSerializer
from django.core.serializers.python import Deserializer as PythonDeserializer
from django.utils import datetime_safe
-try:
- from cStringIO import StringIO
-except ImportError:
- from StringIO import StringIO
+from django.utils import simplejson
+
try:
import decimal
except ImportError:
diff --git a/django/core/serializers/pyyaml.py b/django/core/serializers/pyyaml.py
index 58cf59bed9..ac77166a2f 100644
--- a/django/core/serializers/pyyaml.py
+++ b/django/core/serializers/pyyaml.py
@@ -4,14 +4,12 @@ YAML serializer.
Requires PyYaml (http://pyyaml.org/), but that's checked for in __init__.
"""
+from StringIO import StringIO
+import yaml
+
from django.db import models
from django.core.serializers.python import Serializer as PythonSerializer
from django.core.serializers.python import Deserializer as PythonDeserializer
-try:
- from cStringIO import StringIO
-except ImportError:
- from StringIO import StringIO
-import yaml
class Serializer(PythonSerializer):
"""