summaryrefslogtreecommitdiff
path: root/django/core/serializers/python.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-06-07 18:08:47 +0200
committerClaude Paroz <claude@2xlibre.net>2012-06-07 18:08:47 +0200
commit4a103086d5c67fa4fcc53c106c9fdf644c742dd8 (patch)
tree3df00600c27f6369f7561c3b8ddf2f97d2d341d9 /django/core/serializers/python.py
parent706fd9adc0b6587c7f96a834c757708e64fcf615 (diff)
downloaddjango-4a103086d5c67fa4fcc53c106c9fdf644c742dd8.tar.gz
Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.
Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
Diffstat (limited to 'django/core/serializers/python.py')
-rw-r--r--django/core/serializers/python.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/core/serializers/python.py b/django/core/serializers/python.py
index 49120434eb..333161c929 100644
--- a/django/core/serializers/python.py
+++ b/django/core/serializers/python.py
@@ -3,6 +3,7 @@ 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 __future__ import unicode_literals
from django.conf import settings
from django.core.serializers import base
@@ -138,5 +139,5 @@ def _get_model(model_identifier):
except TypeError:
Model = None
if Model is None:
- raise base.DeserializationError(u"Invalid model identifier: '%s'" % model_identifier)
+ raise base.DeserializationError("Invalid model identifier: '%s'" % model_identifier)
return Model