Hello community,

here is the log from the commit of package python-spyder-kernels for 
openSUSE:Factory checked in at 2019-08-15 12:29:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-spyder-kernels (Old)
 and      /work/SRC/openSUSE:Factory/.python-spyder-kernels.new.9556 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-spyder-kernels"

Thu Aug 15 12:29:23 2019 rev:10 rq:723354 version:0.5.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-spyder-kernels/python-spyder-kernels.changes  
    2019-08-06 15:11:57.331740032 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-spyder-kernels.new.9556/python-spyder-kernels.changes
    2019-08-15 12:29:33.822483296 +0200
@@ -1,0 +2,5 @@
+Tue Aug  6 19:43:52 UTC 2019 - Sebastian Wagner <sebix+novell....@sebix.at>
+
+- Add fix-tests-pandas.patch and remove workaround to fix tests.
+
+-------------------------------------------------------------------

New:
----
  fix-tests-pandas.patch

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

Other differences:
------------------
++++++ python-spyder-kernels.spec ++++++
--- /var/tmp/diff_new_pack.K0Ja7a/_old  2019-08-15 12:29:35.366481865 +0200
+++ /var/tmp/diff_new_pack.K0Ja7a/_new  2019-08-15 12:29:35.370481861 +0200
@@ -27,6 +27,7 @@
 Url:            https://github.com/spyder-ide/spyder-kernels
 # PyPI tarballs do not include the tests: 
https://github.com/spyder-ide/spyder-kernels/issues/66
 Source:         
https://github.com/spyder-ide/spyder-kernels/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+Patch0:         
https://github.com/spyder-ide/spyder-kernels/commit/5496e4596dabda05d8583e2533fcdb14ebde2c9c.patch#/fix-tests-pandas.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
@@ -40,6 +41,7 @@
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module pyzmq >= 17}
 BuildRequires:  %{python_module wurlitzer}
+BuildRequires:  %{python_module xarray}
 BuildRequires:  python-futures
 # /SECTION
 Requires:       python-cloudpickle
@@ -66,8 +68,7 @@
 
 %prep
 %setup -q -n spyder-kernels-%{version}
-# workaround for https://github.com/spyder-ide/spyder-kernels/issues/132
-rm spyder_kernels/utils/tests/test_nsview.py
+%patch0 -p1
 
 %build
 %python_build

++++++ fix-tests-pandas.patch ++++++
>From 2c20dfba5570ef779dcb681ff49bae1176ecd0ed Mon Sep 17 00:00:00 2001
From: Carlos Cordoba <ccordob...@gmail.com>
Date: Mon, 5 Aug 2019 11:52:23 +0200
Subject: [PATCH] Testing: Replace usage of Pandas Panel for Xarray Dataset

That's because the Panel object was removed in Pandas 0.25
---
 requirements/tests.txt                    |  3 ++-
 spyder_kernels/utils/tests/test_nsview.py | 21 +++++++++++----------
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/requirements/tests.txt b/requirements/tests.txt
index 6e69cdc..f5ccb26 100644
--- a/requirements/tests.txt
+++ b/requirements/tests.txt
@@ -5,4 +5,5 @@ pytest
 pytest-cov
 mock
 cython
-matplotlib
\ No newline at end of file
+matplotlib
+xarray
diff --git a/spyder_kernels/utils/tests/test_nsview.py 
b/spyder_kernels/utils/tests/test_nsview.py
index dae4bf9..12c6c26 100644
--- a/spyder_kernels/utils/tests/test_nsview.py
+++ b/spyder_kernels/utils/tests/test_nsview.py
@@ -17,6 +17,7 @@
 import numpy as np
 import pandas as pd
 import pytest
+import xarray as xr
 
 # Local imports
 from spyder_kernels.py3compat import PY2
@@ -35,7 +36,7 @@ def generate_complex_object():
 
 COMPLEX_OBJECT = generate_complex_object()
 DF = pd.DataFrame([1,2,3])
-PANEL = pd.Panel({0: pd.DataFrame([1,2]), 1:pd.DataFrame([3,4])})
+DATASET = xr.Dataset({0: pd.DataFrame([1,2]), 1:pd.DataFrame([3,4])})
 
 
 # --- Tests
@@ -88,9 +89,9 @@ def test_default_display():
     assert (value_to_display(np.array(COMPLEX_OBJECT)) ==
             'ndarray object of numpy module')
 
-    # Display of Panel
-    assert (value_to_display(PANEL) ==
-            'Panel object of pandas.core.panel module')
+    # Display of Dataset
+    assert (value_to_display(DATASET) ==
+            'Dataset object of xarray.core.dataset module')
 
 
 def test_list_display():
@@ -116,14 +117,14 @@ def test_list_display():
     assert (value_to_display([[1, 2, 3, [4], 5]] + long_list) ==
             '[[1, 2, 3, [...], 5], 0, 1, 2, 3, 4, 5, 6, 7, 8, ...]')
     assert value_to_display([1, 2, [DF]]) == '[1, 2, [Dataframe]]'
-    assert value_to_display([1, 2, [[DF], PANEL]]) == '[1, 2, [[...], Panel]]'
+    assert value_to_display([1, 2, [[DF], DATASET]]) == '[1, 2, [[...], 
Dataset]]'
 
     # List of complex object
     assert value_to_display([COMPLEX_OBJECT]) == '[defaultdict]'
 
     # List of composed objects
-    li = [COMPLEX_OBJECT, PANEL, 1, {1:2, 3:4}, DF]
-    result = '[defaultdict, Panel, 1, {1:2, 3:4}, Dataframe]'
+    li = [COMPLEX_OBJECT, DATASET, 1, {1:2, 3:4}, DF]
+    result = '[defaultdict, Dataset, 1, {1:2, 3:4}, Dataframe]'
     assert value_to_display(li) == result
 
     # List starting with a non-supported object (#5313)
@@ -158,14 +159,14 @@ def test_dict_display():
     assert (value_to_display({0: {1:1, 2:2, 3:3, 4:{0:0}, 5:5}, 1:1}) ==
             '{0:{1:1, 2:2, 3:3, 4:{...}, 5:5}, 1:1}')
     assert value_to_display({0:0, 1:1, 2:2, 3:DF}) == '{0:0, 1:1, 2:2, 
3:Dataframe}'
-    assert value_to_display({0:0, 1:1, 2:[[DF], PANEL]}) == '{0:0, 1:1, 
2:[[...], Panel]}'
+    assert value_to_display({0:0, 1:1, 2:[[DF], DATASET]}) == '{0:0, 1:1, 
2:[[...], Dataset]}'
 
     # Dict of complex object
     assert value_to_display({0:COMPLEX_OBJECT}) == '{0:defaultdict}'
 
     # Dict of composed objects
-    li = {0:COMPLEX_OBJECT, 1:PANEL, 2:2, 3:{0:0, 1:1}, 4:DF}
-    result = '{0:defaultdict, 1:Panel, 2:2, 3:{0:0, 1:1}, 4:Dataframe}'
+    li = {0:COMPLEX_OBJECT, 1:DATASET, 2:2, 3:{0:0, 1:1}, 4:DF}
+    result = '{0:defaultdict, 1:Dataset, 2:2, 3:{0:0, 1:1}, 4:Dataframe}'
     assert value_to_display(li) == result
 
     # Dict starting with a non-supported object (#5313)

Reply via email to