Hello community,

here is the log from the commit of package python-Theano for openSUSE:Factory 
checked in at 2020-10-28 10:01:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Theano (Old)
 and      /work/SRC/openSUSE:Factory/.python-Theano.new.3463 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Theano"

Wed Oct 28 10:01:47 2020 rev:7 rq:844472 version:1.0.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Theano/python-Theano.changes      
2020-08-04 20:22:39.961003533 +0200
+++ /work/SRC/openSUSE:Factory/.python-Theano.new.3463/python-Theano.changes    
2020-10-28 10:02:30.355317861 +0100
@@ -1,0 +2,7 @@
+Tue Oct 27 21:28:53 UTC 2020 - Matej Cepl <mc...@suse.com>
+
+- Add patches remove_nose.patch and remove_warnings.patch to port the
+  test suite from nose to pytest (and unittest), and to clean up some
+  deprecation warnings (gh#Theano/Theano#6764).
+
+-------------------------------------------------------------------

New:
----
  remove_nose.patch
  remove_warnings.patch

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

Other differences:
------------------
++++++ python-Theano.spec ++++++
--- /var/tmp/diff_new_pack.z9nHlV/_old  2020-10-28 10:02:33.371319972 +0100
+++ /var/tmp/diff_new_pack.z9nHlV/_new  2020-10-28 10:02:33.375319974 +0100
@@ -34,6 +34,12 @@
 URL:            https://github.com/Theano/Theano
 Source:         
https://files.pythonhosted.org/packages/source/T/Theano/Theano-%{version}.tar.gz
 Source1:        python-Theano.rpmlintrc
+# PATCH-FIX-UPSTREAM remove_warnings.patch gh#Theano/Theano#6764 mc...@suse.com
+# Remove various deprecations
+Patch0:         remove_warnings.patch
+# PATCH-FEATURE-UPSTREAM remove_nose.patch gh#Theano/Theano#6764 mc...@suse.com
+# port the test suite from nose to pytest
+Patch1:         remove_nose.patch
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  c++_compiler
@@ -52,10 +58,10 @@
 BuildArch:      noarch
 %endif
 %if %{with test}
-BuildRequires:  %{python_module nose}
 BuildRequires:  %{python_module numpy >= 1.9.1}
 BuildRequires:  %{python_module numpy-devel}
 BuildRequires:  %{python_module parameterized}
+BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module scipy >= 0.14}
 BuildRequires:  %{python_module six >= 1.9.0}
 %endif
@@ -78,6 +84,14 @@
 
 %prep
 %setup -q -n Theano-%{version}
+%autopatch -p1
+
+for script in theano/gpuarray/tests/check_dnn_conv.py \
+    theano/misc/buildbot_filter.py theano/gpuarray/tests/check_dnn_conv.py \
+    theano/misc/check_*.py theano/tests/run_tests_in_batch.py
+    do
+        sed -i -e '1s@/usr/bin/env python@/usr/bin/python@' "$script"
+    done
 
 %build
 %python_build
@@ -85,7 +99,6 @@
 %install
 %if !%{with test}
 %python_install
-%python_clone -a %{buildroot}%{_bindir}/theano-nose
 %python_clone -a %{buildroot}%{_bindir}/theano-cache
 
 # remove binaries and stuff thats not supposed to end up on system
@@ -103,23 +116,20 @@
 %if %{with test}
 # https://github.com/Theano/Theano/issues/6719
 rm theano/tensor/tests/test_var.py
-%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} 
nosetests-%{$python_bin_suffix} theano/tests -v -e 
'(test_scan_err1|test_remove0|test_csm_unsorted|test_good|test_vector_arguments|test_vector_arguments)'
+%pytest -k 'not (test_scan_err1 or test_remove0 or test_csm_unsorted or 
test_good or test_vector_arguments or test_vector_arguments)' theano/tests 
 %endif
 
 %if !%{with test}
 %post
-%python_install_alternative theano-nose
 %python_install_alternative theano-cache
 
 %postun
-%python_uninstall_alternative theano-nose
 %python_uninstall_alternative theano-cache
 
 %files %{python_files}
 %doc DESCRIPTION.txt EMAIL.txt HISTORY.txt NEWS.txt README.rst
 %license doc/LICENSE.txt
 %python_alternative %{_bindir}/theano-cache
