Skip to content

Commit cc15bf1

Browse files
authored
GH-49846: [CI][Python] fix test-conda-python-3.11-hypothesis (#49847)
### Rationale for this change [test-conda-python-3.11-hypothesis](https://github.com/ursacomputing/crossbow/actions/runs/24810904545/job/72615383517#step:6:3858) build is failing with `FutureWarning: pyarrow.gandiva is deprecated as of 24.0.0 and will be removed in a future version` due to the `-W error` flag in the [dev/tasks/tasks.yml](https://github.com/apache/arrow/blob/487f1480914d0066a96db9c8f1395e4e9bdd6b56/dev/tasks/tasks.yml#L548). ### What changes are included in this PR? Instead of adding `-W ignore::FutureWarning:pyarrow.gandiva` to the pytest args in the `tasks.yml` I asked Claude to do the fix in `conftest.py`. I have reviewed the change. ### Are these changes tested? Yes, with the extended build. ### Are there any user-facing changes? No. * GitHub Issue: #49846 Authored-by: AlenkaF <frim.alenka@gmail.com> Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
1 parent 487f148 commit cc15bf1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

python/pyarrow/conftest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,10 @@
123123
pass
124124

125125
try:
126-
import pyarrow.gandiva # noqa
126+
import warnings
127+
with warnings.catch_warnings():
128+
warnings.simplefilter("ignore", FutureWarning)
129+
import pyarrow.gandiva # noqa
127130
defaults['gandiva'] = True
128131
except ImportError:
129132
pass

0 commit comments

Comments
 (0)