Hello community,

here is the log from the commit of package python-Theano for openSUSE:Factory 
checked in at 2020-08-04 20:22:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Theano (Old)
 and      /work/SRC/openSUSE:Factory/.python-Theano.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Theano"

Tue Aug  4 20:22:33 2020 rev:6 rq:824191 version:1.0.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Theano/python-Theano.changes      
2020-05-19 14:49:04.532148759 +0200
+++ /work/SRC/openSUSE:Factory/.python-Theano.new.3592/python-Theano.changes    
2020-08-04 20:22:39.961003533 +0200
@@ -1,0 +2,7 @@
+Sat Aug  1 22:06:58 UTC 2020 - Arun Persaud <[email protected]>
+
+- update to version 1.0.5:
+  * Theano is now compatible with Python 3.9
+  * Fixed many deprecation warnings
+
+-------------------------------------------------------------------

Old:
----
  Theano-1.0.4.tar.gz

New:
----
  Theano-1.0.5.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-Theano.spec ++++++
--- /var/tmp/diff_new_pack.23XwxY/_old  2020-08-04 20:22:41.301003703 +0200
+++ /var/tmp/diff_new_pack.23XwxY/_new  2020-08-04 20:22:41.305003704 +0200
@@ -26,7 +26,7 @@
 %bcond_with test
 %endif
 Name:           python-Theano%{psuffix}
-Version:        1.0.4
+Version:        1.0.5
 Release:        0
 Summary:        A scientific python library
 License:        BSD-3-Clause

++++++ Theano-1.0.4.tar.gz -> Theano-1.0.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/HISTORY.txt new/Theano-1.0.5/HISTORY.txt
--- old/Theano-1.0.4/HISTORY.txt        2019-01-15 22:29:47.000000000 +0100
+++ new/Theano-1.0.5/HISTORY.txt        2020-07-27 18:09:24.000000000 +0200
@@ -5,6 +5,31 @@
 Old Release Notes
 =================
 
+Theano 1.0.4 (16th of January 2019)
+=====================================
+
+This is a maintenance release of Theano, version ``1.0.4``, with no
+new features, but some important bug fixes.
+
+We recommend that everybody update to this version.
+
+Highlights (since 1.0.3):
+
+ - Theano is now compatible with NumPy 1.16.
+
+A total of 10 people contributed to this release since ``1.0.3``:
+
+ - wonghang
+ - Frederic Bastien
+ - Arnaud Bergeron
+ - Duc Nguyen
+ - Andrew Nelson
+ - Björn Linse
+ - Luis Mario Domenzain
+ - Rebecca N. Palmer
+ - Luciano Paz
+ - Dan Foreman-Mackey
+
 Theano 1.0.3 (20th of September 2018)
 =====================================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/LICENSE.txt new/Theano-1.0.5/LICENSE.txt
--- old/Theano-1.0.4/LICENSE.txt        2019-01-15 22:29:47.000000000 +0100
+++ new/Theano-1.0.5/LICENSE.txt        2020-07-27 18:09:24.000000000 +0200
@@ -3,7 +3,7 @@
 LICENSE
 =======
 
-Copyright (c) 2008--2019, Theano Development Team
+Copyright (c) 2008--2020, Theano Development Team
 All rights reserved.
 
 Contains code from NumPy, Copyright (c) 2005-2016, NumPy Developers.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/NEWS.txt new/Theano-1.0.5/NEWS.txt
--- old/Theano-1.0.4/NEWS.txt   2019-01-15 22:29:47.000000000 +0100
+++ new/Theano-1.0.5/NEWS.txt   2020-07-27 18:09:24.000000000 +0200
@@ -2,27 +2,31 @@
 Release Notes
 =============
 
-Theano 1.0.4 (16th of January 2019)
-=====================================
+Theano 1.0.5 (27th of July 2020)
+================================
 
-This is a maintenance release of Theano, version ``1.0.4``, with no
-new features, but some important bug fixes.
+This is a maintenance release of Theano, version ``1.0.5``, with no
+new features, but some deprecation fixes.
 
 We recommend that everybody update to this version.
 
-Highlights (since 1.0.3):
+Highlights (since 1.0.4):
 
- - Theano is now compatible with NumPy 1.16.
+ - Theano is now compatible with Python 3.9
+ - Fixed many deprecation warnings
 
-A total of 10 people contributed to this release since ``1.0.3``:
+A total of 13 people contributed to this release since ``1.0.4``:
 
- - wonghang
+ - 1fish2
  - Frederic Bastien
- - Arnaud Bergeron
- - Duc Nguyen
- - Andrew Nelson
- - Björn Linse
- - Luis Mario Domenzain
- - Rebecca N. Palmer
- - Luciano Paz
+ - Rebecca Palmer
+ - Miro Hrončok
  - Dan Foreman-Mackey
+ - Adrian Seyboldt
+ - abergeron
+ - Tim Gates
+ - Tim Odonnell
+ - Robert P. Goldman
+ - Duc Nguyen
+ - Igor Varfolomeev
+ - Thomas Wiecki
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/PKG-INFO new/Theano-1.0.5/PKG-INFO
--- old/Theano-1.0.4/PKG-INFO   2019-01-15 22:31:00.000000000 +0100
+++ new/Theano-1.0.5/PKG-INFO   2020-07-27 18:12:54.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: Theano
-Version: 1.0.4
+Version: 1.0.5
 Summary: Optimizing compiler for evaluating mathematical expressions on CPUs 
and GPUs.
 Home-page: http://deeplearning.net/software/theano/
 Author: LISA laboratory, University of Montreal
@@ -26,30 +26,34 @@
         Release Notes
         =============
         
-        Theano 1.0.4 (16th of January 2019)
-        =====================================
+        Theano 1.0.5 (27th of July 2020)
+        ================================
         
-        This is a maintenance release of Theano, version ``1.0.4``, with no
-        new features, but some important bug fixes.
+        This is a maintenance release of Theano, version ``1.0.5``, with no
+        new features, but some deprecation fixes.
         
         We recommend that everybody update to this version.
         
-        Highlights (since 1.0.3):
+        Highlights (since 1.0.4):
         
-         - Theano is now compatible with NumPy 1.16.
+         - Theano is now compatible with Python 3.9
+         - Fixed many deprecation warnings
         
-        A total of 10 people contributed to this release since ``1.0.3``:
+        A total of 13 people contributed to this release since ``1.0.4``:
         
-         - wonghang
+         - 1fish2
          - Frederic Bastien
-         - Arnaud Bergeron
-         - Duc Nguyen
-         - Andrew Nelson
-         - Björn Linse
-         - Luis Mario Domenzain
-         - Rebecca N. Palmer
-         - Luciano Paz
+         - Rebecca Palmer
+         - Miro Hrončok
          - Dan Foreman-Mackey
+         - Adrian Seyboldt
+         - abergeron
+         - Tim Gates
+         - Tim Odonnell
+         - Robert P. Goldman
+         - Duc Nguyen
+         - Igor Varfolomeev
+         - Thomas Wiecki
         
 Keywords: theano math numerical symbolic blas numpy gpu autodiff 
differentiation
 Platform: Windows
@@ -76,5 +80,7 @@
 Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
-Provides-Extra: doc
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
 Provides-Extra: test
+Provides-Extra: doc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/Theano.egg-info/PKG-INFO 
new/Theano-1.0.5/Theano.egg-info/PKG-INFO
--- old/Theano-1.0.4/Theano.egg-info/PKG-INFO   2019-01-15 22:30:59.000000000 
+0100
+++ new/Theano-1.0.5/Theano.egg-info/PKG-INFO   2020-07-27 18:12:51.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: Theano
-Version: 1.0.4
+Version: 1.0.5
 Summary: Optimizing compiler for evaluating mathematical expressions on CPUs 
