+ from cStringIO import StringIO as BytesIO + except ImportError: + from StringIO import StringIO as BytesIO + +else: + import io + BytesIO = io.BytesIO Solution Since we have known what theBytesTypeandBytesIOshould be, let's edit the/util/disk.pydirectly: fromdiskcacheimportFanoutCache...
+if sys.hexversion < 0x03000000: + range = xrange + try: + from cStringIO import StringIO as BytesIO + except ImportError: + from StringIO import StringIO as BytesIO + +else: + import io + BytesIO = io.BytesIO Solution Since we have known what theBytesTypeandBytesIOshould be, let...