--- ./theano/compat/__init__.py.orig 2013-12-03 10:47:22.000000000 -0700
+++ ./theano/compat/__init__.py 2014-03-12 20:00:00.000000000 -0600
@@ -3,9 +3,9 @@
"""
# Python 3.x compatibility
-from theano.compat.six import PY3, b, BytesIO, next, get_unbound_function
-from theano.compat.six.moves import configparser
-from theano.compat.six.moves import reload_module as reload
+from six import PY3, b, BytesIO, next, get_unbound_function
+from six.moves import configparser
+from six.moves import reload_module as reload
if PY3:
--- ./theano/compile/debugmode.py.orig 2013-12-03 10:47:22.000000000 -0700
+++ ./theano/compile/debugmode.py 2014-03-12 20:00:00.000000000 -0600
@@ -12,8 +12,7 @@ import numpy
import theano
from theano import gof
-from theano.compat import get_unbound_function
-from theano.compat.six import StringIO
+from six import get_unbound_function, StringIO
from theano.gof import FunctionGraph,graph, utils, link, ops_with_inner_function
from theano.gof.link import raise_with_op
from theano.gof.cc import CLinker
--- ./theano/compile/tests/test_module.py.orig 2013-12-03 10:47:22.000000000 -0700
+++ ./theano/compile/tests/test_module.py 2014-03-12 20:00:00.000000000 -0600
@@ -721,7 +721,7 @@ def test_pickle_aliased_memory():
assert m.y[0,0] == 3.14
import logging
- from theano.compat.six import StringIO
+ from six import StringIO
sio = StringIO()
handler = logging.StreamHandler(sio)
--- ./theano/configparser.py.orig 2013-12-03 10:47:22.000000000 -0700
+++ ./theano/configparser.py 2014-03-12 20:00:00.000000000 -0600
@@ -7,7 +7,7 @@ import os
import sys
import warnings
-from theano.compat.six import StringIO
+from six import StringIO
import theano
from theano.compat import configparser as ConfigParser
--- ./theano/gof/cc.py.orig 2013-12-03 10:47:22.000000000 -0700
+++ ./theano/gof/cc.py 2014-03-12 20:00:00.000000000 -0600
@@ -10,8 +10,7 @@ from itertools import izip
import numpy
-from theano.compat import PY3
-from theano.compat.six import StringIO
+from six import PY3, StringIO
if PY3:
import hashlib
--- ./theano/gof/cmodule.py.orig 2013-12-03 10:47:22.000000000 -0700
+++ ./theano/gof/cmodule.py 2014-03-12 20:00:00.000000000 -0600
@@ -24,8 +24,8 @@ except ImportError:
import numpy.distutils # TODO: TensorType should handle this
import theano
-from theano.compat import any, PY3, next, decode, decode_iter
-from theano.compat.six import BytesIO, StringIO
+from theano.compat import any, next, decode, decode_iter
+from six import PY3, BytesIO, StringIO
from theano.gof.utils import flatten
from theano.configparser import config
from theano.gof.cc import hash_from_code
--- ./theano/gof/optdb.py.orig 2013-12-03 10:47:22.000000000 -0700
+++ ./theano/gof/optdb.py 2014-03-12 20:00:00.000000000 -0600
@@ -3,7 +3,7 @@ import sys
from theano.gof.python25 import DefaultOrderedDict
import numpy
-from theano.compat.six import StringIO
+from six import StringIO
from theano.gof import opt
from theano.configparser import AddConfigVar, FloatParam
from theano import config
--- ./theano/gof/opt.py.orig 2013-12-03 10:47:22.000000000 -0700
+++ ./theano/gof/opt.py 2014-03-12 20:00:00.000000000 -0600
@@ -296,7 +296,7 @@ class SeqOptimizer(Optimizer, list):
new_sub_profile.append(None)
# merge not common opt
- from theano.compat.six import StringIO
+ from six import StringIO
for l in set(prof1[0]).symmetric_difference(set(prof2[0])):
#The set trick above only work for the same object optimization
#It don't work for equivalent optimization.
--- ./theano/misc/pkl_utils.py.orig 2013-12-03 10:47:22.000000000 -0700
+++ ./theano/misc/pkl_utils.py 2014-03-12 20:00:00.000000000 -0600
@@ -13,8 +13,7 @@ __license__ = "3-clause BSD"
import pickle
import sys
import theano
-from theano.compat import PY3
-from theano.compat.six import string_types
+from six import PY3, string_types
sys.setrecursionlimit(3000)
--- ./theano/printing.py.orig 2013-12-03 10:47:22.000000000 -0700
+++ ./theano/printing.py 2014-03-12 20:00:00.000000000 -0600
@@ -25,7 +25,7 @@ except ImportError:
import theano
from theano import gof
from theano import config
-from theano.compat.six import StringIO
+from six import StringIO
from theano.gof import Op, Apply
from theano.gof.python25 import any
from theano.compile import Function, debugmode
--- ./theano/sandbox/cuda/basic_ops.py.orig 2013-12-03 10:47:22.000000000 -0700
+++ ./theano/sandbox/cuda/basic_ops.py 2014-03-12 20:00:00.000000000 -0600
@@ -7,7 +7,7 @@ import numpy
import theano
from theano import gof, Type, Apply
from theano import tensor, scalar, config
-from theano.compat.six import StringIO
+from six import StringIO
from theano.scalar import Scalar
scal = scalar # somewhere scalar gets reassigned to be a function
--- ./theano/sandbox/cuda/blas.py.orig 2013-12-03 10:47:22.000000000 -0700
+++ ./theano/sandbox/cuda/blas.py 2014-03-12 20:00:00.000000000 -0600
@@ -4,7 +4,7 @@ import os
import theano
from theano import Apply
from theano import tensor
-from theano.compat.six import StringIO
+from six import StringIO
from theano.sandbox.cuda.type import CudaNdarrayType
from theano.sandbox.cuda import GpuOp
--- ./theano/sandbox/cuda/elemwise.py.orig 2013-12-03 10:47:22.000000000 -0700
+++ ./theano/sandbox/cuda/elemwise.py 2014-03-12 20:00:00.000000000 -0600
@@ -13,7 +13,7 @@ import numpy
from theano.scalar.basic import upgrade_to_float_no_complex, complex_types
from theano.scalar.basic_scipy import Erfinv
-from theano.compat.six import StringIO
+from six import StringIO
from theano import Apply, Constant, Op, Type, Variable
from theano import gof, scalar, tensor
--- ./theano/sandbox/cuda/nnet.py.orig 2013-12-03 10:47:22.000000000 -0700
+++ ./theano/sandbox/cuda/nnet.py 2014-03-12 20:00:00.000000000 -0600
@@ -1,5 +1,5 @@
from theano import Op, Apply
-from theano.compat.six import StringIO
+from six import StringIO
from theano.sandbox.cuda import GpuOp
--- ./theano/sandbox/cuda/type.py.orig 2013-12-03 10:47:23.000000000 -0700
+++ ./theano/sandbox/cuda/type.py 2014-03-12 20:00:00.000000000 -0600
@@ -9,7 +9,7 @@ import theano
from theano import Type, Variable
from theano import tensor, config
from theano import scalar as scal
-from theano.compat.six import StringIO
+from six import StringIO
try:
# We must do those import to be able to create the full doc when nvcc
--- ./theano/tensor/opt.py.orig 2013-12-03 10:47:28.000000000 -0700
+++ ./theano/tensor/opt.py 2014-03-12 20:00:00.000000000 -0600
@@ -37,7 +37,7 @@ from theano.gof.opt import (Optimizer, p
from theano.gof.opt import merge_optimizer
from theano.gof import toolbox, DestroyHandler
from theano.tensor.basic import get_scalar_constant_value, ShapeError, NotScalarConstantError
-from theano.compat.six import StringIO
+from six import StringIO
theano.configparser.AddConfigVar('on_shape_error',
"warn: print a warning and use the default"
--- ./theano/tensor/tests/test_basic.py.orig 2013-12-03 10:47:28.000000000 -0700
+++ ./theano/tensor/tests/test_basic.py 2014-03-12 20:00:00.000000000 -0600
@@ -18,8 +18,8 @@ from numpy.testing import dec, assert_ar
from numpy.testing.noseclasses import KnownFailureTest
import theano
-from theano.compat import PY3, exc_message, operator_div
-from theano.compat.six import StringIO
+from theano.compat import exc_message, operator_div
+from six import PY3, StringIO
from theano import compile, config, function, gof, tensor, shared
from theano.compile import DeepCopyOp
from theano.compile.mode import get_default_mode
--- ./theano/tensor/tests/test_naacl09.py.orig 2013-12-03 10:47:28.000000000 -0700
+++ ./theano/tensor/tests/test_naacl09.py 2014-03-12 20:00:00.000000000 -0600
@@ -652,7 +652,7 @@ def profile_main():
# We've renamed our original main() above to real_main()
import cProfile
import pstats
- from theano.compat.six import StringIO
+ from six import StringIO
prof = cProfile.Profile()
prof = prof.runctx("real_main()", globals(), locals())
stream = StringIO()
--- ./theano/tensor/tests/test_opt.py.orig 2013-12-03 10:47:28.000000000 -0700
+++ ./theano/tensor/tests/test_opt.py 2014-03-12 20:00:00.000000000 -0600
@@ -15,7 +15,7 @@ from numpy.testing.noseclasses import Kn
import theano
import theano.scalar as scal
-from theano.compat.six import PY3, StringIO
+from six import PY3, StringIO
from theano import compile
from theano.compile import deep_copy_op, DeepCopyOp
from theano import config
--- ./theano/tensor/tests/test_subtensor.py.orig 2013-12-03 10:47:28.000000000 -0700
+++ ./theano/tensor/tests/test_subtensor.py 2014-03-12 20:00:00.000000000 -0600
@@ -8,7 +8,7 @@ import numpy
import theano
from theano.compat import exc_message
-from theano.compat.six import StringIO
+from six import StringIO
from theano.gof.python25 import any
from theano.compile import DeepCopyOp
from theano import config
--- ./theano/tests/test_determinism.py.orig 2013-12-03 10:47:28.000000000 -0700
+++ ./theano/tests/test_determinism.py 2014-03-12 20:00:00.000000000 -0600
@@ -9,7 +9,7 @@ from nose.plugins.skip import SkipTest
from theano import config
from theano import shared
-from theano.compat.six import StringIO
+from six import StringIO
def sharedX(x, name=None):
x = np.cast[config.floatX](x)
--- ./theano/tests/test_printing.py.orig 2013-12-03 10:47:28.000000000 -0700
+++ ./theano/tests/test_printing.py 2014-03-12 20:00:00.000000000 -0600
@@ -9,7 +9,7 @@ import theano
import theano.tensor as tensor
from theano.printing import min_informative_str, debugprint
-from theano.compat.six import StringIO
+from six import StringIO
def test_pydotprint_cond_highlight():
"""