Skip to content

Commit

Permalink
GH-43069: [Python] Use Py_IsFinalizing from pythoncapi_compat.h (#43767)
Browse files Browse the repository at this point in the history
### Rationale for this change

#43540 already vendored `pythoncapi_compat.h`, so closing #43069 by using this as well for `Py_IsFinalizing` (which was added in #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]>
  • Loading branch information
jorisvandenbossche authored Aug 21, 2024
1 parent 4af1e49 commit 9fc0301
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions python/pyarrow/src/arrow/python/udf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9fc0301

Please sign in to comment.