and GPUs.
 Home-page: http://deeplearning.net/software/theano/
 Author: LISA laboratory, University of Montreal
@@ -26,30 +26,34 @@
         Release Notes
         =============
         
-        Theano 1.0.4 (16th of January 2019)
-        =====================================
+        Theano 1.0.5 (27th of July 2020)
+        ================================
         
-        This is a maintenance release of Theano, version ``1.0.4``, with no
-        new features, but some important bug fixes.
+        This is a maintenance release of Theano, version ``1.0.5``, with no
+        new features, but some deprecation fixes.
         
         We recommend that everybody update to this version.
         
-        Highlights (since 1.0.3):
+        Highlights (since 1.0.4):
         
-         - Theano is now compatible with NumPy 1.16.
+         - Theano is now compatible with Python 3.9
+         - Fixed many deprecation warnings
         
-        A total of 10 people contributed to this release since ``1.0.3``:
+        A total of 13 people contributed to this release since ``1.0.4``:
         
-         - wonghang
+         - 1fish2
          - Frederic Bastien
-         - Arnaud Bergeron
-         - Duc Nguyen
-         - Andrew Nelson
-         - Björn Linse
-         - Luis Mario Domenzain
-         - Rebecca N. Palmer
-         - Luciano Paz
+         - Rebecca Palmer
+         - Miro Hrončok
          - Dan Foreman-Mackey
+         - Adrian Seyboldt
+         - abergeron
+         - Tim Gates
+         - Tim Odonnell
+         - Robert P. Goldman
+         - Duc Nguyen
+         - Igor Varfolomeev
+         - Thomas Wiecki
         
 Keywords: theano math numerical symbolic blas numpy gpu autodiff 
differentiation
 Platform: Windows
@@ -76,5 +80,7 @@
 Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
-Provides-Extra: doc
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
 Provides-Extra: test
+Provides-Extra: doc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/Theano.egg-info/SOURCES.txt 
new/Theano-1.0.5/Theano.egg-info/SOURCES.txt
--- old/Theano-1.0.4/Theano.egg-info/SOURCES.txt        2019-01-15 
22:30:59.000000000 +0100
+++ new/Theano-1.0.5/Theano.egg-info/SOURCES.txt        2020-07-27 
18:12:51.000000000 +0200
@@ -7,6 +7,7 @@
 NEWS_DEV.txt
 README.rst
 requirement-rtd.txt
+requirements.txt
 setup.cfg
 setup.py
 versioneer.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/bin/theano_nose.py 
new/Theano-1.0.5/bin/theano_nose.py
--- old/Theano-1.0.4/bin/theano_nose.py 2019-01-15 22:29:47.000000000 +0100
+++ new/Theano-1.0.5/bin/theano_nose.py 2020-07-27 18:09:24.000000000 +0200
@@ -23,6 +23,7 @@
 import nose
 import textwrap
 import sys
+import warnings
 from nose.plugins import Plugin
 
 def main_function():
@@ -59,7 +60,7 @@
     batch_size = None
     if len(batch_args):
         if len(batch_args) > 1:
