diff --git a/compressor/filters/base.py b/compressor/filters/base.py index d11a844..a49a529 100644 --- a/compressor/filters/base.py +++ b/compressor/filters/base.py @@ -6,7 +6,7 @@ import subprocess from django.core.exceptions import ImproperlyConfigured from django.core.files.temp import NamedTemporaryFile from django.utils.importlib import import_module -from django.utils.encoding import smart_unicode +from django.utils.encoding import smart_text from django.utils import six from compressor.conf import settings @@ -185,4 +185,4 @@ class CompilerFilter(FilterBase): if self.outfile is not None: self.outfile.close() - return smart_unicode(filtered) + return smart_text(filtered) diff --git a/compressor/tests/test_filters.py b/compressor/tests/test_filters.py index 0da914d..82838c7 100644 --- a/compressor/tests/test_filters.py +++ b/compressor/tests/test_filters.py @@ -82,7 +82,7 @@ class PrecompilerTestCase(TestCase): def test_precompiler_output_unicode(self): command = '%s %s' % (sys.executable, self.test_precompiler) compiler = CompilerFilter(content=self.content, filename=self.filename, command=command) - self.assertEqual(type(compiler.input()), unicode) + self.assertEqual(type(compiler.input()), six.text_type) class CssMinTestCase(TestCase):