fix: handle FutureWarning for deprecated feather#4198
Conversation
Suppress FutureWarning when using deprecated write_feather.
Added warnings import to ak_to_feather.py
Suppress FutureWarning for deprecated pyarrow functions.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
|
|
The documentation preview is ready to be viewed at http://preview.awkward-array.org.s3-website.us-east-1.amazonaws.com/PR4198 |
ianna
left a comment
There was a problem hiding this comment.
@TaiSakuma -- I'm done with this PR. Please review and merge it at your earliest convenience. Thanks!
TaiSakuma
left a comment
There was a problem hiding this comment.
I approve this PR.
I will paste findings by Claude.
The warning suppression is correct: it filters by both message= and category=FutureWarning around a single call, and the regexes match the upstream strings in apache/arrow#49590. With filterwarnings = ["error"] in pyproject.toml, this prevents a test failure once CI resolves pyarrow >= 24.0.0.
Two follow-ups, both out of scope here:
-
Pre-existing bug in
from_feather:read_table(path, columns, use_threads, memory_map)forwards positionally, butread_table's parameter order is(source, columns, memory_map, use_threads). Souse_threadsandmemory_mapare swapped, inverting the documented defaults. Keyword arguments fix it. -
pyarrow.featheris deprecated;to_feather/from_feathershould move topyarrow.ipcbefore the API is removed. Notepyarrow.ipcdoes not compress by default, unlikewrite_feather.
🤖 Generated with Claude Code
|
You can also add this filter in pyproject.toml and avoid modifying tests completely. Smaller change. |
Now that @pranjan2023 is working on a proper implementation I don’t think we should spend more time on fixing the temporary fix. |
Suppress FutureWarning when using deprecated write_feather.