diff options
author | Michał Górny <mgorny@gentoo.org> | 2024-07-10 20:31:46 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-07-10 20:52:02 +0200 |
commit | e0d064d847bcc79b85788165df0aecdc2d8f25a5 (patch) | |
tree | 41bd97c113557232d94ed595d98293333b907bb0 /dev-python/pyarrow | |
parent | sys-kernel/gentoo-sources: drop 6.9.5 (diff) | |
download | gentoo-e0d064d847bcc79b85788165df0aecdc2d8f25a5.tar.gz gentoo-e0d064d847bcc79b85788165df0aecdc2d8f25a5.tar.bz2 gentoo-e0d064d847bcc79b85788165df0aecdc2d8f25a5.zip |
dev-python/pyarrow: Enable py3.13
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/pyarrow')
-rw-r--r-- | dev-python/pyarrow/files/pyarrow-16.1.0-py313.patch | 60 | ||||
-rw-r--r-- | dev-python/pyarrow/pyarrow-16.1.0.ebuild | 5 |
2 files changed, 64 insertions, 1 deletions
diff --git a/dev-python/pyarrow/files/pyarrow-16.1.0-py313.patch b/dev-python/pyarrow/files/pyarrow-16.1.0-py313.patch new file mode 100644 index 000000000000..f3e0053dd003 --- /dev/null +++ b/dev-python/pyarrow/files/pyarrow-16.1.0-py313.patch @@ -0,0 +1,60 @@ +diff --git a/python/pyarrow/src/arrow/python/udf.cc b/python/pyarrow/src/arrow/python/udf.cc +index e9b72a2592738..b6a862af8ca07 100644 +--- a/pyarrow/src/arrow/python/udf.cc ++++ b/pyarrow/src/arrow/python/udf.cc +@@ -28,6 +28,10 @@ + #include "arrow/util/checked_cast.h" + #include "arrow/util/logging.h" + ++// Py_IsFinalizing added in Python 3.13.0a4 ++#if PY_VERSION_HEX < 0x030D00A4 ++#define Py_IsFinalizing() _Py_IsFinalizing() ++#endif + namespace arrow { + using compute::ExecSpan; + using compute::Grouper; +@@ -47,7 +51,7 @@ struct PythonUdfKernelState : public compute::KernelState { + // function needs to be destroyed at process exit + // and Python may no longer be initialized. + ~PythonUdfKernelState() { +- if (_Py_IsFinalizing()) { ++ if (Py_IsFinalizing()) { + function->detach(); + } + } +@@ -64,7 +68,7 @@ struct PythonUdfKernelInit { + // function needs to be destroyed at process exit + // and Python may no longer be initialized. + ~PythonUdfKernelInit() { +- if (_Py_IsFinalizing()) { ++ if (Py_IsFinalizing()) { + function->detach(); + } + } +@@ -132,7 +136,7 @@ struct PythonTableUdfKernelInit { + // function needs to be destroyed at process exit + // and Python may no longer be initialized. + ~PythonTableUdfKernelInit() { +- if (_Py_IsFinalizing()) { ++ if (Py_IsFinalizing()) { + function_maker->detach(); + } + } +@@ -173,7 +177,7 @@ struct PythonUdfScalarAggregatorImpl : public ScalarUdfAggregator { + }; + + ~PythonUdfScalarAggregatorImpl() override { +- if (_Py_IsFinalizing()) { ++ if (Py_IsFinalizing()) { + function->detach(); + } + } +@@ -270,7 +274,7 @@ struct PythonUdfHashAggregatorImpl : public HashUdfAggregator { + }; + + ~PythonUdfHashAggregatorImpl() override { +- if (_Py_IsFinalizing()) { ++ if (Py_IsFinalizing()) { + function->detach(); + } + } diff --git a/dev-python/pyarrow/pyarrow-16.1.0.ebuild b/dev-python/pyarrow/pyarrow-16.1.0.ebuild index b2a9ed0139dd..0f95bb569a64 100644 --- a/dev-python/pyarrow/pyarrow-16.1.0.ebuild +++ b/dev-python/pyarrow/pyarrow-16.1.0.ebuild @@ -5,7 +5,7 @@ EAPI=8 DISTUTILS_EXT=1 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) inherit distutils-r1 multiprocessing @@ -42,6 +42,8 @@ src_prepare() { local PATCHES=( # https://github.com/apache/arrow/pull/42099 "${FILESDIR}/${P}-numpy-2.patch" + # https://github.com/apache/arrow/pull/42034 + "${FILESDIR}/${P}-py313.patch" ) # cython's -Werror @@ -86,6 +88,7 @@ python_test() { tests/test_convert_builtin.py::test_array_to_pylist_roundtrip tests/test_feather.py::test_roundtrip tests/test_pandas.py::test_array_to_pandas_roundtrip + tests/test_types.py::test_hashing ) cd "${T}" || die |