-            _logger.warn(
+            _logger.warning(
                 'Multiple --batch arguments detected, using the last one '
                 'and ignoring the first ones.')
 
@@ -103,7 +104,7 @@
             from numpy.testing.noseclasses import KnownFailure
             addplugins.append(KnownFailure())
         except ImportError:
-            _logger.warn(
+            _logger.warning(
                 'KnownFailure plugin from NumPy could not be imported. '
                 'Use --without-knownfailure to disable this warning.')
     else:
@@ -125,7 +126,7 @@
     except TypeError as e:
         if "got an unexpected keyword argument 'addplugins'" in e.message:
             # This means nose is too old and does not support plugins
-            _logger.warn(
+            _logger.warning(
                 'KnownFailure plugin from NumPy can\'t'
                 ' be used as nosetests is too old. '
                 'Use --without-knownfailure to disable this warning.')
@@ -204,6 +205,9 @@
     if '--help' in sys.argv or '-h' in sys.argv:
         help()
     else:
+        warnings.simplefilter("default")  # Enable warnings before importing 
theano
+        if os.environ.get("PYTHONWARNINGS") is not None:
+            os.environ["PYTHONWARNINGS"] = "default"  # Also affect 
subprocesses
         result = main_function()
         sys.exit(result)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/doc/LICENSE.txt 
new/Theano-1.0.5/doc/LICENSE.txt
--- old/Theano-1.0.4/doc/LICENSE.txt    2019-01-15 22:29:47.000000000 +0100
+++ new/Theano-1.0.5/doc/LICENSE.txt    2020-07-27 18:09:24.000000000 +0200
@@ -3,7 +3,7 @@
 LICENSE
 =======
 
-Copyright (c) 2008--2019, Theano Development Team
+Copyright (c) 2008--2020, Theano Development Team
 All rights reserved.
 
 Contains code from NumPy, Copyright (c) 2005-2016, NumPy Developers.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/doc/extending/extending_theano.txt 
new/Theano-1.0.5/doc/extending/extending_theano.txt
--- old/Theano-1.0.4/doc/extending/extending_theano.txt 2019-01-15 
22:29:47.000000000 +0100
+++ new/Theano-1.0.5/doc/extending/extending_theano.txt 2020-07-06 
17:49:15.000000000 +0200
@@ -791,7 +791,7 @@
 It takes an optional :func:`infer_shape` parameter that must have this
 signature:
 
-.. code-block:: python
+.. code-block:: none
 
     def infer_shape(node, input_shapes):
         # ...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/doc/internal/how_to_release.txt 
new/Theano-1.0.5/doc/internal/how_to_release.txt
--- old/Theano-1.0.4/doc/internal/how_to_release.txt    2019-01-15 
22:29:47.000000000 +0100
+++ new/Theano-1.0.5/doc/internal/how_to_release.txt    2020-07-06 
17:49:15.000000000 +0200
@@ -77,13 +77,15 @@
 
     umask 0022
 
-Now change ``ISRELEASED`` in ``setup.py`` to ``True``.
+Finally, use setuptools to build the release::
 
-Finally, use setuptools to register and upload the release::
+    python setup.py sdist --formats=gztar
 
-    python setup.py register sdist --formats=gztar,zip upload
+Then use twine to upload the release
 
-This command register and uploads the package on pypi.python.org. To be able
+    twine upload dist/Theano-1.0.X.tax.gz
+
+This command uploads the package on pypi.python.org. To be able
 to do that, you must register on PyPI (you can create an new account, or use
 OpenID), and be listed among the "Package Index Owners" of Theano.
 
@@ -116,11 +118,6 @@
 right. Just do not change the version number.
 
 
-Finally
--------
-
-Change ``ISRELEASED`` back to ``False``.
-
 Update documentation server scripts
 ===================================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/doc/library/config.txt 
new/Theano-1.0.5/doc/library/config.txt
--- old/Theano-1.0.4/doc/library/config.txt     2019-01-15 22:29:47.000000000 
+0100
+++ new/Theano-1.0.5/doc/library/config.txt     2020-07-27 18:09:24.000000000 
+0200
@@ -482,7 +482,7 @@
 
     The sched parameter passed for context creation to pygpu.  With
     CUDA, using "multi" mean using the parameter
-    cudaDeviceScheduleYield. This is useful to lower the CPU overhead
+    cudaDeviceScheduleBlockingSync. This is useful to lower the CPU overhead
     when waiting for GPU. One user found that it speeds up his other
     processes that was doing data augmentation.
 
@@ -568,7 +568,7 @@
     String value: ``'None'``, ``'all'``, ``'0.3'``, ``'0.4'``, ``'0.4.1'``,
     ``'0.5'``, ``'0.6'``, ``'0.7'``, ``'0.8'``, ``'0.8.1'``, ``'0.8.2'``,
     ``'0.9'``, ``'0.10'``, ``'1.0'``, ``'1.0.1'``, ``'1.0.2'``, ``'1.0.3'``,
-    ``'1.0.4'``
+    ``'1.0.4'``, ``'1.0.5'``
 
     Default: ``'0.9'``
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/doc/library/tensor/basic.txt 
new/Theano-1.0.5/doc/library/tensor/basic.txt
--- old/Theano-1.0.4/doc/library/tensor/basic.txt       2019-01-15 
22:29:47.000000000 +0100
+++ new/Theano-1.0.5/doc/library/tensor/basic.txt       2020-07-06 
17:49:15.000000000 +0200
@@ -552,7 +552,7 @@
     .. method:: nonzero_values(self)
     .. method:: sort(self, axis=-1, kind='quicksort', order=None)
     .. method:: argsort(self, axis=-1, kind='quicksort', order=None)
-    .. method:: clip(self, a_min, a_max)
+    .. method:: clip(self, a_min, a_max) with a_min <= a_max
     .. method:: conf()
     .. method:: repeat(repeats, axis=None)
     .. method:: round(mode="half_away_from_zero")
@@ -1350,6 +1350,9 @@
 
     Normal broadcasting rules apply to each of `x`, `min`, and `max`.
 
+    Note that there is no warning for inputs that are the wrong way round
+    (`min > max`), and that results in this case may differ from 
``numpy.clip``.
+
 Bit-wise
 --------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/requirements.txt 
new/Theano-1.0.5/requirements.txt
--- old/Theano-1.0.4/requirements.txt   1970-01-01 01:00:00.000000000 +0100
+++ new/Theano-1.0.5/requirements.txt   2020-07-27 18:09:24.000000000 +0200
@@ -0,0 +1,13 @@
+# pip install --upgrade pip setuptools virtualenv virtualenvwrapper 
virtualenv-clone wheel
+# pip install -r requirements.txt && pyenv rehash
+
+cython
+# mpi4py
+nose
+numpy
+parameterized
+reindent
+requests
+scipy
+six
+sympy
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/setup.py new/Theano-1.0.5/setup.py
--- old/Theano-1.0.4/setup.py   2019-01-15 22:29:47.000000000 +0100
+++ new/Theano-1.0.5/setup.py   2020-07-27 18:09:24.000000000 +0200
@@ -36,10 +36,12 @@
 Programming Language :: Python :: 3.4
 Programming Language :: Python :: 3.5
 Programming Language :: Python :: 3.6
+Programming Language :: Python :: 3.7
+Programming Language :: Python :: 3.8
 """
 NAME                = 'Theano'
-MAINTAINER          = "LISA laboratory, University of Montreal"
-MAINTAINER_EMAIL    = "[email protected]"
+MAINTAINER          = "PyMC devs"
+MAINTAINER_EMAIL    = "[email protected]"
 DESCRIPTION         = ('Optimizing compiler for evaluating mathematical ' +
                        'expressions on CPUs and GPUs.')
 LONG_DESCRIPTION    = (codecs.open("DESCRIPTION.txt", encoding='utf-8').read() 
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/_version.py 
new/Theano-1.0.5/theano/_version.py
--- old/Theano-1.0.4/theano/_version.py 2019-01-15 22:31:00.000000000 +0100
+++ new/Theano-1.0.5/theano/_version.py 2020-07-27 18:12:54.000000000 +0200
@@ -8,11 +8,11 @@
 
 version_json = '''
 {
- "date": "2019-01-15T16:13:57-0500",
+ "date": "2020-07-27T18:09:29+0200",
  "dirty": false,
  "error": null,
- "full-revisionid": "e0167f24ae896a2e956cdd99a629910cd717a299",
- "version": "1.0.4"
+ "full-revisionid": "f3bb5b755ec5e92fb60b5364d83a10878fa9a211",
+ "version": "1.0.5"
 }
 '''  # END VERSION_JSON
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/compat/__init__.py 
new/Theano-1.0.5/theano/compat/__init__.py
--- old/Theano-1.0.4/theano/compat/__init__.py  2019-01-15 22:29:47.000000000 
+0100
+++ new/Theano-1.0.5/theano/compat/__init__.py  2020-07-27 18:09:24.000000000 
+0200
@@ -6,17 +6,18 @@
 from six import PY3, b, BytesIO, next
 from six.moves import configparser
 from six.moves import reload_module as reload
+from collections import OrderedDict
 try:
-    from collections.abc import (OrderedDict, MutableMapping as DictMixin,
-                                 Callable)
+    from collections.abc import (Callable, Iterable, Mapping, ValuesView,
+                                 MutableMapping as DictMixin)
 except ImportError:
-    # this raises an DeprecationWarning on py37 and will become
-    # and Exception in py38. Importing from collections.abc
-    # won't work on py27
-    from collections import (OrderedDict, MutableMapping as DictMixin,
-                             Callable)
+    # This raises a DeprecationWarning in py3.7 that will become an Exception 
in
+    # py3.10 although the scary warning still says "in 3.9 it will stop 
working".
+    # Importing from collections.abc won't work on py2.7.
+    from collections import (Callable, Iterable, Mapping, ValuesView,
+                             MutableMapping as DictMixin)
 
-__all__ = ['PY3', 'b', 'BytesIO', 'next', 'configparser', 'reload']
+__all__ = ['PY3', 'b', 'BytesIO', 'Callable', 'next', 'configparser', 'reload']
 
 if PY3:
     from operator import truediv as operator_div
@@ -73,8 +74,10 @@
     def decode_with(x, encoding):
         return x
 
-__all__ += ['cmp', 'operator_div', 'DictMixin', 'OrderedDict', 'decode',
-            'decode_iter', 'get_unbound_function', 'imap', 'izip', 'ifilter']
+__all__ += ['cmp', 'operator_div',
+            'DictMixin', 'Iterable', 'Mapping', 'OrderedDict', 'ValuesView',
+            'decode', 'decode_iter', 'get_unbound_function',
+            'imap', 'izip', 'ifilter']
 
 
 class DefaultOrderedDict(OrderedDict):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/compile/builders.py 
new/Theano-1.0.5/theano/compile/builders.py
--- old/Theano-1.0.4/theano/compile/builders.py 2019-01-15 22:29:47.000000000 
+0100
+++ new/Theano-1.0.5/theano/compile/builders.py 2020-07-27 18:09:24.000000000 
+0200
@@ -15,7 +15,7 @@
 
 
 class OpFromGraph(gof.Op):
-    """
+    r"""
     This creates an ``Op`` from inputs and outputs lists of variables.
     The signature is similar to :func:`theano.function <theano.function>`
     and the resulting ``Op``'s perform will do the same operation as::
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/compile/debugmode.py 
new/Theano-1.0.5/theano/compile/debugmode.py
--- old/Theano-1.0.4/theano/compile/debugmode.py        2019-01-15 
22:29:47.000000000 +0100
+++ new/Theano-1.0.5/theano/compile/debugmode.py        2020-07-27 
18:09:24.000000000 +0200
@@ -1910,6 +1910,7 @@
                         if thunk_py:
                             dmap = getattr(node.op, 'destroy_map', {})
                             vmap = getattr(node.op, 'view_map', {})
+                            # FIXME: This overwrites the outer loop variable 
`i`.
                             for i, r in enumerate(node.inputs):
                                 # if thunk_py ran, and we still got
                                 # this far, it means that the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/compile/function.py 
new/Theano-1.0.5/theano/compile/function.py
--- old/Theano-1.0.4/theano/compile/function.py 2019-01-15 22:29:47.000000000 
+0100
+++ new/Theano-1.0.5/theano/compile/function.py 2020-07-27 18:09:24.000000000 
+0200
@@ -243,7 +243,7 @@
 
     if name is None:
         # Determine possible file names
-        source_file = re.sub('\.pyc?', '.py', __file__)
+        source_file = re.sub(r'\.pyc?', '.py', __file__)
         compiled_file = source_file + 'c'
 
         stack = tb.extract_stack()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/compile/mode.py 
new/Theano-1.0.5/theano/compile/mode.py
--- old/Theano-1.0.4/theano/compile/mode.py     2019-01-15 22:29:47.000000000 
+0100
+++ new/Theano-1.0.5/theano/compile/mode.py     2020-07-06 17:49:15.000000000 
+0200
@@ -261,7 +261,7 @@
     def __init__(self, linker=None, optimizer='default'):
         if linker is None:
             linker = config.linker
-        if optimizer is 'default':
+        if type(optimizer) == str and optimizer == 'default':
             optimizer = config.optimizer
         Mode.__setstate__(self, (linker, optimizer))
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/compile/nanguardmode.py 
new/Theano-1.0.5/theano/compile/nanguardmode.py
--- old/Theano-1.0.4/theano/compile/nanguardmode.py     2019-01-15 
22:29:47.000000000 +0100
+++ new/Theano-1.0.5/theano/compile/nanguardmode.py     2020-07-06 
17:49:15.000000000 +0200
@@ -1,5 +1,4 @@
 from __future__ import absolute_import, print_function, division
-import collections
 import logging
 
 from six.moves import StringIO
@@ -9,6 +8,7 @@
 from theano import config
 import theano.tensor as T
 from theano.compile import Mode
+from theano.compat import ValuesView
 from .mode import get_mode
 
 try:
@@ -68,7 +68,7 @@
         A flattened list of objects.
 
     """
-    if isinstance(l, (list, tuple, collections.ValuesView)):
+    if isinstance(l, (list, tuple, ValuesView)):
         rval = []
         for elem in l:
             if isinstance(elem, (list, tuple)):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/compile/profiling.py 
new/Theano-1.0.5/theano/compile/profiling.py
--- old/Theano-1.0.4/theano/compile/profiling.py        2019-01-15 
22:29:47.000000000 +0100
+++ new/Theano-1.0.5/theano/compile/profiling.py        2020-07-06 
17:49:15.000000000 +0200
@@ -770,7 +770,7 @@
     def summary_memory(self, file, N=None):
         fct_memory = {}  # fgraph->dict(node->[outputs size])
         fct_shapes = {}  # fgraph->dict(node->[outputs shapes]))
-        var_mem = {}  # varible->size in bytes; don't include input variables
+        var_mem = {}  # variable->size in bytes; don't include input variables
         node_mem = {}  # node->total outputs size (only dense outputs)
 
         for node in self.apply_callcount:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/configdefaults.py 
new/Theano-1.0.5/theano/configdefaults.py
--- old/Theano-1.0.4/theano/configdefaults.py   2019-01-15 22:29:47.000000000 
+0100
+++ new/Theano-1.0.5/theano/configdefaults.py   2020-07-27 18:09:24.000000000 
+0200
@@ -222,7 +222,7 @@
 AddConfigVar('gpuarray.sched',
              """The sched parameter passed for context creation to pygpu.
                 With CUDA, using "multi" is equivalent to using the parameter
-                cudaDeviceScheduleYield. This is useful to lower the
+                cudaDeviceScheduleBlockingSync. This is useful to lower the
                 CPU overhead when waiting for GPU. One user found that it
                 speeds up his other processes that was doing data augmentation.
              """,
@@ -752,7 +752,7 @@
               "[warn] flags."),
              EnumStr('0.9', 'None', 'all', '0.3', '0.4', '0.4.1', '0.5', '0.6',
                      '0.7', '0.8', '0.8.1', '0.8.2', '0.9', '0.10', '1.0',
-                     '1.0.1', '1.0.2', '1.0.3', '1.0.4',
+                     '1.0.1', '1.0.2', '1.0.3', '1.0.4', '1.0.5',
                      allow_override=False),
              in_c_key=False)
 
@@ -1827,7 +1827,7 @@
 
 def default_compiledirname():
     formatted = theano.config.compiledir_format % compiledir_format_dict
-    safe = re.sub("[\(\)\s,]+", "_", formatted)
+    safe = re.sub(r"[()\s,]+", "_", formatted)
     return safe
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/gof/cmodule.py 
new/Theano-1.0.5/theano/gof/cmodule.py
--- old/Theano-1.0.4/theano/gof/cmodule.py      2019-01-15 22:29:47.000000000 
+0100
+++ new/Theano-1.0.5/theano/gof/cmodule.py      2020-07-27 18:09:24.000000000 
+0200
@@ -2219,6 +2219,21 @@
             # Use the already-loaded python symbols.
             cxxflags.extend(['-undefined', 'dynamic_lookup'])
 
+        if sys.platform == 'win32':
+            # Workaround for https://github.com/Theano/Theano/issues/4926.
+            # https://github.com/python/cpython/pull/11283/ removed the "hypot"
+            # redefinition for recent CPython versions (>=2.7.16 and >=3.7.3).
+            # The following nullifies that redefinition, if it is found.
+            python_version = sys.version_info[:3]
+            if python_version < (2, 7, 16) or (3,) <= python_version < (3, 7, 
3):
+                config_h_filename = distutils.sysconfig.get_config_h_filename()
+                try:
+                    with open(config_h_filename) as config_h:
+                        if any(line.startswith('#define hypot _hypot') for 
line in config_h):
+                            cxxflags.append('-D_hypot=hypot')
+                except IOError:
+                    pass
+
         return cxxflags
 
     @classmethod
@@ -2378,8 +2393,8 @@
             not_found_libraries = re.findall('-l["."-_a-zA-Z0-9]*', 
compile_stderr)
             for nf_lib in not_found_libraries:
                 print('library ' + nf_lib[2:] + ' is not found.')
-                if re.search('-lPYTHON["."0-9]*', nf_lib, re.IGNORECASE):
-                    py_string = re.search('-lpython["."0-9]*', nf_lib, 
re.IGNORECASE).group()[8:]
+                if re.search('-lPYTHON[".0-9]*', nf_lib, re.IGNORECASE):
+                    py_string = re.search('-lpython[".0-9]*', nf_lib, 
re.IGNORECASE).group()[8:]
                     if py_string != '':
                         print(
                             'Check if package python-dev ' + py_string + ' or 
python-devel ' + py_string + ' is installed.'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/gof/op.py 
new/Theano-1.0.5/theano/gof/op.py
--- old/Theano-1.0.4/theano/gof/op.py   2019-01-15 22:29:47.000000000 +0100
+++ new/Theano-1.0.5/theano/gof/op.py   2020-07-27 18:09:24.000000000 +0200
@@ -1540,12 +1540,12 @@
         undef_macros = []
 
         for i, inp in enumerate(inputs):
-            define_macros.append("#define INPUT_%d %s" (i, inp))
-            undef_macros.append("#undef INPUT_%d", (i,))
+            define_macros.append("#define INPUT_%d %s" % (i, inp))
+            undef_macros.append("#undef INPUT_%d" % (i,))
 
         for i, out in enumerate(outputs):
-            define_macros.append("#define OUTPUT_%d %s" (i, inp))
-            undef_macros.append("#undef OUTPUT_%d", (i,))
+            define_macros.append("#define OUTPUT_%d %s" % (i, inp))
+            undef_macros.append("#undef OUTPUT_%d" % (i,))
 
     def c_init_code_struct(self, node, name, sub):
         """
@@ -1596,6 +1596,7 @@
 
                 def_macros, undef_macros = self.get_c_macros(node, name)
                 def_sub, undef_sub = self.get_sub_macros(sub)
+                # FIXME: get_io_macros() doesn't return anything. Unpacking 
will raise a TypeError.
                 def_io, undef_io = self.get_io_macros(inp, out)
 
                 return '\n'.join([def_macros, def_sub, def_io,
@@ -1614,6 +1615,7 @@
 
             def_macros, undef_macros = self.get_c_macros(node, name)
             def_sub, undef_sub = self.get_sub_macros(sub)
+            # FIXME: get_io_macros() doesn't return anything. Unpacking will 
raise a TypeError.
             def_io, undef_io = self.get_io_macros(inputs, outputs)
 
             return '\n'.join([def_macros, def_sub, def_io,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/gof/opt.py 
new/Theano-1.0.5/theano/gof/opt.py
--- old/Theano-1.0.4/theano/gof/opt.py  2019-01-15 22:29:47.000000000 +0100
+++ new/Theano-1.0.5/theano/gof/opt.py  2020-07-06 17:49:15.000000000 +0200
@@ -1284,7 +1284,7 @@
 
         """
         if tracks is not None:
-            if len(tracks) is 0:
+            if len(tracks) == 0:
                 raise ValueError("Use None instead of an empty list to apply 
to all nodes.", f.__module__, f.__name__)
             for t in tracks:
                 if not (isinstance(t, op.Op) or issubclass(t, op.PureOp)):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Theano-1.0.4/theano/gof/tests/test_compute_test_value.py 
new/Theano-1.0.5/theano/gof/tests/test_compute_test_value.py
--- old/Theano-1.0.4/theano/gof/tests/test_compute_test_value.py        
2019-01-15 22:29:47.000000000 +0100
+++ new/Theano-1.0.5/theano/gof/tests/test_compute_test_value.py        
2020-07-06 17:49:15.000000000 +0200
@@ -285,12 +285,13 @@
             except ValueError:
                 # Get traceback
                 tb = sys.exc_info()[2]
-                # Get frame info 4 layers up
-                frame_info = traceback.extract_tb(tb)[-5]
+                frame_infos = traceback.extract_tb(tb)
                 # We should be in the "fx" function defined above
                 expected = 'test_compute_test_value.py'
-                assert os.path.split(frame_info[0])[1] == expected, frame_info
-                assert frame_info[2] == 'fx'
+                assert any((os.path.split(
+                    frame_info[0])[1] == expected and
+                    frame_info[2] == 'fx') for frame_info in
+                    frame_infos), frame_infos
 
         finally:
             theano.config.compute_test_value = orig_compute_test_value
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/gof/tests/test_link.py 
new/Theano-1.0.5/theano/gof/tests/test_link.py
--- old/Theano-1.0.4/theano/gof/tests/test_link.py      2019-01-15 
22:29:47.000000000 +0100
+++ new/Theano-1.0.5/theano/gof/tests/test_link.py      2020-07-06 
17:49:15.000000000 +0200
@@ -113,7 +113,7 @@
     def test_input_output_same(self):
         x, y, z = inputs()
         fn = perform_linker(FunctionGraph([x], [x])).make_function()
-        assert 1.0 is fn(1.0)
+        assert 1.0 == fn(1.0)
 
     def test_input_dependency0(self):
         x, y, z = inputs()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/gof/unify.py 
new/Theano-1.0.5/theano/gof/unify.py
--- old/Theano-1.0.4/theano/gof/unify.py        2019-01-15 22:29:47.000000000 
+0100
+++ new/Theano-1.0.5/theano/gof/unify.py        2020-07-27 18:09:24.000000000 
+0200
@@ -322,7 +322,7 @@
 
 @comm_guard(OrVariable, NotVariable)  # noqa
 def unify_walk(o, n, U):
-    """
+    r"""
     OrV(list1) == NV(list2) == OrV(list1 \ list2)
 
     """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/gof/utils.py 
new/Theano-1.0.5/theano/gof/utils.py
--- old/Theano-1.0.4/theano/gof/utils.py        2019-01-15 22:29:47.000000000 
+0100
+++ new/Theano-1.0.5/theano/gof/utils.py        2020-07-27 18:09:24.000000000 
+0200
@@ -307,7 +307,7 @@
 
 
 def difference(seq1, seq2):
-    """
+    r"""
     Returns all elements in seq1 which are not in seq2: i.e ``seq1\seq2``.
 
     """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/gpuarray/tests/test_subtensor.py 
new/Theano-1.0.5/theano/gpuarray/tests/test_subtensor.py
--- old/Theano-1.0.4/theano/gpuarray/tests/test_subtensor.py    2019-01-15 
22:29:47.000000000 +0100
+++ new/Theano-1.0.5/theano/gpuarray/tests/test_subtensor.py    2020-07-27 
18:09:24.000000000 +0200
@@ -321,7 +321,7 @@
 
 class TestGpuAllocDiag(test_basic.TestAllocDiag):
     def __init__(self, name):
-        return test_basic.TestAllocDiag.__init__(
+        test_basic.TestAllocDiag.__init__(
             self, name,
             alloc_diag=GpuAllocDiag,
             mode=mode_with_gpu
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/misc/frozendict.py 
new/Theano-1.0.5/theano/misc/frozendict.py
--- old/Theano-1.0.4/theano/misc/frozendict.py  2019-01-15 22:29:47.000000000 
+0100
+++ new/Theano-1.0.5/theano/misc/frozendict.py  2020-07-06 17:49:15.000000000 
+0200
@@ -5,10 +5,12 @@
 import operator
 import functools
 
+from theano.compat import Mapping
 
-class frozendict(collections.Mapping):
+
+class frozendict(Mapping):
     """
-    An immutable wrapper around dictionaries that implements the complete 
:py:class:`collections.Mapping`
+    An immutable wrapper around dictionaries that implements the complete 
:py:class:`collections.abc.Mapping`
     interface. It can be used as a drop-in replacement for dictionaries where 
immutability and ordering are desired.
     """
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/sandbox/rng_mrg.py 
new/Theano-1.0.5/theano/sandbox/rng_mrg.py
--- old/Theano-1.0.4/theano/sandbox/rng_mrg.py  2019-01-15 22:29:47.000000000 
+0100
+++ new/Theano-1.0.5/theano/sandbox/rng_mrg.py  2020-07-06 17:49:15.000000000 
+0200
@@ -16,7 +16,7 @@
 import warnings
 
 import numpy as np
-from six import integer_types
+from six import integer_types, string_types
 from six.moves import xrange
 
 import theano
@@ -768,7 +768,7 @@
         and they are spaced by 2**72 samples.
 
         """
-        assert isinstance(dtype, str)
+        assert isinstance(dtype, string_types)
         assert n_streams < 2**72
         assert n_streams > 0
         rval = np.zeros((n_streams, 6), dtype='int32')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/scalar/basic.py 
new/Theano-1.0.5/theano/scalar/basic.py
--- old/Theano-1.0.4/theano/scalar/basic.py     2019-01-15 22:29:47.000000000 
+0100
+++ new/Theano-1.0.5/theano/scalar/basic.py     2020-07-06 17:49:15.000000000 
+0200
@@ -22,7 +22,7 @@
 from six.moves import xrange
 
 import theano
-from theano.compat import imap, izip
+from theano.compat import imap, izip, Callable
 from theano import gof, printing
 from theano.gof import (Op, utils, Variable, Constant, Type, Apply,
                         FunctionGraph)
@@ -33,7 +33,6 @@
 from theano.gradient import grad_undefined
 
 from theano.printing import pprint
-import collections
 
 builtin_bool = bool
 builtin_complex = complex
@@ -1028,7 +1027,7 @@
     def __init__(self, output_types_preference=None, name=None):
         self.name = name
         if output_types_preference is not None:
-            if not isinstance(output_types_preference, collections.Callable):
+            if not isinstance(output_types_preference, Callable):
                 raise TypeError(
                     "Expected a callable for the 'output_types_preference' 
argument to %s. (got: %s)" %
                     (self.__class__, output_types_preference))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/scalar/basic_scipy.py 
new/Theano-1.0.5/theano/scalar/basic_scipy.py
--- old/Theano-1.0.4/theano/scalar/basic_scipy.py       2019-01-15 
22:29:47.000000000 +0100
+++ new/Theano-1.0.5/theano/scalar/basic_scipy.py       2020-07-06 
17:49:15.000000000 +0200
@@ -596,7 +596,7 @@
         if node.inputs[0].type in float_types:
             dtype = 'npy_' + node.outputs[0].dtype
             return """%(z)s =
-                (%(dtype)s) gammaQ(%(k)s, %(x)s);""" % locals()
+                (%(dtype)s) GammaQ(%(k)s, %(x)s);""" % locals()
         raise NotImplementedError('only floatingpoint is implemented')
 
     def __eq__(self, other):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/sparse/tests/test_basic.py 
new/Theano-1.0.5/theano/sparse/tests/test_basic.py
--- old/Theano-1.0.4/theano/sparse/tests/test_basic.py  2019-01-15 
22:29:47.000000000 +0100
+++ new/Theano-1.0.5/theano/sparse/tests/test_basic.py  2020-07-06 
17:49:15.000000000 +0200
@@ -160,7 +160,15 @@
     if unsorted_indices:
         for idx in range(n):
             d = data[idx]
-            d = d[list(range(d.shape[0]))]
+            # these flip the matrix, but it's random anyway
+            if format == 'csr':
+                d = scipy.sparse.csr_matrix(
+                    (d.data, d.shape[1] - 1 - d.indices, d.indptr),
+                    shape=d.shape)
+            if format == 'csc':
+                d = scipy.sparse.csc_matrix(
+                    (d.data, d.shape[0] - 1 - d.indices, d.indptr),
+                    shape=d.shape)
             assert not d.has_sorted_indices
             data[idx] = d
     if explicit_zero:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/tensor/basic.py 
new/Theano-1.0.5/theano/tensor/basic.py
--- old/Theano-1.0.4/theano/tensor/basic.py     2019-01-15 22:29:47.000000000 
+0100
+++ new/Theano-1.0.5/theano/tensor/basic.py     2020-07-06 17:49:15.000000000 
+0200
@@ -6608,7 +6608,7 @@
                            idxs + np.maximum(0, offset)])
 
         # Fill in final 2 axes with x
-        result[diagonal_slice] = x
+        result[tuple(diagonal_slice)] = x
 
         if len(x.shape) > 1:
             # Re-order axes so they correspond to diagonals at axis1, axis2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/tensor/nlinalg.py 
new/Theano-1.0.5/theano/tensor/nlinalg.py
--- old/Theano-1.0.4/theano/tensor/nlinalg.py   2019-01-15 22:29:47.000000000 
+0100
+++ new/Theano-1.0.5/theano/tensor/nlinalg.py   2020-07-27 18:09:24.000000000 
+0200
@@ -75,7 +75,7 @@
 
 
 class MatrixInverse(Op):
-    """Computes the inverse of a matrix :math:`A`.
+    r"""Computes the inverse of a matrix :math:`A`.
 
     Given a square matrix :math:`A`, ``matrix_inverse`` returns a square
     matrix :math:`A_{inv}` such that the dot product :math:`A \cdot A_{inv}`
@@ -149,7 +149,7 @@
 
 
 def matrix_dot(*args):
-    """ Shorthand for product between several dots.
+    r""" Shorthand for product between several dots.
 
     Given :math:`N` matrices :math:`A_0, A_1, .., A_N`, ``matrix_dot`` will
     generate the matrix product between all in the given order, namely
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/tensor/nnet/abstract_conv.py 
new/Theano-1.0.5/theano/tensor/nnet/abstract_conv.py
--- old/Theano-1.0.4/theano/tensor/nnet/abstract_conv.py        2019-01-15 
22:29:47.000000000 +0100
+++ new/Theano-1.0.5/theano/tensor/nnet/abstract_conv.py        2020-07-06 
17:49:15.000000000 +0200
@@ -6,7 +6,10 @@
 import logging
 from six import reraise, integer_types
 import sys
-from fractions import gcd
+try:
+    from math import gcd
+except ImportError:
+    from fractions import gcd
 
 import theano
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/tensor/nnet/bn.py 
new/Theano-1.0.5/theano/tensor/nnet/bn.py
--- old/Theano-1.0.4/theano/tensor/nnet/bn.py   2019-01-15 22:29:47.000000000 
+0100
+++ new/Theano-1.0.5/theano/tensor/nnet/bn.py   2020-07-06 17:49:15.000000000 
+0200
@@ -642,7 +642,7 @@
         # some inputs should be disconnected
         results = [g_wrt_x, g_wrt_dy, g_wrt_scale, g_wrt_x_mean, 
g_wrt_x_invstd,
                    theano.gradient.DisconnectedType()()]
-        return [theano.gradient.DisconnectedType()() if r is 0 else r
+        return [theano.gradient.DisconnectedType()() if (type(r) == int and r 
== 0) else r
                 for r in results]
 
     def connection_pattern(self, node):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/tensor/nnet/conv.py 
new/Theano-1.0.5/theano/tensor/nnet/conv.py
--- old/Theano-1.0.4/theano/tensor/nnet/conv.py 2019-01-15 22:29:47.000000000 
+0100
+++ new/Theano-1.0.5/theano/tensor/nnet/conv.py 2020-07-27 18:09:24.000000000 
+0200
@@ -157,7 +157,7 @@
 
 
 class ConvOp(OpenMPOp):
-    """
+    r"""
     This Op serves a dual purpose: it can implement a vanilla 2D convolution
     (as taught in any signal processing class) or implement the
     convolutional layers found in Convolutional Neural Networks.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/tensor/nnet/nnet.py 
new/Theano-1.0.5/theano/tensor/nnet/nnet.py
--- old/Theano-1.0.4/theano/tensor/nnet/nnet.py 2019-01-15 22:29:47.000000000 
+0100
+++ new/Theano-1.0.5/theano/tensor/nnet/nnet.py 2020-07-27 18:09:24.000000000 
+0200
@@ -409,7 +409,7 @@
 
 
 class Softmax(gof.Op):
-    """
+    r"""
     Softmax activation function
     :math:`\\varphi(\\mathbf{x})_j =
     \\frac{e^{\mathbf{x}_j}}{\sum_{k=1}^K e^{\mathbf{x}_k}}`
@@ -600,7 +600,7 @@
 
 
 class LogSoftmax(gof.Op):
-    """
+    r"""
     LogSoftmax activation function
     :math:`\\varphi(\\mathbf{x})_j =
     \\e^{(\mathbf{x}_j - log{\sum_{k=1}^K e^{\mathbf{x}_k})}}
@@ -1412,7 +1412,7 @@
 
 
 class CrossentropyCategorical1Hot(gof.Op):
-    """
+    r"""
     Compute the cross entropy between a coding distribution and
     a true distribution of the form [0, 0, ... 0, 1, 0, ..., 0].
 
@@ -2051,7 +2051,7 @@
 
 
 def categorical_crossentropy(coding_dist, true_dist):
-    """
+    r"""
     Return the cross-entropy between an approximating distribution and a true
     distribution.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Theano-1.0.4/theano/tensor/nnet/tests/test_abstract_conv.py 
new/Theano-1.0.5/theano/tensor/nnet/tests/test_abstract_conv.py
--- old/Theano-1.0.4/theano/tensor/nnet/tests/test_abstract_conv.py     
2019-01-15 22:29:47.000000000 +0100
+++ new/Theano-1.0.5/theano/tensor/nnet/tests/test_abstract_conv.py     
2020-07-06 17:49:15.000000000 +0200
@@ -1326,6 +1326,13 @@
         f_up_x = theano.function([], up_x, mode=self.compile_mode)
         utt.assert_allclose(f_up_x(), num_up_x, rtol=1e-6)
 
+    def test_fractional_bilinear_upsampling_shape(self):
+        x = np.random.rand(1, 1, 200, 200).astype(theano.config.floatX)
+        resize = (24, 20)
+        z = bilinear_upsampling(tensor.as_tensor_variable(x), 
frac_ratio=resize, use_1D_kernel=False)
+        out = theano.function([], z.shape, mode='FAST_RUN')()
+        utt.assert_allclose(out, (1, 1, 240, 240))
+
 
 class TestConv2dTranspose(unittest.TestCase):
     mode = None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/tensor/nnet/tests/test_conv.py 
new/Theano-1.0.5/theano/tensor/nnet/tests/test_conv.py
--- old/Theano-1.0.4/theano/tensor/nnet/tests/test_conv.py      2019-01-15 
22:29:47.000000000 +0100
+++ new/Theano-1.0.5/theano/tensor/nnet/tests/test_conv.py      2020-07-06 
17:49:15.000000000 +0200
@@ -95,7 +95,7 @@
         # REFERENCE IMPLEMENTATION
         s = 1.
         orig_image_data = image_data
-        if border_mode is not 'full':
+        if border_mode != 'full':
             s = -1.
         out_shape2d = np.array(N_image_shape[-2:]) +\
             s * np.array(N_filter_shape[-2:]) - s
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/tensor/opt.py 
new/Theano-1.0.5/theano/tensor/opt.py
--- old/Theano-1.0.4/theano/tensor/opt.py       2019-01-15 22:29:47.000000000 
+0100
+++ new/Theano-1.0.5/theano/tensor/opt.py       2020-07-27 18:09:24.000000000 
+0200
@@ -4582,7 +4582,7 @@
 
 
 class Canonizer(gof.LocalOptimizer):
-    """
+    r"""
     Simplification tool. The variable is a local_optimizer. It is best used
     with a TopoOptimizer in in_to_out order.
 
@@ -4613,9 +4613,9 @@
     --------
     >>> import theano.tensor as T
     >>> from theano.tensor.opt import Canonizer
-    >>> add_canonizer = Canonizer(T.add, T.sub, T.neg, \\
+    >>> add_canonizer = Canonizer(T.add, T.sub, T.neg, \
     ...                           lambda n, d: sum(n) - sum(d))
-    >>> mul_canonizer = Canonizer(T.mul, T.true_div, T.inv, \\
+    >>> mul_canonizer = Canonizer(T.mul, T.true_div, T.inv, \
     ...                           lambda n, d: prod(n) / prod(d))
 
     Examples of optimizations mul_canonizer can perform:
@@ -4650,7 +4650,7 @@
         return [self.main, self.inverse, self.reciprocal]
 
     def get_num_denum(self, input):
-        """
+        r"""
         This extract two lists, num and denum, such that the input is:
         self.inverse(self.main(\*num), self.main(\*denum)). It returns
         the two lists in a (num, denum) pair.
@@ -4751,7 +4751,7 @@
         return num, denum
 
     def merge_num_denum(self, num, denum):
-        """
+        r"""
         Utility function which takes two lists, num and denum, and
         returns something which is equivalent to inverse(main(\*num),
         main(\*denum)), but depends on the length of num and the length
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/tensor/sort.py 
new/Theano-1.0.5/theano/tensor/sort.py
--- old/Theano-1.0.4/theano/tensor/sort.py      2019-01-15 22:29:47.000000000 
+0100
+++ new/Theano-1.0.5/theano/tensor/sort.py      2020-07-06 17:49:15.000000000 
+0200
@@ -45,6 +45,10 @@
     def perform(self, node, inputs, output_storage):
         a = inputs[0]
         axis = inputs[1]
+        if axis is not None:
+            if axis != int(axis):
+                raise ValueError("sort axis must be an integer or None")
+            axis = int(axis)
         z = output_storage[0]
         z[0] = np.sort(a, axis, self.kind, self.order)
 
@@ -172,6 +176,10 @@
     def perform(self, node, inputs, output_storage):
         a = inputs[0]
         axis = inputs[1]
+        if axis is not None:
+            if axis != int(axis):
+                raise ValueError("sort axis must be an integer or None")
+            axis = int(axis)
         z = output_storage[0]
         z[0] = theano._asarray(np.argsort(a, axis, self.kind, self.order),
                                dtype=node.outputs[0].dtype)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/tensor/subtensor.py 
new/Theano-1.0.5/theano/tensor/subtensor.py
--- old/Theano-1.0.4/theano/tensor/subtensor.py 2019-01-15 22:29:47.000000000 
+0100
+++ new/Theano-1.0.5/theano/tensor/subtensor.py 2020-07-27 18:09:24.000000000 
+0200
@@ -1,7 +1,6 @@
 from __future__ import absolute_import, print_function, division
 import sys
 from textwrap import dedent
-import collections
 import warnings
 import logging
 
@@ -22,6 +21,7 @@
 from theano.tensor.elemwise import DimShuffle
 from theano.tensor.type_other import NoneConst, SliceType, NoneTypeT, 
make_slice
 from theano import config
+from theano.compat import Iterable
 
 from .inc_code import inc_code
 
@@ -1932,7 +1932,7 @@
             raise TypeError(
                 'cannot %s x subtensor with ndim=%s'
                 ' by y with ndim=%s to x subtensor with ndim=%s ' % (
-                    opname, x_.type.ndim, y_.type.ndim))
+                    opname, x_.type.ndim, y_.type.ndim, '?'))  # FIXME: too 
few args for format string
 
         return Apply(self, [x_, y_, ilist_], [x_.type()])
 
@@ -2154,7 +2154,7 @@
         pass
 
     if (not isinstance(args_el, theano.tensor.Variable) and
-            isinstance(args_el, collections.Iterable)):
+            isinstance(args_el, Iterable)):
         for el in args_el:
             check_and_reject_bool(el)
 
@@ -2194,7 +2194,7 @@
     def perform(self, node, inputs, out_):
         out, = out_
         check_advanced_indexing_dimensions(inputs[0], inputs[1:])
-        rval = inputs[0].__getitem__(inputs[1:])
+        rval = inputs[0].__getitem__(tuple(inputs[1:]))
         # When there are no arrays, we are not actually doing advanced
         # indexing, so __getitem__ will not return a copy.
         # Since no view_map is set, we need to copy the returned value
@@ -2336,7 +2336,7 @@
             out[0] = inputs[0]
 
         if self.set_instead_of_inc:
-            out[0][inputs[2:]] = inputs[1]
+            out[0][tuple(inputs[2:])] = inputs[1]
         else:
             np.add.at(out[0], tuple(inputs[2:]), inputs[1])
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/tensor/tests/mlp_test.py 
new/Theano-1.0.5/theano/tensor/tests/mlp_test.py
--- old/Theano-1.0.4/theano/tensor/tests/mlp_test.py    2019-01-15 
22:29:47.000000000 +0100
+++ new/Theano-1.0.5/theano/tensor/tests/mlp_test.py    2020-07-27 
18:09:24.000000000 +0200
@@ -93,7 +93,7 @@
         self.params = [self.W]
 
     def negative_log_likelihood(self, y):
-        """Return the mean of the negative log-likelihood of the prediction
+        r"""Return the mean of the negative log-likelihood of the prediction
         of this model under a given target distribution.
 
         .. math::
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/tensor/tests/test_basic.py 
new/Theano-1.0.5/theano/tensor/tests/test_basic.py
--- old/Theano-1.0.4/theano/tensor/tests/test_basic.py  2019-01-15 
22:29:47.000000000 +0100
+++ new/Theano-1.0.5/theano/tensor/tests/test_basic.py  2020-07-27 
18:09:24.000000000 +0200
@@ -2835,11 +2835,7 @@
               correct6=(randint(5, 5).astype('int64'),
                         np.array(-1, dtype='int64'),
                         np.array(1, dtype='int64')),
-              # min > max. messed up behaviour, but
-              # should be same as NumPy's
-              correct7=((5 * rand(5, 5)).astype('float64'),
-                        np.array(1, dtype='float64'),
-                        np.array(-1, dtype='float64')),
+              # min > max case moved below as numpy has changed
               correct8=(randint(0, 5).astype('uint8'),
                         np.array(2, dtype='uint8'),
                         np.array(4, dtype='uint8')),
@@ -2850,6 +2846,18 @@
     )
 
 
+# min > max case - numpy.clip has changed but we haven't
+# https://github.com/Theano/Theano/issues/6715
+BackwardsClipTester = makeTester(
+    name='BackwardsClipTester',
+    op=clip,
+    expected=lambda x, y, z: np.where(x < y, y, np.minimum(x, z)),
+    good=dict(correct7=((5 * rand(5, 5)).astype('float64'),
+                        np.array(1, dtype='float64'),
+                        np.array(-1, dtype='float64')),)
+    )
+
+
 class T_Clip(unittest.TestCase):
     def test_complex_value(self):
         for dtype in ['complex64', 'complex128']:
@@ -7597,7 +7605,7 @@
             mode = theano.compile.mode.get_default_mode()
         self.mode = mode
 
-        return super(TestAllocDiag, self).__init__(name)
+        super(TestAllocDiag, self).__init__(name)
 
     def _generator(self):
         dims = 4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/tensor/tests/test_raw_random.py 
new/Theano-1.0.5/theano/tensor/tests/test_raw_random.py
--- old/Theano-1.0.4/theano/tensor/tests/test_raw_random.py     2019-01-15 
22:29:47.000000000 +0100
+++ new/Theano-1.0.5/theano/tensor/tests/test_raw_random.py     2020-07-06 
17:49:15.000000000 +0200
@@ -678,10 +678,10 @@
         numpy_val1c = as_floatX(numpy_rng.uniform(low=[-4.], high=[-1]))
         assert np.all(val0c == numpy_val0c)
         assert np.all(val1c == numpy_val1c)
-        self.assertRaises(ValueError, fc, post1c, [-4., -2], [-1, 0], [1])
+        #self.assertRaises(ValueError, fc, post1c, [-4., -2], [-1, 0], [1])
         self.assertRaises(ValueError, fc, post1c, [-4., -2], [-1, 0], [1, 2])
         self.assertRaises(ValueError, fc, post1c, [-4., -2], [-1, 0], [2, 1])
-        self.assertRaises(ValueError, fc, post1c, [-4., -2], [-1], [1])
+        #self.assertRaises(ValueError, fc, post1c, [-4., -2], [-1], [1])
         # TODO: do we want that?
         #self.assertRaises(ValueError, fc, post1c, [-4., -2], [-1], [2])
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Theano-1.0.4/theano/tensor/tests/test_shared_randomstreams.py 
new/Theano-1.0.5/theano/tensor/tests/test_shared_randomstreams.py
--- old/Theano-1.0.4/theano/tensor/tests/test_shared_randomstreams.py   
2019-01-15 22:29:47.000000000 +0100
+++ new/Theano-1.0.5/theano/tensor/tests/test_shared_randomstreams.py   
2020-07-06 17:49:15.000000000 +0200
@@ -466,10 +466,10 @@
         numpy_val1c = numpy_rng.uniform(low=[-4.], high=[-1])
         assert np.all(val0c == numpy_val0c)
         assert np.all(val1c == numpy_val1c)
-        self.assertRaises(ValueError, fc, [-4., -2], [-1, 0], [1])
+        #self.assertRaises(ValueError, fc, [-4., -2], [-1, 0], [1])
         self.assertRaises(ValueError, fc, [-4., -2], [-1, 0], [1, 2])
         self.assertRaises(ValueError, fc, [-4., -2], [-1, 0], [2, 1])
-        self.assertRaises(ValueError, fc, [-4., -2], [-1], [1])
+        #self.assertRaises(ValueError, fc, [-4., -2], [-1], [1])
         # TODO: do we want that?
         #self.assertRaises(ValueError, fc, [-4., -2], [-1], [2])
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/tensor/tests/test_subtensor.py 
new/Theano-1.0.5/theano/tensor/tests/test_subtensor.py
--- old/Theano-1.0.4/theano/tensor/tests/test_subtensor.py      2019-01-15 
22:29:47.000000000 +0100
+++ new/Theano-1.0.5/theano/tensor/tests/test_subtensor.py      2020-07-27 
18:09:24.000000000 +0200
@@ -80,7 +80,7 @@
         self.fast_compile = theano.config.mode == 'FAST_COMPILE'
         self.ops = (sub, inc_sub, adv_sub1, adv_incsub1,
                     adv_bool_sub, adv_bool_inc_sub)
-        return super(T_subtensor, self).__init__(name)
+        super(T_subtensor, self).__init__(name)
 
     def function(self, inputs, outputs, accept_inplace=False,
                  op=None, mode=None, N=1, N_fast=None):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/tensor/var.py 
new/Theano-1.0.5/theano/tensor/var.py
--- old/Theano-1.0.4/theano/tensor/var.py       2019-01-15 22:29:47.000000000 
+0100
+++ new/Theano-1.0.5/theano/tensor/var.py       2020-07-06 17:49:15.000000000 
+0200
@@ -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
@@ -244,6 +247,15 @@
     def __rpow__(self, other):
         return theano.tensor.basic.pow(other, self)
 
+    def __ceil__(self):
+        return theano.tensor.ceil(self)
+
+    def __floor__(self):
+        return theano.tensor.floor(self)
+
+    def __trunc__(self):
+        return theano.tensor.trunc(self)
+
     # TRANSPOSE
     T = property(lambda self: theano.tensor.basic.transpose(self))
 
@@ -465,7 +477,7 @@
                     (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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/tests/test_determinism.py 
new/Theano-1.0.5/theano/tests/test_determinism.py
--- old/Theano-1.0.4/theano/tests/test_determinism.py   2019-01-15 
22:29:47.000000000 +0100
+++ new/Theano-1.0.5/theano/tests/test_determinism.py   2020-07-06 
17:49:15.000000000 +0200
@@ -57,7 +57,7 @@
             updates.append((s, val))
 
         for var in theano.gof.graph.ancestors(update for _, update in updates):
-            if var.name is not None and var.name is not 'b':
+            if var.name is not None and var.name != 'b':
                 if var.name[0] != 's' or len(var.name) != 2:
                     var.name = None
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/tests/test_flake8.py 
new/Theano-1.0.5/theano/tests/test_flake8.py
--- old/Theano-1.0.4/theano/tests/test_flake8.py        2019-01-15 
22:29:47.000000000 +0100
+++ new/Theano-1.0.5/theano/tests/test_flake8.py        2020-07-06 
17:49:15.000000000 +0200
@@ -38,7 +38,7 @@
 # - "ambiguous variable name" (E741)
 #   Redundant error code generated by flake8-future-import module
 ignore = ('E501', 'E123', 'E133', 'FI12', 'FI14', 'FI15', 'FI16', 'FI17',
-          'FI50', 'FI51', 'FI53', 'E305', 'E741')
+          'FI18', 'FI50', 'FI51', 'FI53', 'E305', 'E741')
 
 whitelist_flake8 = [
     "__init__.py",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Theano-1.0.4/theano/version.py 
new/Theano-1.0.5/theano/version.py
--- old/Theano-1.0.4/theano/version.py  2019-01-15 22:29:47.000000000 +0100
+++ new/Theano-1.0.5/theano/version.py  2020-07-27 18:09:24.000000000 +0200
@@ -2,7 +2,7 @@
 
 from theano._version import get_versions
 
-FALLBACK_VERSION = "1.0.4+unknown"
+FALLBACK_VERSION = "1.0.5+unknown"
 
 info = get_versions()
 if info['error'] is not None:


Reply via email to