summaryrefslogtreecommitdiff
path: root/dev-python/pyarrow
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-06-14 00:09:04 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-06-14 00:09:04 +0100
commit5e41a38157bb40e8513e8e34426e85faba672fe7 (patch)
tree38e9365afd56c161d0e970ddf5420b2585130587 /dev-python/pyarrow
parent0ebcd2cbf178600b5eb36b2f24cdbb3d2f4a9000 (diff)
gentoo auto-resync : 14:06:2024 - 00:09:04
Diffstat (limited to 'dev-python/pyarrow')
-rw-r--r--dev-python/pyarrow/Manifest3
-rw-r--r--dev-python/pyarrow/files/pyarrow-16.1.0-numpy-2.patch65
-rw-r--r--dev-python/pyarrow/pyarrow-16.1.0.ebuild13
3 files changed, 72 insertions, 9 deletions
diff --git a/dev-python/pyarrow/Manifest b/dev-python/pyarrow/Manifest
index 4ef20f148d33..4341146342eb 100644
--- a/dev-python/pyarrow/Manifest
+++ b/dev-python/pyarrow/Manifest
@@ -1,3 +1,4 @@
+AUX pyarrow-16.1.0-numpy-2.patch 2950 BLAKE2B 89457b0b8c990b0fdc0409d72ef7326432a327dcd435277131e3bd2dd3506e3f3c8877edad37f318bac5627ff6c53c045115b5cfd91f887e21524b525aca4535 SHA512 5bd77755392f1cbfdc765a3bc713040cf75a9a4e824536a400f8c163633c41b1ebc38f4ba74be83e37c346789b34eb0a421bf549b4449ce31b613706effec859
DIST apache-arrow-16.1.0.tar.gz 21707079 BLAKE2B 5541c364351e59e8164f2461546bce3ddc834d70b3a03b815b681187674bdd89ccfb7eb113bf9010c821845b0c1fa51f5321bfea5b20927e6364f6452ec980d2 SHA512 28975f59e1fdde2dba4afaf4a5ba934b63db3a7f27656e2aa0af0f0d2a046c9dbfa9a6082de94629c36d03809b296566a37ea65ec5a2fc17fedac7d21e272d31
-EBUILD pyarrow-16.1.0.ebuild 2642 BLAKE2B 568e4596dfc28e0a3b5314358b283e8ae60d1d49fa4b872573e672574fa7b59a90a22008c872024a0649507e88aeb8bf62f377d9ad255d191c86d263d708f97b SHA512 108360e9c1e2782ccf8b0dc20fb140f9e1dd43087025255e89289b9d69d2e387f1b9f138fc366d447c4035e2f4e8ade6b6bfda3e1e5d81a24bbefe91c5de1fd4
+EBUILD pyarrow-16.1.0.ebuild 2519 BLAKE2B f9999e62270d3fea1c4d4707fbb8e8adb794584d3e61a79aa81e035b1900b2a3e4c9537fe56223e49be1bf4ee8e37566b8e2b5f854f4d90becc005ef5b078c15 SHA512 e5f9823fda37593720c94b37dba5d5b74075c38a77c0ac6950d14322031e541637fc2b2a6e1a4569c7c44c1d9eb3046f0aeb704123cabc652ac3826fa9395264
MISC metadata.xml 555 BLAKE2B 5683205ece2b0266e5792f42ebd515c1822563d2705f046ebcabd1de71efc67800616303b2fc83ea8cac3395303178f13e859b7390adfcef23da8d687fc8d6a3 SHA512 61d8f5bcbdbe92b858d0aab3040cd3e8dcb33ba0c45808649e032a165d6826c1a489ae2cfbf8dca52eda82d5b24b4c3f74a9abd6f87d5ff72f6578cf7535c797
diff --git a/dev-python/pyarrow/files/pyarrow-16.1.0-numpy-2.patch b/dev-python/pyarrow/files/pyarrow-16.1.0-numpy-2.patch
new file mode 100644
index 000000000000..d43e15746408
--- /dev/null
+++ b/dev-python/pyarrow/files/pyarrow-16.1.0-numpy-2.patch
@@ -0,0 +1,65 @@
+diff --git a/pyarrow/tests/parquet/common.py b/pyarrow/tests/parquet/common.py
+index 8365ed5b28543..c3094ee20b34c 100644
+--- a/pyarrow/tests/parquet/common.py
++++ b/pyarrow/tests/parquet/common.py
+@@ -83,7 +83,7 @@ def _random_integers(size, dtype):
+ iinfo = np.iinfo(dtype)
+ return np.random.randint(max(iinfo.min, platform_int_info.min),
+ min(iinfo.max, platform_int_info.max),
+- size=size).astype(dtype)
++ size=size, dtype=dtype)
+
+
+ def _range_integers(size, dtype):
+diff --git a/pyarrow/tests/test_array.py b/pyarrow/tests/test_array.py
+index 88394c77e429d..1032ab9add3ca 100644
+--- a/pyarrow/tests/test_array.py
++++ b/pyarrow/tests/test_array.py
+@@ -3398,7 +3398,7 @@ def test_numpy_array_protocol():
+ result = np.asarray(arr)
+ np.testing.assert_array_equal(result, expected)
+
+- if Version(np.__version__) < Version("2.0"):
++ if Version(np.__version__) < Version("2.0.0.dev0"):
+ # copy keyword is not strict and not passed down to __array__
+ result = np.array(arr, copy=False)
+ np.testing.assert_array_equal(result, expected)
+diff --git a/pyarrow/tests/test_pandas.py b/pyarrow/tests/test_pandas.py
+index be2c5b14e68b0..ba9d6a3c01391 100644
+--- a/pyarrow/tests/test_pandas.py
++++ b/pyarrow/tests/test_pandas.py
+@@ -780,7 +780,7 @@ def test_integer_no_nulls(self):
+ info = np.iinfo(dtype)
+ values = np.random.randint(max(info.min, np.iinfo(np.int_).min),
+ min(info.max, np.iinfo(np.int_).max),
+- size=num_values)
++ size=num_values, dtype=dtype)
+ data[dtype] = values.astype(dtype)
+ fields.append(pa.field(dtype, arrow_dtype))
+
+diff --git a/pyarrow/tests/test_table.py b/pyarrow/tests/test_table.py
+index a58010d083e92..f40759de50c8c 100644
+--- a/pyarrow/tests/test_table.py
++++ b/pyarrow/tests/test_table.py
+@@ -3281,7 +3281,7 @@ def test_numpy_array_protocol(constructor):
+ table = constructor([[1, 2, 3], [4.0, 5.0, 6.0]], names=["a", "b"])
+ expected = np.array([[1, 4], [2, 5], [3, 6]], dtype="float64")
+
+- if Version(np.__version__) < Version("2.0"):
++ if Version(np.__version__) < Version("2.0.0.dev0"):
+ # copy keyword is not strict and not passed down to __array__
+ result = np.array(table, copy=False)
+ np.testing.assert_array_equal(result, expected)
+diff --git a/scripts/test_leak.py b/scripts/test_leak.py
+index f2bbe8d051bf9..86a87f5e742e8 100644
+--- a/scripts/test_leak.py
++++ b/scripts/test_leak.py
+@@ -98,7 +98,7 @@ def func():
+
+
+ def test_ARROW_8801():
+- x = pd.to_datetime(np.random.randint(0, 2**32, size=2**20),
++ x = pd.to_datetime(np.random.randint(0, 2**32, size=2**20, dtype=np.int64),
+ unit='ms', utc=True)
+ table = pa.table(pd.DataFrame({'x': x}))
+
diff --git a/dev-python/pyarrow/pyarrow-16.1.0.ebuild b/dev-python/pyarrow/pyarrow-16.1.0.ebuild
index 37167ff75b2c..7a027d3f6336 100644
--- a/dev-python/pyarrow/pyarrow-16.1.0.ebuild
+++ b/dev-python/pyarrow/pyarrow-16.1.0.ebuild
@@ -39,6 +39,11 @@ EPYTEST_XDIST=1
distutils_enable_tests pytest
src_prepare() {
+ local PATCHES=(
+ # https://github.com/apache/arrow/pull/42099
+ "${FILESDIR}/${P}-numpy-2.patch"
+ )
+
# cython's -Werror
sed -i -e '/--warning-errors/d' CMakeLists.txt || die
distutils-r1_src_prepare
@@ -83,14 +88,6 @@ python_test() {
tests/test_pandas.py::test_array_to_pandas_roundtrip
)
- if has_version ">=dev-python/numpy-2"; then
- EPYTEST_DESELECT+=(
- # https://github.com/apache/arrow/issues/41319
- tests/test_array.py::test_numpy_array_protocol
- tests/test_table.py::test_numpy_array_protocol
- )
- fi
-
cd "${T}" || die
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
epytest --pyargs pyarrow