summaryrefslogtreecommitdiff
path: root/dev-python/xarray
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-31 17:48:50 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-31 17:48:50 +0000
commit88e6368ac393fb69b358b60fcedf125f4724172f (patch)
treef2511a593c9c60c29d08b5d8f9684d2666bc20b4 /dev-python/xarray
parent0c7c7c833ab740636f5a76d53ebe5bb6e0e793a8 (diff)
gentoo auto-resync : 31:01:2024 - 17:48:49
Diffstat (limited to 'dev-python/xarray')
-rw-r--r--dev-python/xarray/Manifest3
-rw-r--r--dev-python/xarray/files/xarray-2024.1.1-pytest-8.patch77
-rw-r--r--dev-python/xarray/xarray-2024.1.1.ebuild41
3 files changed, 102 insertions, 19 deletions
diff --git a/dev-python/xarray/Manifest b/dev-python/xarray/Manifest
index f64a7369668a..6c6211323067 100644
--- a/dev-python/xarray/Manifest
+++ b/dev-python/xarray/Manifest
@@ -1,7 +1,8 @@
+AUX xarray-2024.1.1-pytest-8.patch 3537 BLAKE2B fad48831eb697cf3d6f36eda1b96e160deaf35a158c39292f6fe566ad80a6c37290c918392e75d120110538515cd7e2714fda7dfc5f10cb9e78832ba7a2be330 SHA512 8be5a6efa52a6914dddf1e20e0553359d894eb9a365bdc4dd027ea0412a64418631b58ad3d809494065ef61253d22aad2fd528ba8a193ee5e9905ba9dffb0a38
DIST xarray-2023.12.0.tar.gz 3602114 BLAKE2B f6753772d3ea5c5a79afb2e55e0fd9df764d18d9dbd5598dd6ddd8f36dcf96695b542b824f09f049190cc563d4a90b25b5a04e8f1babb262b02955e3f06f8f7c SHA512 a07b5d0b50949c4b3eff5055f5b225d0ab63a223c54b292ea067c9aae748c3f13d130713a146eb590596fdf96cad12bbf2f65fef2117f0b271b3d8c2ad33c9ca
DIST xarray-2024.1.0.tar.gz 3612457 BLAKE2B 53c99ade060ee9aafb9ff1416ab50e27271a5c45c06b8bda5183757b64694eea8649ae9515261112926aa872364c7a9349fb874114b82d5c7221d4d6104feb23 SHA512 1a5c184e6547e867076cd4faf533476608de13c4cfdb7085362e93c974598ea29d42c8fa55374b4782cc36ab7d870d4b7174217b3854db367ae16772e7f37cc8
DIST xarray-2024.1.1.tar.gz 3614037 BLAKE2B cc50fbfa19a2c9229b85b8c7d5d0e7e7f6d3e5a484955fcc81aa0b37839a0b992d2c2f928e4097ca05c7b8294ed1061fbd0c1b7e7c65c9087a940dab97c520ce SHA512 b6447ca2c80b3a3091ac2baba648fef4faa79ffff272360e9726b318b517ede9d2717d1b6f77f03fdacf55527233f1a37c0d114901fe1a265d3e435cf293a487
EBUILD xarray-2023.12.0.ebuild 3317 BLAKE2B dbc5f4579037681d2def274b7c39131b714a06044fde95c73c464a9405cafc35009c9a4a5c5349a85593a6ef29eb9a259414e19ba05d5bb230643ef84ee227d0 SHA512 0f39d29d00a6cd1514d1f4a07fad76e42ed7a4b36004da20d64f552516bd5bbad7d1dad9a5300759b07e9f8bfb6e94a2f1f14291f63969f6c5df38abafe90f59
EBUILD xarray-2024.1.0.ebuild 3439 BLAKE2B 5ff3564377e8c72862d27f3aa9ca70da8f19909d7c73a49f3e205d775396c897c3e2ba6aad89dc023f108873ffa2bc782fbfa8adeec3907b0b3fea2d18eb3d2c SHA512 8ae3b70fe2ab52274ba18c4b84cc5a109e11adf69a66ec6863c3b5c959cc15771e4b3e41775d5c56915dbcbc9a0d807ee5d9563fd16e2dcf1319ac6fcdcbe86d
-EBUILD xarray-2024.1.1.ebuild 3439 BLAKE2B 5ff3564377e8c72862d27f3aa9ca70da8f19909d7c73a49f3e205d775396c897c3e2ba6aad89dc023f108873ffa2bc782fbfa8adeec3907b0b3fea2d18eb3d2c SHA512 8ae3b70fe2ab52274ba18c4b84cc5a109e11adf69a66ec6863c3b5c959cc15771e4b3e41775d5c56915dbcbc9a0d807ee5d9563fd16e2dcf1319ac6fcdcbe86d
+EBUILD xarray-2024.1.1.ebuild 3558 BLAKE2B b4836ce310dc0989332b2b4bb898358f53d0f8fa18d7dd43162513798a0dc7433f0f7b92d5aa191af418b897ec7ea5814357f6129fe64b1e9891d7281efd7213 SHA512 c74ff517b276d36408af249a7cfe27cbe7fed261c4be366d46c6bc11d71ebc18576262ffe9097375b4cd58316d519b9a2663bd62bda6b776abf2488acdc1b5ca
MISC metadata.xml 509 BLAKE2B d470cc092eb055215a5868c22f9ec458057cfad600357fa1f658ed4537a6a6f68bda1422c4a665f1963ce0a6049e691befc3ca4baa60cc898364ad5f18164979 SHA512 602755896a3655295058afc8543a4bb64192d5c625f2edd86291c1f23d171f051a4238466163c2d469874aff3e68770fc76177e720870492266fb14e6faf6ce7
diff --git a/dev-python/xarray/files/xarray-2024.1.1-pytest-8.patch b/dev-python/xarray/files/xarray-2024.1.1-pytest-8.patch
new file mode 100644
index 000000000000..e85bb6de7b71
--- /dev/null
+++ b/dev-python/xarray/files/xarray-2024.1.1-pytest-8.patch
@@ -0,0 +1,77 @@
+From 306a50e344522a3f321d49d95488f457975fa553 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Wed, 31 Jan 2024 11:31:26 +0100
+Subject: [PATCH 1/2] test_dataset: remove incorrect pytest.warns() to fix
+ pytest-8
+
+Remove two incorrect `pytest.warns()` assertions to fix test failures
+with pytest-8.0.0. Prior to this version, an exception raised would
+cause `pytest.warns()` to be ignored. This way fixed in 8.0.0, and now
+warnings must actually be emitted prior to the exception.
+
+In `test_drop_index_labels()`, the exception is raised at the very
+beginning of the function, prior to the deprecation warning.
+
+In `test_rename_multiindex()`, the warning is not emitted at all (it is
+not applicable to the call in question).
+---
+ xarray/tests/test_dataset.py | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/xarray/tests/test_dataset.py b/xarray/tests/test_dataset.py
+index fa9448f2f4..77d172f00b 100644
+--- a/xarray/tests/test_dataset.py
++++ b/xarray/tests/test_dataset.py
+@@ -2724,8 +2724,7 @@ def test_drop_index_labels(self) -> None:
+ assert_identical(data, actual)
+
+ with pytest.raises(ValueError):
+- with pytest.warns(DeprecationWarning):
+- data.drop(["c"], dim="x", errors="wrong_value") # type: ignore[arg-type]
++ data.drop(["c"], dim="x", errors="wrong_value") # type: ignore[arg-type]
+
+ with pytest.warns(DeprecationWarning):
+ actual = data.drop(["a", "b", "c"], "x", errors="ignore")
+@@ -3159,8 +3158,7 @@ def test_rename_multiindex(self) -> None:
+ original.rename({"a": "x"})
+
+ with pytest.raises(ValueError, match=r"'b' conflicts"):
+- with pytest.warns(UserWarning, match="does not create an index anymore"):
+- original.rename({"a": "b"})
++ original.rename({"a": "b"})
+
+ def test_rename_perserve_attrs_encoding(self) -> None:
+ # test propagate attrs/encoding to new variable(s) created from Index object
+
+From 3bc5abf4da35edda1f0c3e9e0d53e39331c1a76b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Wed, 31 Jan 2024 11:35:04 +0100
+Subject: [PATCH 2/2] test_groupby: Clear recorded warnings for pytest-8
+ compatibility
+
+Clear the warnings recorded during the `pytest.warns()` use
+in `test_groupby_dims_property`, to fix test failures with pytest-8.0.0.
+Prior to this version, `pytest.warns()` invocation used to capture all
+warnings. Now it only captures the warnings that match the arguments,
+and the remaining warnings are re-emitted and therefore caught by
+`recwarn` fixture. To provide compatibility with both versions of
+pytest, clear the recorded warnings immediately after `pytest.warns()`.
+
+Fixes #8681
+---
+ xarray/tests/test_groupby.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/xarray/tests/test_groupby.py b/xarray/tests/test_groupby.py
+index 25fabd5e2b..b65c01fe76 100644
+--- a/xarray/tests/test_groupby.py
++++ b/xarray/tests/test_groupby.py
+@@ -67,6 +67,8 @@ def test_groupby_dims_property(dataset, recwarn) -> None:
+ with pytest.warns(UserWarning, match="The `squeeze` kwarg"):
+ assert dataset.groupby("x").dims == dataset.isel(x=1).dims
+ assert dataset.groupby("y").dims == dataset.isel(y=1).dims
++ # in pytest-8, pytest.warns() no longer clears all warnings
++ recwarn.clear()
+
+ # when squeeze=False, no warning should be raised
+ assert tuple(dataset.groupby("x", squeeze=False).dims) == tuple(
diff --git a/dev-python/xarray/xarray-2024.1.1.ebuild b/dev-python/xarray/xarray-2024.1.1.ebuild
index 28602ca801b2..7d7d2b998d10 100644
--- a/dev-python/xarray/xarray-2024.1.1.ebuild
+++ b/dev-python/xarray/xarray-2024.1.1.ebuild
@@ -40,27 +40,32 @@ BDEPEND="
EPYTEST_XDIST=1
distutils_enable_tests pytest
-EPYTEST_DESELECT=(
- # warning-targeted tests are fragile and not important to end users
- xarray/tests/test_backends.py::test_no_warning_from_dask_effective_get
- # TODO: segv in netcdf4-python
- 'xarray/tests/test_backends.py::test_open_mfdataset_manyfiles[netcdf4-20-True-5-5]'
- 'xarray/tests/test_backends.py::test_open_mfdataset_manyfiles[netcdf4-20-True-5-None]'
- 'xarray/tests/test_backends.py::test_open_mfdataset_manyfiles[netcdf4-20-True-None-5]'
- 'xarray/tests/test_backends.py::test_open_mfdataset_manyfiles[netcdf4-20-True-None-None]'
- xarray/tests/test_backends.py::TestDask::test_save_mfdataset_compute_false_roundtrip
- # TODO: broken
- xarray/tests/test_backends.py::TestNetCDF4Data
- xarray/tests/test_backends.py::TestNetCDF4ViaDaskData
- # hangs
- xarray/tests/test_backends.py::TestDask::test_dask_roundtrip
- # mismatches when pyarrow is installed
- # https://github.com/pydata/xarray/issues/8092
- xarray/tests/test_dask.py::TestToDaskDataFrame::test_to_dask_dataframe_2D
- xarray/tests/test_dask.py::TestToDaskDataFrame::test_to_dask_dataframe_not_daskarray
+PATCHES=(
+ # https://github.com/pydata/xarray/pull/8686
+ "${FILESDIR}/${P}-pytest-8.patch"
)
python_test() {
+ local EPYTEST_DESELECT=(
+ # warning-targeted tests are fragile and not important to end users
+ xarray/tests/test_backends.py::test_no_warning_from_dask_effective_get
+ # TODO: segv in netcdf4-python
+ 'xarray/tests/test_backends.py::test_open_mfdataset_manyfiles[netcdf4-20-True-5-5]'
+ 'xarray/tests/test_backends.py::test_open_mfdataset_manyfiles[netcdf4-20-True-5-None]'
+ 'xarray/tests/test_backends.py::test_open_mfdataset_manyfiles[netcdf4-20-True-None-5]'
+ 'xarray/tests/test_backends.py::test_open_mfdataset_manyfiles[netcdf4-20-True-None-None]'
+ xarray/tests/test_backends.py::TestDask::test_save_mfdataset_compute_false_roundtrip
+ # TODO: broken
+ xarray/tests/test_backends.py::TestNetCDF4Data
+ xarray/tests/test_backends.py::TestNetCDF4ViaDaskData
+ # hangs
+ xarray/tests/test_backends.py::TestDask::test_dask_roundtrip
+ # mismatches when pyarrow is installed
+ # https://github.com/pydata/xarray/issues/8092
+ xarray/tests/test_dask.py::TestToDaskDataFrame::test_to_dask_dataframe_2D
+ xarray/tests/test_dask.py::TestToDaskDataFrame::test_to_dask_dataframe_not_daskarray
+ )
+
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
if ! has_version ">=dev-python/scipy-1.4[${PYTHON_USEDEP}]" ; then