]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
BytesIO from six.
authorCory Benfield <lukasaoz@gmail.com>
Sat, 18 May 2013 10:58:18 +0000 (11:58 +0100)
committerCory Benfield <lukasaoz@gmail.com>
Sat, 18 May 2013 11:00:13 +0000 (12:00 +0100)
jinja2/bccache.py

index e53783b79cae17b1938cfa58613752460ccd6ec5..b7b637fc067fdb905b83f476afece1e7921c11c8 100644 (file)
@@ -19,6 +19,7 @@ import sys
 import marshal
 import tempfile
 from six.moves import cPickle as pickle
+from six import BytesIO
 import fnmatch
 try:
     from hashlib import sha1
@@ -29,11 +30,9 @@ from jinja2.utils import open_if_exists
 
 # marshal works better on 3.x, one hack less required
 if sys.version_info[0] >= 3:
-    from io import BytesIO
     marshal_dump = marshal.dump
     marshal_load = marshal.load
 else:
-    from cStringIO import StringIO as BytesIO
 
     def marshal_dump(code, f):
         if isinstance(f, file):