From 7f0ccc917c7abe6223784c703d86cd14755691fb Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 3 Jul 2021 22:39:47 +0100 Subject: gentoo resync : 03.07.2021 --- dev-python/xarray/Manifest | 3 +- .../xarray/files/xarray-0.18.2-backports.patch | 116 +++++++++++++++++++++ dev-python/xarray/xarray-0.18.2-r1.ebuild | 46 ++++++++ dev-python/xarray/xarray-0.18.2.ebuild | 42 -------- 4 files changed, 164 insertions(+), 43 deletions(-) create mode 100644 dev-python/xarray/files/xarray-0.18.2-backports.patch create mode 100644 dev-python/xarray/xarray-0.18.2-r1.ebuild delete mode 100644 dev-python/xarray/xarray-0.18.2.ebuild (limited to 'dev-python/xarray') diff --git a/dev-python/xarray/Manifest b/dev-python/xarray/Manifest index 90a7d91f392d..8e9360f833c9 100644 --- a/dev-python/xarray/Manifest +++ b/dev-python/xarray/Manifest @@ -1,7 +1,8 @@ +AUX xarray-0.18.2-backports.patch 4296 BLAKE2B baec8fba250bf160e2a56873439ebfbdad06d49f6dc7838379c86b03dbb1d9cd123e8a617d44f4dd3b1cd93df5087dd37b3a5307bcb402eb9fe6f71a64276cfe SHA512 043c8bd86cbd08cef1629e7f4b4dc2b225dde73d2a1f54ffe787bcf568f15aaa5c9eb096eb0156e5fec4f519808ffbe402e2d4f36092a1432ad4ae860b896c83 DIST xarray-0.17.0.tar.gz 2055584 BLAKE2B afbd28032069e4b498c87abd34661dc96525cb581a08fcf68eeaca08468afb9b452650bce4d21cada0eb1cb75ad11b0565a6b965b11120d4bef4d4cd612fa91d SHA512 726d548519614936f4b6c6ded0375a35362b195a2c6b55a282d198cbb8a70fa7439377a88f253cf4f16c86582fc22c8a4700b9645516decf7edd3e980d9dda34 DIST xarray-0.18.1.tar.gz 2849935 BLAKE2B f4d510a049e67431737ba7f6a66fdd83061e6e5728ac6bfd3b9f104b24cc619cb1d0f05bbe6911e952c312ef229dbf1a68842b75dbb0ecf811fcc7d6e78569b0 SHA512 e1842d7bf06ee23716038fd58e7ae3a2014012cbc49394c9000272cb0498c1d333cbf3133b1d8fcdbddd524d44f6fa5fcc117c992d0ab1d3d0b9c4ddfc317847 DIST xarray-0.18.2.tar.gz 2850065 BLAKE2B 16d8f5e10a7c9cb4247a3bc8f496f249d66235673e79d0707077e20b54a7d94a7b754fb00f44b876fa21273521f9e2e7d52183798ca33b8e62b30fbc57621c5a SHA512 3cfd6a3b77c48a73eb72e6c39db33aba266925df7ce9b8270231dd14032a717094073a2c3686b09fcff25313b548a452f9ed902211e254254389d15f025d8d0d EBUILD xarray-0.17.0.ebuild 1090 BLAKE2B 95aa23f92a87a18dfbb8eafb225bb00ad0d8803d153bf6dbc7c14d2098bd396f2a423642c7f0dd55b0ae3a4a0f9d0c91c4e07470e2c35b9a6d7860cf3e437a43 SHA512 7b1774d9f94f1510d3e470e4a887a8bdb9986a4a4825d42737adb45492b5701f678da43ad8f4466d52ee28a1847f7470653fe042185be7bdb950319512f36fb9 EBUILD xarray-0.18.1.ebuild 1092 BLAKE2B eeaa65c52f8cb7d9c8abce710e7402fc3647484cf288189dd3561c5f6e7e865a2b01c75525943dc18696877b7c164205b091d08d8e2e24f77b037b024d322f72 SHA512 6d4fc469c4878ebc65a4b1681e402f0e6363b524b1fdd59fdf36a449e22f5c8c54d0847d38a1d557f0f79a23b532b2bef68c7ae5a799a598162c774dff9086e9 -EBUILD xarray-0.18.2.ebuild 1091 BLAKE2B e9df67d9c68b9d7c1fc835395dd9d5ceb70425a175f2fce50dea22f549630dbf97b0e5892129eb1827b460a5dffbe15bc31913cab26af2e7536c1de391d01cad SHA512 3d19125fa782108e5ea610bdd36976a69904f041d6c05033d3262c40cf06b665030c03afcd3146871ca9e64f23e359034bbd9679ae45db60a39a24f29c730dd2 +EBUILD xarray-0.18.2-r1.ebuild 1141 BLAKE2B 338570635e45d5ab3338db0755ec1d68cfecd6bb26a13aaba05e05f1d434271b4c62ad5e01058257fa4745a6bba3ce42e54ed19bdd2457805f3b4e13085b0659 SHA512 bf468d1fc27df838d8b97891633628bbe83f5df16892deebb0771cf514af0e8942eaf2c92847af1301244d8dd8ce6318fe62d1bee447e2481221e897a2579eb7 MISC metadata.xml 508 BLAKE2B 173d15b73f7a3566c657ebf266b60c4c5b8b92e120fe5eac24bc7fc56faaf9378812386506914372aa9b65e49decd11e1f0e55b33ae41b1c51cda2a20f1bd23c SHA512 988742c143bbcd35de2bd649c72eb8db09f3310014b9a93033e383e1c8c6e799492616216b8389f272e46aa2afe925279550094049b9df2850f1fa78b6071966 diff --git a/dev-python/xarray/files/xarray-0.18.2-backports.patch b/dev-python/xarray/files/xarray-0.18.2-backports.patch new file mode 100644 index 000000000000..be30702e67f4 --- /dev/null +++ b/dev-python/xarray/files/xarray-0.18.2-backports.patch @@ -0,0 +1,116 @@ +From ca72d56c213a1c47e54b12ee559f412e60fbf9b1 Mon Sep 17 00:00:00 2001 +From: Spencer Clark +Date: Sat, 22 May 2021 20:13:19 -0400 +Subject: [PATCH] Make `kind` argument in `CFTimeIndex._maybe_cast_slice_bound` + optional (#5359) + +* [test-upstream] Make kind argument in CFTimeIndex._maybe_cast_slice_bound optional + +* Update doc/whats-new.rst + +Co-authored-by: keewis + +Co-authored-by: keewis +--- + doc/whats-new.rst | 4 ++++ + xarray/coding/cftimeindex.py | 9 +++++++-- + 2 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/xarray/coding/cftimeindex.py b/xarray/coding/cftimeindex.py +index f0de5565..783fe8d0 100644 +--- a/xarray/coding/cftimeindex.py ++++ b/xarray/coding/cftimeindex.py +@@ -465,9 +465,14 @@ class CFTimeIndex(pd.Index): + else: + return pd.Index.get_loc(self, key, method=method, tolerance=tolerance) + +- def _maybe_cast_slice_bound(self, label, side, kind): ++ def _maybe_cast_slice_bound(self, label, side, kind=None): + """Adapted from +- pandas.tseries.index.DatetimeIndex._maybe_cast_slice_bound""" ++ pandas.tseries.index.DatetimeIndex._maybe_cast_slice_bound ++ ++ Note that we have never used the kind argument in CFTimeIndex and it is ++ deprecated as of pandas version 1.3.0. It exists only for compatibility ++ reasons. We can remove it when our minimum version of pandas is 1.3.0. ++ """ + if not isinstance(label, str): + return label + +-- +2.32.0 + +From 34dc57717c82a86455a9e5abb0a47df782266c7e Mon Sep 17 00:00:00 2001 +From: Mathias Hauser +Date: Mon, 7 Jun 2021 23:05:24 +0200 +Subject: [PATCH] fix dask meta and output_dtypes error (#5449) + +--- + xarray/tests/test_computation.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/xarray/tests/test_computation.py b/xarray/tests/test_computation.py +index b7ae1ca9..09bed724 100644 +--- a/xarray/tests/test_computation.py ++++ b/xarray/tests/test_computation.py +@@ -1306,7 +1306,10 @@ 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.skipif( ++ 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 +-- +2.32.0 + +From 5a14d7d398be7e0efc6d5c8920dc8886212c3b2a Mon Sep 17 00:00:00 2001 +From: Spencer Clark +Date: Sat, 12 Jun 2021 08:58:42 -0400 +Subject: [PATCH] Explicitly state datetime units in array constructors in + `test_datetime_mean` (#5463) + +--- + xarray/tests/test_duck_array_ops.py | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +diff --git a/xarray/tests/test_duck_array_ops.py b/xarray/tests/test_duck_array_ops.py +index 0eb00725..6d49e209 100644 +--- a/xarray/tests/test_duck_array_ops.py ++++ b/xarray/tests/test_duck_array_ops.py +@@ -285,15 +285,15 @@ def assert_dask_array(da, dask): + def test_datetime_mean(dask): + # Note: only testing numpy, as dask is broken upstream + da = DataArray( +- np.array(["2010-01-01", "NaT", "2010-01-03", "NaT", "NaT"], dtype="M8"), ++ np.array(["2010-01-01", "NaT", "2010-01-03", "NaT", "NaT"], dtype="M8[ns]"), + dims=["time"], + ) + if dask: + # Trigger use case where a chunk is full of NaT + da = da.chunk({"time": 3}) + +- expect = DataArray(np.array("2010-01-02", dtype="M8")) +- expect_nat = DataArray(np.array("NaT", dtype="M8")) ++ expect = DataArray(np.array("2010-01-02", dtype="M8[ns]")) ++ expect_nat = DataArray(np.array("NaT", dtype="M8[ns]")) + + actual = da.mean() + if dask: +@@ -889,8 +889,6 @@ def test_push_dask(): + # some chunks of size-1 with NaN + with raise_if_dask_computes(): + actual = push( +- dask.array.from_array(array, chunks=(1, 2, 3, 2, 2, 1, 1)), +- axis=0, +- n=None, ++ dask.array.from_array(array, chunks=(1, 2, 3, 2, 2, 1, 1)), axis=0, n=None + ) + np.testing.assert_equal(actual, expected) +-- +2.32.0 + diff --git a/dev-python/xarray/xarray-0.18.2-r1.ebuild b/dev-python/xarray/xarray-0.18.2-r1.ebuild new file mode 100644 index 000000000000..510fc2c1b563 --- /dev/null +++ b/dev-python/xarray/xarray-0.18.2-r1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# pkg_resources use in code +DISTUTILS_USE_SETUPTOOLS=rdepend +PYTHON_COMPAT=( python3_{8..10} ) + +inherit distutils-r1 + +DESCRIPTION="N-D labeled arrays and datasets in Python" +HOMEPAGE="https://xarray.pydata.org/" +SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux" + +RDEPEND=" + >=dev-python/numpy-1.17[${PYTHON_USEDEP}] + >=dev-python/pandas-1.0[${PYTHON_USEDEP}]" +# note: most of test dependencies are optional +BDEPEND=" + test? ( + dev-python/bottleneck[${PYTHON_USEDEP}] + dev-python/hypothesis[${PYTHON_USEDEP}] + dev-python/matplotlib[${PYTHON_USEDEP}] + dev-python/toolz[${PYTHON_USEDEP}] + >=dev-python/scipy-1.4[${PYTHON_USEDEP}] + )" + +distutils_enable_tests pytest + +PATCHES=( + "${FILESDIR}"/${P}-backports.patch +) + +python_test() { + local deselect=( + # warning-targeted tests are fragile and not important to end users + xarray/tests/test_backends.py::test_no_warning_from_dask_effective_get + ) + + epytest ${deselect[@]/#/--deselect } +} diff --git a/dev-python/xarray/xarray-0.18.2.ebuild b/dev-python/xarray/xarray-0.18.2.ebuild deleted file mode 100644 index bedc8b3da110..000000000000 --- a/dev-python/xarray/xarray-0.18.2.ebuild +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -# pkg_resources use in code -DISTUTILS_USE_SETUPTOOLS=rdepend -PYTHON_COMPAT=( python3_{7..9} ) - -inherit distutils-r1 - -DESCRIPTION="N-D labeled arrays and datasets in Python" -HOMEPAGE="https://xarray.pydata.org/" -SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux" - -RDEPEND=" - >=dev-python/numpy-1.17[${PYTHON_USEDEP}] - >=dev-python/pandas-1.0[${PYTHON_USEDEP}]" -# note: most of test dependencies are optional -BDEPEND=" - test? ( - dev-python/bottleneck[${PYTHON_USEDEP}] - dev-python/hypothesis[${PYTHON_USEDEP}] - dev-python/matplotlib[${PYTHON_USEDEP}] - dev-python/toolz[${PYTHON_USEDEP}] - >=dev-python/scipy-1.4[${PYTHON_USEDEP}] - )" - -distutils_enable_tests pytest - -python_test() { - local deselect=( - # warning-targeted tests are fragile and not important to end users - xarray/tests/test_backends.py::test_no_warning_from_dask_effective_get - ) - - epytest ${deselect[@]/#/--deselect } -} -- cgit v1.2.3