Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/awkward/operations/ak_from_feather.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from __future__ import annotations

import warnings

import awkward as ak
from awkward._dispatch import high_level_function

Expand Down Expand Up @@ -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,
Expand Down
18 changes: 15 additions & 3 deletions src/awkward/operations/ak_to_feather.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from __future__ import annotations

import os
import warnings

import awkward as ak
from awkward._dispatch import high_level_function
Expand Down Expand Up @@ -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,
)
Loading