This is an automated email from the ASF dual-hosted git repository.
alenka 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 82847d8f6d GH-49227: [Python] Deprecate `pyarrow.gandiva` (#49637)
82847d8f6d is described below
commit 82847d8f6dae87e709d284b4b871da1424e93a25
Author: Alenka Frim <[email protected]>
AuthorDate: Thu Apr 2 09:50:27 2026 +0200
GH-49227: [Python] Deprecate `pyarrow.gandiva` (#49637)
### Rationale for this change
See: https://github.com/apache/arrow/issues/49227#issue-3926177634
### What changes are included in this PR?
Deprecation warnings for `pyarrow.gandiva` added for version 24.0.0
### Are these changes tested?
Yes, tested locally that warnings are raised on import. CI tests verify the
warnings are filtered in out test suite.
### Are there any user-facing changes?
Yes, `pyarrow.gandiva` is deprecated and will be removed in a feature
PyArrow version.
* GitHub Issue: #49227
Authored-by: AlenkaF <[email protected]>
Signed-off-by: AlenkaF <[email protected]>
---
docs/source/developers/python/building.rst | 2 +-
docs/source/developers/python/development.rst | 2 +-
python/pyarrow/gandiva.pyx | 8 ++++++++
python/setup.cfg | 2 ++
4 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/docs/source/developers/python/building.rst
b/docs/source/developers/python/building.rst
index 1d40d78f0a..73a2482ecb 100644
--- a/docs/source/developers/python/building.rst
+++ b/docs/source/developers/python/building.rst
@@ -621,7 +621,7 @@ certain components to be built):
* - ``ARROW_ORC``
- ``PYARROW_WITH_ORC``
* - ``ARROW_GANDIVA``
- - ``PYARROW_WITH_GANDIVA``
+ - ``PYARROW_WITH_GANDIVA`` (deprecated since version 24.0.0)
Installing Nightly Packages
===========================
diff --git a/docs/source/developers/python/development.rst
b/docs/source/developers/python/development.rst
index e70fb44307..91f98cab06 100644
--- a/docs/source/developers/python/development.rst
+++ b/docs/source/developers/python/development.rst
@@ -90,7 +90,7 @@ The test groups currently include:
* ``dataset``: Apache Arrow Dataset tests
* ``flight``: Flight RPC tests
-* ``gandiva``: tests for Gandiva expression compiler (uses LLVM)
+* ``gandiva``: tests for Gandiva expression compiler (uses LLVM, deprecated
since version 24.0.0)
* ``hdfs``: tests that use libhdfs to access the Hadoop filesystem
* ``hypothesis``: tests that use the ``hypothesis`` module for generating
random test cases. Note that ``--hypothesis`` doesn't work due to a quirk
diff --git a/python/pyarrow/gandiva.pyx b/python/pyarrow/gandiva.pyx
index eb764df735..0a6e8f786e 100644
--- a/python/pyarrow/gandiva.pyx
+++ b/python/pyarrow/gandiva.pyx
@@ -75,6 +75,14 @@ from pyarrow.includes.libgandiva cimport (
GetRegisteredFunctionSignatures)
+import warnings
+warnings.warn(
+ "pyarrow.gandiva is deprecated as of 24.0.0 and will be removed in a
future version.",
+ FutureWarning,
+ stacklevel=2,
+)
+
+
cdef class Node(_Weakrefable):
cdef:
shared_ptr[CNode] node
diff --git a/python/setup.cfg b/python/setup.cfg
index b0c3edfa8b..2d6558009b 100644
--- a/python/setup.cfg
+++ b/python/setup.cfg
@@ -22,6 +22,8 @@ build-dir = doc/_build
[tool:pytest]
addopts = --ignore=scripts
filterwarnings =
+ # https://github.com/apache/arrow/issues/49227
+ ignore:pyarrow.gandiva is deprecated:FutureWarning
error:The SparseDataFrame:FutureWarning
# https://github.com/apache/arrow/issues/38239
ignore:Setting custom ClientSession:DeprecationWarning