-%python_alternative %{_bindir}/theano-nose
 %{python_sitelib}/theano
 %{python_sitelib}/Theano-%{version}-*.egg-info
 %endif

++++++ remove_nose.patch ++++++
++++ 5211 lines (skipped)

++++++ remove_warnings.patch ++++++
---
 theano/gpuarray/fft.py           |    4 ++--
 theano/printing.py               |    2 +-
 theano/tensor/nnet/neighbours.py |    2 +-
 theano/tensor/slinalg.py         |    2 +-
 theano/tests/breakpoint.py       |   10 +++-------
 5 files changed, 8 insertions(+), 12 deletions(-)

--- a/theano/tests/breakpoint.py
+++ b/theano/tests/breakpoint.py
@@ -1,6 +1,6 @@
 from __future__ import absolute_import, print_function, division
 import numpy as np
-import imp
+import sys
 
 import theano
 from theano.gof import Op, Apply
@@ -118,12 +118,8 @@ class PdbBreakpoint(Op):
             print("resumes, the updated values will be used.")
             print("-------------------------------------------------")
 
-            if imp.find_module('pudb'):
-                import pudb
-                pudb.set_trace()
-            elif imp.find_module('ipdb'):
-                import ipdb
-                ipdb.set_trace()
+            if sys.version[:2] >= (3, 7):
+                breakpoint()
             else:
                 import pdb
                 pdb.set_trace()
--- a/theano/gpuarray/fft.py
+++ b/theano/gpuarray/fft.py
@@ -302,7 +302,7 @@ def curfft(inp, norm=None):
     norm : {None, 'ortho', 'no_norm'}
         Normalization of transform. Following numpy, default *None* normalizes
         only the inverse transform by n, 'ortho' yields the unitary transform
-        (:math:`1/\sqrt n` forward and inverse). In addition, 'no_norm' leaves
+        (:math:`1/\\sqrt n` forward and inverse). In addition, 'no_norm' leaves
         the transform unnormalized.
 
     """
@@ -337,7 +337,7 @@ def cuirfft(inp, norm=None, is_odd=False
     norm : {None, 'ortho', 'no_norm'}
         Normalization of transform. Following numpy, default *None* normalizes
         only the inverse transform by n, 'ortho' yields the unitary transform
-        (:math:`1/\sqrt n` forward and inverse). In addition, 'no_norm' leaves
+        (:math:`1/\\sqrt n` forward and inverse). In addition, 'no_norm' leaves
         the transform unnormalized.
     is_odd : {True, False}
         Set to True to get a real inverse transform output with an odd last 
dimension
--- a/theano/printing.py
+++ b/theano/printing.py
@@ -1265,7 +1265,7 @@ def hex_digest(x):
     Returns a short, mostly hexadecimal hash of a numpy ndarray
     """
     assert isinstance(x, np.ndarray)
-    rval = hashlib.sha256(x.tostring()).hexdigest()
+    rval = hashlib.sha256(x.tobytes()).hexdigest()
     # hex digest must be annotated with strides to avoid collisions
     # because the buffer interface only exposes the raw data, not
     # any info about the semantics of how that data should be arranged
--- a/theano/tensor/nnet/neighbours.py
+++ b/theano/tensor/nnet/neighbours.py
@@ -687,7 +687,7 @@ def images2neibs(ten4, neib_shape, neib_
     .. note::
         Currently the step size should be chosen in the way that the
         corresponding dimension :math:`i` (width or height) is equal
-        to :math:`n * step\_size_i + neib\_shape_i` for some :math:`n`.
+        to :math:`n * step\\_size_i + neib\\_shape_i` for some :math:`n`.
 
     Examples
     --------
--- a/theano/tensor/slinalg.py
+++ b/theano/tensor/slinalg.py
@@ -267,7 +267,7 @@ class Solve(Op):
 
     def L_op(self, inputs, outputs, output_gradients):
         """
-        Reverse-mode gradient updates for matrix solve operation c = A \\\ b.
+        Reverse-mode gradient updates for matrix solve operation c = A \\ b.
 
         Symbolic expression for updates taken from [#]_.
 

Reply via email to