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