Update to latest version (#2293520)
Also, simplify the spec with: * Dropping armhv7l and i686 conditions * Dropping old test skips that seem to have been fixed * Use pyproject macro's `-l` license option * Drop patch for old versioneer, as the new one is available
This commit is contained in:
parent
0835ce0dbc
commit
92c93013bd
1
.gitignore
vendored
1
.gitignore
vendored
@ -79,3 +79,4 @@
|
||||
/dask-2024.1.1.tar.gz
|
||||
/dask-2024.2.1.tar.gz
|
||||
/dask-2024.6.0.tar.gz
|
||||
/dask-2024.6.2.tar.gz
|
||||
|
@ -1,52 +0,0 @@
|
||||
From 5ddb00ec0f8ab33cb82e7fc6c396e40bd500ed0e Mon Sep 17 00:00:00 2001
|
||||
From: Adam Williamson <awilliam@redhat.com>
|
||||
Date: Mon, 17 Jun 2024 15:17:12 -0700
|
||||
Subject: [PATCH 1/2] Handle Python 3.13 exception type change in
|
||||
`unpack_collections`
|
||||
|
||||
In Python 3.13, `dataclasses.replace()` now raises a `TypeError`
|
||||
rather than a `ValueError` when a field is declared with
|
||||
init=False (or when an init variable is not specified). We were
|
||||
relying on it raising a `ValueError` in this case. This fix
|
||||
should keep dask's interface consistent across Python versions.
|
||||
|
||||
Signed-off-by: Adam Williamson <awilliam@redhat.com>
|
||||
---
|
||||
dask/delayed.py | 21 +++++++++++----------
|
||||
1 file changed, 11 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/dask/delayed.py b/dask/delayed.py
|
||||
index 1c63a39ef..350e89fbf 100644
|
||||
--- a/dask/delayed.py
|
||||
+++ b/dask/delayed.py
|
||||
@@ -141,16 +141,17 @@ def unpack_collections(expr):
|
||||
if hasattr(expr, f.name)
|
||||
}
|
||||
replace(expr, **_fields)
|
||||
- except TypeError as e:
|
||||
- raise TypeError(
|
||||
- f"Failed to unpack {typ} instance. "
|
||||
- "Note that using a custom __init__ is not supported."
|
||||
- ) from e
|
||||
- except ValueError as e:
|
||||
- raise ValueError(
|
||||
- f"Failed to unpack {typ} instance. "
|
||||
- "Note that using fields with `init=False` are not supported."
|
||||
- ) from e
|
||||
+ except (TypeError, ValueError) as e:
|
||||
+ if isinstance(e, ValueError) or "is declared with init=False" in str(e):
|
||||
+ raise ValueError(
|
||||
+ f"Failed to unpack {typ} instance. "
|
||||
+ "Note that using fields with `init=False` are not supported."
|
||||
+ ) from e
|
||||
+ else:
|
||||
+ raise TypeError(
|
||||
+ f"Failed to unpack {typ} instance. "
|
||||
+ "Note that using a custom __init__ is not supported."
|
||||
+ ) from e
|
||||
return (apply, typ, (), (dict, args)), collections
|
||||
|
||||
if is_namedtuple_instance(expr):
|
||||
--
|
||||
2.45.2
|
||||
|
@ -1,18 +1,30 @@
|
||||
From 8cf6b4224a56b0a05fc5fe3bd75d7979d102c610 Mon Sep 17 00:00:00 2001
|
||||
From f72b9ced312c92900ed7903ec07aefde35e22489 Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Sun, 7 May 2023 23:13:59 -0400
|
||||
Subject: [PATCH 2/8] Skip coverage testing
|
||||
Date: Thu, 20 Jun 2024 21:08:07 -0400
|
||||
Subject: [PATCH] Remove extra test dependencies
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
pyproject.toml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
pyproject.toml | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/pyproject.toml b/pyproject.toml
|
||||
index 34952022..ab317716 100644
|
||||
index 1d036cbb..e9600551 100644
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -127,7 +127,7 @@ markers = [
|
||||
@@ -75,11 +75,9 @@ complete = [
|
||||
test = [
|
||||
"pandas[test]",
|
||||
"pytest",
|
||||
- "pytest-cov",
|
||||
"pytest-rerunfailures",
|
||||
"pytest-timeout",
|
||||
"pytest-xdist",
|
||||
- "pre-commit",
|
||||
]
|
||||
|
||||
[project.entry-points."dask.array.backends"]
|
||||
@@ -128,7 +126,7 @@ markers = [
|
||||
"skip_with_pyarrow_strings: Tests that should be skipped when pyarrow string conversion is turned on",
|
||||
"xfail_with_pyarrow_strings: Tests that should be xfailed when pyarrow string conversion is turned on",
|
||||
]
|
||||
@ -22,5 +34,5 @@ index 34952022..ab317716 100644
|
||||
"error:::dask[.*]",
|
||||
"error:::pandas[.*]",
|
||||
--
|
||||
2.43.0
|
||||
2.45.2
|
||||
|
@ -1,31 +0,0 @@
|
||||
From 10f732134ed02eed55e89048df03d74e5c0becc8 Mon Sep 17 00:00:00 2001
|
||||
From: Adam Williamson <awilliam@redhat.com>
|
||||
Date: Mon, 17 Jun 2024 15:24:52 -0700
|
||||
Subject: [PATCH 2/2] test_derived_from: don't expect extra docstring to be
|
||||
indented
|
||||
|
||||
In Python 3.13, it is not any more:
|
||||
https://docs.python.org/3.13/whatsnew/3.13.html#other-language-changes
|
||||
"Compiler now strip indents from docstrings."
|
||||
|
||||
Signed-off-by: Adam Williamson <awilliam@redhat.com>
|
||||
---
|
||||
dask/tests/test_utils.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dask/tests/test_utils.py b/dask/tests/test_utils.py
|
||||
index 328705f7f..8aba2b3f3 100644
|
||||
--- a/dask/tests/test_utils.py
|
||||
+++ b/dask/tests/test_utils.py
|
||||
@@ -600,7 +600,7 @@ def test_derived_from():
|
||||
assert "not supported" in b_arg.lower()
|
||||
assert "dask" in b_arg.lower()
|
||||
|
||||
- assert " extra docstring\n\n" in Zap.f.__doc__
|
||||
+ assert "extra docstring\n\n" in Zap.f.__doc__
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
--
|
||||
2.45.2
|
||||
|
@ -1,27 +0,0 @@
|
||||
From 741c375b14edcc5b32d1641b11a39d8ee5679496 Mon Sep 17 00:00:00 2001
|
||||
From: Diane Trout <diane@ghic.org>
|
||||
Date: Thu, 29 Feb 2024 19:39:26 -0500
|
||||
Subject: [PATCH 5/8] Force initializing the random seed with the same byte
|
||||
order interpretation as on x86
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
dask/utils.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dask/utils.py b/dask/utils.py
|
||||
index 0e974fe4..4dcfca42 100644
|
||||
--- a/dask/utils.py
|
||||
+++ b/dask/utils.py
|
||||
@@ -557,7 +557,7 @@ def random_state_data(n: int, random_state=None) -> list:
|
||||
random_state = np.random.RandomState(random_state)
|
||||
|
||||
random_data = random_state.bytes(624 * n * 4) # `n * 624` 32-bit integers
|
||||
- l = list(np.frombuffer(random_data, dtype=np.uint32).reshape((n, -1)))
|
||||
+ l = list(np.frombuffer(random_data, dtype="<u4").reshape((n, -1)))
|
||||
assert len(l) == n
|
||||
return l
|
||||
|
||||
--
|
||||
2.43.0
|
||||
|
@ -1,24 +0,0 @@
|
||||
From 2c54335ae19d25a3ae95989bcad67c3580aed17d Mon Sep 17 00:00:00 2001
|
||||
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
Date: Sat, 25 Nov 2023 20:22:50 -0500
|
||||
Subject: [PATCH 6/8] Allow older versioneer
|
||||
|
||||
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
||||
---
|
||||
pyproject.toml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/pyproject.toml b/pyproject.toml
|
||||
index ab317716..79f36f2c 100644
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -1,5 +1,5 @@
|
||||
[build-system]
|
||||
-requires = ["setuptools>=62.6", "versioneer[toml]==0.29"]
|
||||
+requires = ["setuptools>=62.6", "versioneer[toml]>=0.28"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
--
|
||||
2.43.0
|
||||
|
112
python-dask.spec
112
python-dask.spec
@ -3,15 +3,15 @@
|
||||
# Requires distributed, which is a loop.
|
||||
# Also, some tests require packages that require dask itself.
|
||||
# Force bootstrap for package review.
|
||||
%bcond_without bootstrap
|
||||
%bcond bootstrap 1
|
||||
|
||||
# We have an arched package to detect arch-dependent issues in dependencies,
|
||||
# but all of the installable RPMs are noarch and there is no compiled code.
|
||||
%global debug_package %{nil}
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 2024.6.0
|
||||
%global tag 2024.6.0
|
||||
Version: 2024.6.2
|
||||
%global tag 2024.6.2
|
||||
Release: %autorelease
|
||||
Summary: Parallel PyData with Task Scheduling
|
||||
|
||||
@ -19,12 +19,7 @@ License: BSD-3-Clause
|
||||
URL: https://github.com/dask/dask
|
||||
Source0: %{pypi_source %{srcname}}
|
||||
# Fedora-specific patch.
|
||||
Patch: 0002-Skip-coverage-testing.patch
|
||||
Patch: 0006-Allow-older-versioneer.patch
|
||||
# https://github.com/dask/dask/pull/11185
|
||||
# Fix issues on Python 3.13
|
||||
Patch: 0001-Handle-Python-3.13-exception-type-change-in-unpack_c.patch
|
||||
Patch: 0002-test_derived_from-don-t-expect-extra-docstring-to-be.patch
|
||||
Patch: 0001-Remove-extra-test-dependencies.patch
|
||||
|
||||
# Stop building on i686
|
||||
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
|
||||
@ -47,24 +42,16 @@ BuildRequires: python3dist(scikit-image)
|
||||
BuildRequires: python3dist(xarray)
|
||||
%endif
|
||||
# Optional test requirements.
|
||||
# Fastavro does not support 32 bit architectures and is ExcludeArch:
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1943932
|
||||
%ifnarch %{arm32} %{ix86}
|
||||
BuildRequires: python3dist(fastavro)
|
||||
%endif
|
||||
BuildRequires: python3dist(h5py)
|
||||
BuildRequires: python3dist(psutil)
|
||||
# libarrow does not support 32 bit architectures and is ExcludeArch.
|
||||
# Tests don't pass on s390x either.
|
||||
%ifnarch %{arm} %{ix86} s390x
|
||||
# libarrow tests don't pass on s390x either.
|
||||
%ifnarch s390x
|
||||
BuildRequires: python3dist(pyarrow)
|
||||
%endif
|
||||
BuildRequires: python3dist(requests)
|
||||
BuildRequires: python3dist(sqlalchemy)
|
||||
# tables does not support 32 bit architectures and is ExcludeArch.
|
||||
%ifnarch %{ix86}
|
||||
BuildRequires: python3dist(tables)
|
||||
%endif
|
||||
BuildRequires: python3dist(zarr)
|
||||
|
||||
Recommends: python3-%{srcname}+array = %{version}-%{release}
|
||||
@ -120,12 +107,10 @@ Documentation for dask.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{srcname}-%{version} -p1
|
||||
# we don't use pre-commit when running tests
|
||||
sed -i '/"pre-commit"/d' setup.py
|
||||
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires -r -x test,array,bag,dataframe,delayed
|
||||
%pyproject_buildrequires -x test,array,bag,dataframe,delayed
|
||||
%if %{without bootstrap}
|
||||
%pyproject_buildrequires -x distributed
|
||||
%endif
|
||||
@ -145,68 +130,10 @@ rm -rf html/.{doctrees,buildinfo}
|
||||
%install
|
||||
%pyproject_install
|
||||
|
||||
%pyproject_save_files %{srcname}
|
||||
%pyproject_save_files -l %{srcname}
|
||||
|
||||
|
||||
%check
|
||||
%ifarch arm
|
||||
# Is there a way to do this in one line?
|
||||
%global have_arm 1
|
||||
%endif
|
||||
|
||||
%if 0%{?__isa_bits} == 32
|
||||
# read_sql_query with meta converts dtypes from 32 to 64.
|
||||
# https://github.com/dask/dask/issues/8620
|
||||
|
||||
# > tm.assert_frame_equal(
|
||||
# a, b, check_names=check_names, check_dtype=check_dtype, **kwargs
|
||||
# E AssertionError: Attributes of DataFrame.iloc[:, 1] (column name="age") are different
|
||||
# E
|
||||
# E Attribute "dtype" are different
|
||||
# E [left]: int32
|
||||
# E [right]: int64
|
||||
# dask/dataframe/utils.py:555: AssertionError
|
||||
k="${k-}${k+ and }not test_query_with_meta"
|
||||
%endif
|
||||
|
||||
%ifarch ppc64le
|
||||
# TODO: Should this be reported upstream? Is it a dask issue, or a numpy one?
|
||||
# Possibly related to
|
||||
# https://fedoraproject.org/wiki/Changes/PPC64LE_Float128_Transition?
|
||||
|
||||
# > assert allclose(a, b, equal_nan=equal_nan, **kwargs), msg
|
||||
# E AssertionError: found values in 'a' and 'b' which differ by more than the allowed amount
|
||||
# E assert False
|
||||
# E + where False = allclose(array([0.12586355-0.09957204j, 0.20256483+0.04098342j,\n 0.05781123-0.03588671j, 0.01135963-0.03334219j,\n 0.03747771+0.07495994j, 0.2106574 -0.0363521j ,\n 0.16352091+0.03782915j, 0.1381678 -0.06815128j,\n 0.03781295-0.04011523j, 0.01493269+0.07780643j]), array([0.12559072-0.07164038j, 0.20256483+0.05438578j,\n 0.05781123-0.03588671j, 0.01135963-0.03334219j,\n 0.03747771+0.07495994j, 0.2106574 -0.0363521j ,\n 0.16352091+0.03782915j, 0.1381678 -0.06815128j,\n 0.03781295-0.04011523j, 0.01493269+0.07780643j]), equal_nan=True, **{})
|
||||
# dask/array/utils.py:361: AssertionError
|
||||
k="${k-}${k+ and }not test_lstsq[100-10-10-True]"
|
||||
# > assert allclose(a, b, equal_nan=equal_nan, **kwargs), msg
|
||||
# E AssertionError: found values in 'a' and 'b' which differ by more than the allowed amount
|
||||
# E assert False
|
||||
# E + where False = allclose(array([ 0.20168675+0.08857556j, 0.144233 -0.19173091j,\n -0.03367557-0.08053959j, 0.04108325-0.24648308j,\n -0.01844576+0.00841932j, 0.29652375+0.05682199j,\n 0.05551828+0.20156798j, -0.08409592+0.02354949j,\n 0.09848743-0.00748637j, 0.22889193-0.07372773j]), array([ 0.20067551+0.2642591j , 0.144233 -0.18573336j,\n -0.03367557-0.08053959j, 0.04108325-0.24648308j,\n -0.01844576+0.00841932j, 0.29652375+0.05682199j,\n 0.05551828+0.20156798j, -0.08409592+0.02354949j,\n 0.09848743-0.00748637j, 0.22889193-0.07372773j]), equal_nan=True, **{})
|
||||
# dask/array/utils.py:361: AssertionError
|
||||
k="${k-}${k+ and }not test_lstsq[20-10-5-True]"
|
||||
|
||||
# test_vdot fails with NumPy 1.19.0
|
||||
# https://github.com/dask/dask/issues/6406
|
||||
#
|
||||
# vdot returns incorrect results on ppc64le
|
||||
# https://github.com/numpy/numpy/issues/17087
|
||||
|
||||
# > assert allclose(a, b, equal_nan=equal_nan, **kwargs), msg
|
||||
# E AssertionError: found values in 'a' and 'b' which differ by more than the allowed amount
|
||||
# E assert False
|
||||
# E + where False = allclose((0.38772781971416226-0.6851997484294434j), (0.38772781971416226-0.306563166009585j), equal_nan=True, **{})
|
||||
# dask/array/utils.py:361: AssertionError
|
||||
k="${k-}${k+ and }not test_vdot[shape0-chunks0]"
|
||||
# > assert allclose(a, b, equal_nan=equal_nan, **kwargs), msg
|
||||
# E AssertionError: found values in 'a' and 'b' which differ by more than the allowed amount
|
||||
# E assert False
|
||||
# E + where False = allclose((0.38772781971416226-0.6851997484294434j), (0.38772781971416226-0.306563166009585j), equal_nan=True, **{})
|
||||
# dask/array/utils.py:361: AssertionError
|
||||
k="${k-}${k+ and }not test_vdot[shape1-chunks1]"
|
||||
%endif
|
||||
|
||||
# This test compares against files in .github/. It does not work on the PyPI
|
||||
# sdist, and is only relevant to upstream CI anyway.
|
||||
#
|
||||
@ -214,22 +141,17 @@ k="${k-}${k+ and }not test_vdot[shape1-chunks1]"
|
||||
# https://github.com/dask/dask/issues/8499
|
||||
k="${k-}${k+ and }not test_development_guidelines_matches_ci"
|
||||
|
||||
# This test shows excess memory usage on Python 3.12
|
||||
# https://github.com/dask/dask/issues/10418
|
||||
k="${k-}${k+ and }not test_division_or_partition"
|
||||
|
||||
pytest_args=(
|
||||
-m 'not network'
|
||||
|
||||
-n %[0%{?have_arm}?"2":"auto"]
|
||||
|
||||
%ifarch %{ix86}
|
||||
# Ignore 32-bit warning
|
||||
-W 'ignore:invalid value encountered in cast:RuntimeWarning'
|
||||
%endif
|
||||
-n "auto"
|
||||
|
||||
-k "${k-}"
|
||||
|
||||
# Upstream uses 'thread' for Windows, but that kills the whole session, and
|
||||
# we'd like to see exactly which tests fail.
|
||||
--timeout_method=signal
|
||||
|
||||
--pyargs dask
|
||||
)
|
||||
|
||||
@ -239,13 +161,11 @@ pytest_args=(
|
||||
# ensure these tests get skipped, but dask-expr requires arrow, so it
|
||||
# it gets pulled into the build env anyway
|
||||
# https://github.com/dask/dask/issues/11186
|
||||
# this is hideous because the tests are part of the library, it would
|
||||
# be much less ugly if the tests were separate like in any sane project
|
||||
mv %{buildroot}%{python3_sitelib}/%{srcname}/dataframe/io/tests/test_parquet.py %{buildroot}%{python3_sitelib}/%{srcname}/dataframe/io/tests/XXparquetXX
|
||||
%endif
|
||||
|
||||
cd docs
|
||||
%{pytest} "${pytest_args[@]}" -k "test_derived_from"
|
||||
%{pytest} "${pytest_args[@]}"
|
||||
|
||||
%ifarch s390x
|
||||
mv %{buildroot}%{python3_sitelib}/%{srcname}/dataframe/io/tests/XXparquetXX %{buildroot}%{python3_sitelib}/%{srcname}/dataframe/io/tests/test_parquet.py
|
||||
@ -254,13 +174,13 @@ mv %{buildroot}%{python3_sitelib}/%{srcname}/dataframe/io/tests/XXparquetXX %{bu
|
||||
|
||||
%files -n python3-%{srcname} -f %{pyproject_files}
|
||||
%doc README.rst
|
||||
%license LICENSE.txt dask/array/NUMPY_LICENSE.txt
|
||||
%license dask/array/NUMPY_LICENSE.txt
|
||||
%{_bindir}/dask
|
||||
|
||||
%if %{without bootstrap}
|
||||
%files -n python-%{srcname}-doc
|
||||
%doc html
|
||||
%license LICENSE.txt dask/array/NUMPY_LICENSE.txt
|
||||
%license dask/array/NUMPY_LICENSE.txt
|
||||
%endif
|
||||
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (dask-2024.6.0.tar.gz) = b8397ea88c4a315a111806efc0f91c0601dc4a33219c0a6692b1d5a172cc352ee84e61f2af1340e07d26a8dc487b45cee995acb69987a9a814409d6b6b841508
|
||||
SHA512 (dask-2024.6.2.tar.gz) = d6004429672c08971b1b3ef6fe0a413d7ce8ad5af9f65c7d1fceb612be0acb801739b990a7ee7949bb801d654f64f0bb11641d289378f9e5307896fe238db261
|
||||
|
Loading…
Reference in New Issue
Block a user