From 9fc03015463a8f1cb616b088342b104fbc767a0c Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Wed, 21 Aug 2024 09:22:53 +0200 Subject: [PATCH] GH-43069: [Python] Use Py_IsFinalizing from pythoncapi_compat.h (#43767) ### Rationale for this change https://github.com/apache/arrow/pull/43540 already vendored `pythoncapi_compat.h`, so closing https://github.com/apache/arrow/issues/43069 by using this as well for `Py_IsFinalizing` (which was added in https://github.com/apache/arrow/pull/42034, and for which we opened that follow-up issue to use `pythoncapi_compat.h` instead) Authored-by: Joris Van den Bossche Signed-off-by: Joris Van den Bossche --- python/pyarrow/src/arrow/python/udf.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/python/pyarrow/src/arrow/python/udf.cc b/python/pyarrow/src/arrow/python/udf.cc index 2c1e97c3ea03d..74f16899c47eb 100644 --- a/python/pyarrow/src/arrow/python/udf.cc +++ b/python/pyarrow/src/arrow/python/udf.cc @@ -24,14 +24,11 @@ #include "arrow/compute/kernel.h" #include "arrow/compute/row/grouper.h" #include "arrow/python/common.h" +#include "arrow/python/vendored/pythoncapi_compat.h" #include "arrow/table.h" #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;