[python-scikit-learn] New upstream (0.15.2), bugfix

Sergio Pascual sergiopr at fedoraproject.org
Tue Sep 16 13:30:55 UTC 2014


commit 7510bfc1302483ebe07e8110124f55919c1990d4
Author: Sergio Pascual <sergiopr at fis.ucm.es>
Date:   Tue Sep 16 15:30:43 2014 +0200

    New upstream (0.15.2), bugfix

 .gitignore               |    1 +
 python-scikit-learn.spec |   15 +++++++++---
 sklearn-fix-test.patch   |   56 +++++++++++----------------------------------
 sources                  |    2 +-
 4 files changed, 27 insertions(+), 47 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 9b8aa5f..b02b35c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
 /scikit-learn-0.15.0b2.tar.gz
 /scikit-learn-0.15.0.tar.gz
 /scikit-learn-0.15.1.tar.gz
+/scikit-learn-0.15.2.tar.gz
diff --git a/python-scikit-learn.spec b/python-scikit-learn.spec
index bf9e558..3b104de 100644
--- a/python-scikit-learn.spec
+++ b/python-scikit-learn.spec
@@ -2,8 +2,8 @@
 %global with_python3 1
 
 Name: python-scikit-learn
-Version: 0.15.1
-Release: 2%{?dist}
+Version: 0.15.2
+Release: 1%{?dist}
 Summary: Machine learning in Python
 License: BSD
 
@@ -12,8 +12,11 @@ Source0: https://pypi.python.org/packages/source/s/scikit-learn/%{upname}-%{vers
 Source1: system-six.py
 Source2: system-joblib.py
 Patch0: sklearn-unbundle-joblib.patch
-Patch2: sklearn-unbundle-cblas.patch
-Patch3: sklearn-fix-test.patch
+Patch1: sklearn-unbundle-cblas.patch
+# Disable a broken test
+# Reported upstream
+# https://github.com/scikit-learn/scikit-learn/issues/3648
+Patch2: sklearn-fix-test.patch
 
 BuildRequires: python2-devel 
 BuildRequires: numpy scipy python-nose python-matplotlib
@@ -56,6 +59,7 @@ efficient, accessible to everybody, and reusable in various contexts.
 %setup -n %{upname}-%{version} -q
 
 %patch0 -p1
+%patch1 -p1
 
 # Code to load system six and joblib at runtime
 mkdir sklearn/externals/bundled
@@ -124,6 +128,9 @@ popd
 %endif # with_python3
 
 %changelog
+* Tue Sep 16 2014 Sergio Pascual <sergiopr at fedoraproject.org> - 0.15.2-1
+- New upstream (0.15.2), bugfix
+
 * Sun Aug 17 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.15.1-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 
diff --git a/sklearn-fix-test.patch b/sklearn-fix-test.patch
index 7dce5bb..807ae3f 100644
--- a/sklearn-fix-test.patch
+++ b/sklearn-fix-test.patch
@@ -1,42 +1,14 @@
-diff -ur scikit-learn-0.14.1/sklearn/svm/tests/test_svm.py scikit-learn-0.14.1.fixtest/sklearn/svm/tests/test_svm.py
---- scikit-learn-0.14.1/sklearn/svm/tests/test_svm.py	2014-01-15 01:20:36.881367698 +0100
-+++ scikit-learn-0.14.1.fixtest/sklearn/svm/tests/test_svm.py	2014-01-15 01:21:50.448943529 +0100
-@@ -643,17 +643,17 @@
-     assert_raises(ValueError, svc.fit, X, Y)
- 
- 
--def test_timeout():
--    a = svm.SVC(kernel=lambda x, y: np.dot(x, y.T), probability=True,
--                random_state=0, max_iter=1)
--    with warnings.catch_warnings(record=True) as foo:
--        # Hackish way to reset the  warning counter
--        from sklearn.svm import base
--        base.__warningregistry__ = {}
--        warnings.simplefilter("always")
--        a.fit(X, Y)
--        assert_equal(len(foo), 1, msg=foo)
--        assert_equal(foo[0].category, ConvergenceWarning, msg=foo[0].category)
-+#def test_timeout():
-+#    a = svm.SVC(kernel=lambda x, y: np.dot(x, y.T), probability=True,
-+#                random_state=0, max_iter=1)
-+#    with warnings.catch_warnings(record=True) as foo:
-+#        # Hackish way to reset the  warning counter
-+#        from sklearn.svm import base
-+#        base.__warningregistry__ = {}
-+#        warnings.simplefilter("always")
-+#        a.fit(X, Y)
-+#        assert_equal(len(foo), 1, msg=foo)
-+#        assert_equal(foo[0].category, ConvergenceWarning, msg=foo[0].category)
- 
- 
- def test_consistent_proba():
-diff -ur scikit-learn-0.14.1/sklearn/cluster/bicluster/tests/test_utils.py scikit-learn-0.14.1.fixtest/sklearn/cluster/bicluster/tests/test_utils.py
---- scikit-learn-0.14.1/sklearn/cluster/bicluster/tests/test_utils.py	2014-01-15 01:44:29.133535947 +0100
-+++ scikit-learn-0.14.1.fixtest/sklearn/cluster/bicluster/tests/test_utils.py	2014-01-15 01:46:08.825309370 +0100
-@@ -40,4 +40,6 @@
-                                        [6, 7],
-                                        [18, 19]])
-         submatrix[:] = -1
-+        if issparse(X):
-+            X = X.todense()
-         assert_true(np.all(X != -1))
+diff -ur scikit-learn-0.15.2/sklearn/linear_model/tests/test_base.py scikit-learn-0.15.2_3648/sklearn/linear_model/tests/test_base.py
+--- scikit-learn-0.15.2/sklearn/linear_model/tests/test_base.py	2014-09-16 13:30:10.894575040 +0200
++++ scikit-learn-0.15.2_3648/sklearn/linear_model/tests/test_base.py	2014-09-16 13:31:57.768474897 +0200
+@@ -65,8 +65,8 @@
+     assert_equal(lr2_without_intercept.coef_.ndim,
+                  lr3_without_intercept.coef_.ndim)
+ 
+-
+-def test_linear_regression_sparse(random_state=0):
++#
++def __disable_test_linear_regression_sparse(random_state=0):
+     "Test that linear regression also works with sparse data"
+     random_state = check_random_state(random_state)
+     n = 100
diff --git a/sources b/sources
index 2c333b7..59a1b7a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-236aa05b1a6d067c28f34d5e9942af17  scikit-learn-0.15.1.tar.gz
+d9822ad0238e17b382a3c756ea94fe0d  scikit-learn-0.15.2.tar.gz


More information about the ml mailing list