Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-xarray for openSUSE:Factory checked in at 2021-07-17 23:36:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-xarray (Old) and /work/SRC/openSUSE:Factory/.python-xarray.new.2632 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-xarray" Sat Jul 17 23:36:43 2021 rev:28 rq:906784 version:0.18.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-xarray/python-xarray.changes 2021-06-01 10:35:26.824607245 +0200 +++ /work/SRC/openSUSE:Factory/.python-xarray.new.2632/python-xarray.changes 2021-07-17 23:37:23.185623892 +0200 @@ -1,0 +2,6 @@ +Fri Jul 16 16:01:56 UTC 2021 - Ben Greiner <c...@bnavigator.de> + +- Add xarray-pr5449-dask-meta.patch in order to support updated + dask -- gh#pydata/xarray#5449 + +------------------------------------------------------------------- New: ---- xarray-pr5449-dask-meta.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-xarray.spec ++++++ --- /var/tmp/diff_new_pack.AVNILG/_old 2021-07-17 23:37:23.657620254 +0200 +++ /var/tmp/diff_new_pack.AVNILG/_new 2021-07-17 23:37:23.661620223 +0200 @@ -16,7 +16,7 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 # NEP 29: Numpy 1.20 dropped support for Python 3.6, python36-numpy is removed from Tumbleweed. xarray will follow on next release %define skip_python36 1 @@ -36,6 +36,8 @@ # PATCH-FIX-UPSTREAM test_resample_loffset.patch gh#pydata/xarray#5364 mc...@suse.com # use assert_allclose in test_resample_loffset test Patch2: test_resample_loffset.patch +# PATCH-FIX-UPSTREAM xarray-pr5449-dask-meta.patch -- gh#pydata/xarray#5449 +Patch3: https://github.com/pydata/xarray/pull/5449.patch#/xarray-pr5449-dask-meta.patch BuildRequires: %{python_module numpy >= 1.15} BuildRequires: %{python_module numpy-devel >= 1.14} BuildRequires: %{python_module pandas >= 0.25} ++++++ xarray-pr5449-dask-meta.patch ++++++ >From 941b8a8286178c13ee057d87a5198f163c174b0e Mon Sep 17 00:00:00 2001 From: Mathias Hauser <mathias.hau...@env.ethz.ch> Date: Mon, 7 Jun 2021 20:21:00 +0200 Subject: [PATCH 1/3] fix dask meta and output_dtypes error --- xarray/tests/test_computation.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/xarray/tests/test_computation.py b/xarray/tests/test_computation.py index b7ae1ca982..7759e7d6a8 100644 --- a/xarray/tests/test_computation.py +++ b/xarray/tests/test_computation.py @@ -1313,7 +1313,8 @@ def test_vectorize_dask_dtype_meta(): data_array = xr.DataArray([[0, 1, 2], [1, 2, 3]], dims=("x", "y")) expected = xr.DataArray([1, 2], dims=["x"]) - actual = apply_ufunc( + func = functools.partial( + apply_ufunc, pandas_median, data_array.chunk({"x": 1}), input_core_dims=[["y"]], @@ -1323,8 +1324,14 @@ def test_vectorize_dask_dtype_meta(): dask_gufunc_kwargs=dict(meta=np.ndarray((0, 0), dtype=float)), ) - assert_identical(expected, actual) - assert float == actual.dtype + # dask/dask#7669: can no longer pass output_dtypes and meta + if LooseVersion(dask.__version__) >= "2021.06": + with pytest.raises(ValueError): + func() + else: + actual = func() + assert_identical(expected, actual) + assert float == actual.dtype def pandas_median_add(x, y): >From 2e51db563f82657a30a0b3d87f0ddab36a936fe9 Mon Sep 17 00:00:00 2001 From: Mathias Hauser <mathias.hau...@env.ethz.ch> Date: Mon, 7 Jun 2021 21:48:15 +0200 Subject: [PATCH 2/3] don't test in newer dask versions --- xarray/tests/test_computation.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/xarray/tests/test_computation.py b/xarray/tests/test_computation.py index 7759e7d6a8..92a543e14b 100644 --- a/xarray/tests/test_computation.py +++ b/xarray/tests/test_computation.py @@ -1306,15 +1306,17 @@ def test_vectorize_dask_dtype_without_output_dtypes(data_array): assert expected.dtype == actual.dtype -@pytest.mark.xfail(LooseVersion(dask.__version__) < "2.3", reason="dask GH5274") +@pytest.mark.skip( + LooseVersion(dask.__version__) > "2021.06", + reason="dask/dask#7669: can no longer pass output_dtypes and meta", +) @requires_dask def test_vectorize_dask_dtype_meta(): # meta dtype takes precedence data_array = xr.DataArray([[0, 1, 2], [1, 2, 3]], dims=("x", "y")) expected = xr.DataArray([1, 2], dims=["x"]) - func = functools.partial( - apply_ufunc, + actual = apply_ufunc( pandas_median, data_array.chunk({"x": 1}), input_core_dims=[["y"]], @@ -1324,14 +1326,8 @@ def test_vectorize_dask_dtype_meta(): dask_gufunc_kwargs=dict(meta=np.ndarray((0, 0), dtype=float)), ) - # dask/dask#7669: can no longer pass output_dtypes and meta - if LooseVersion(dask.__version__) >= "2021.06": - with pytest.raises(ValueError): - func() - else: - actual = func() - assert_identical(expected, actual) - assert float == actual.dtype + assert_identical(expected, actual) + assert float == actual.dtype def pandas_median_add(x, y): >From a4cef6dac3fa5a84f144e56c63ce4b3b903681b4 Mon Sep 17 00:00:00 2001 From: Mathias Hauser <mathias.hau...@env.ethz.ch> Date: Mon, 7 Jun 2021 21:56:46 +0200 Subject: [PATCH 3/3] skipIF --- xarray/tests/test_computation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xarray/tests/test_computation.py b/xarray/tests/test_computation.py index 92a543e14b..09bed72496 100644 --- a/xarray/tests/test_computation.py +++ b/xarray/tests/test_computation.py @@ -1306,7 +1306,7 @@ def test_vectorize_dask_dtype_without_output_dtypes(data_array): assert expected.dtype == actual.dtype -@pytest.mark.skip( +@pytest.mark.skipif( LooseVersion(dask.__version__) > "2021.06", reason="dask/dask#7669: can no longer pass output_dtypes and meta", )