Blob Blame History Raw
--- theano/tensor/var.py.orig	2019-01-15 14:13:57.000000000 -0700
+++ theano/tensor/var.py	2019-08-23 09:34:34.902917174 -0600
@@ -1,5 +1,8 @@
 from __future__ import absolute_import, print_function, division
-import collections
+try:
+    from collections.abc import Iterable
+except (ImportError, AttributeError):
+    from collections import Iterable
 import copy
 import traceback as tb
 import warnings
@@ -474,7 +477,7 @@ class _tensor_py_operators(object):
                     (hasattr(args_el, 'dtype') and args_el.dtype == 'bool')):
                 return True
             if (not isinstance(args_el, theano.tensor.Variable) and
-                    isinstance(args_el, collections.Iterable)):
+                    isinstance(args_el, Iterable)):
                 for el in args_el:
                     if includes_bool(el):
                         return True