diff --git a/src/awkward/operations/ak_from_feather.py b/src/awkward/operations/ak_from_feather.py index ccf1d3c111..42564f1f63 100644 --- a/src/awkward/operations/ak_from_feather.py +++ b/src/awkward/operations/ak_from_feather.py @@ -2,6 +2,8 @@ from __future__ import annotations +import warnings + import awkward as ak from awkward._dispatch import high_level_function @@ -73,7 +75,19 @@ def _impl( ): import pyarrow.feather - arrow_table = pyarrow.feather.read_table(path, columns, use_threads, memory_map) + with warnings.catch_warnings(): + warnings.filterwarnings( + "ignore", + message=r".*pyarrow\.feather\.(write_feather|read_table) is deprecated.*", + category=FutureWarning, + ) + + arrow_table = pyarrow.feather.read_table( + path, + columns, + use_threads, + memory_map, + ) return ak.operations.ak_from_arrow._impl( arrow_table, diff --git a/src/awkward/operations/ak_to_feather.py b/src/awkward/operations/ak_to_feather.py index c074a10670..e5b1de5b48 100644 --- a/src/awkward/operations/ak_to_feather.py +++ b/src/awkward/operations/ak_to_feather.py @@ -2,6 +2,7 @@ from __future__ import annotations import os +import warnings import awkward as ak from awkward._dispatch import high_level_function @@ -159,6 +160,17 @@ def _impl( f"'destination' argument of 'ak.to_feather' must be a path-like, not {type(destination).__name__} ('array' argument is first; 'destination' second)" ) from None - pyarrow.feather.write_feather( - table, destination, compression, compression_level, chunksize, feather_version - ) + with warnings.catch_warnings(): + warnings.filterwarnings( + "ignore", + message="pyarrow.feather.write_feather is deprecated.*", + category=FutureWarning, + ) + pyarrow.feather.write_feather( + table, + destination, + compression, + compression_level, + chunksize, + feather_version, + )