This is an automated email from the ASF dual-hosted git repository.
jorisvandenbossche pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 9fc0301546 GH-43069: [Python] Use Py_IsFinalizing from
pythoncapi_compat.h (#43767)
9fc0301546 is described below
commit 9fc03015463a8f1cb616b088342b104fbc767a0c
Author: Joris Van den Bossche <[email protected]>
AuthorDate: Wed Aug 21 09:22:53 2024 +0200
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 <[email protected]>
Signed-off-by: Joris Van den Bossche <[email protected]>
---
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 2c1e97c3ea..74f16899c4 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;