Skip to content

GH-49232: [Python] deprecate feather python#49590

Open
piyushka-ally wants to merge 3 commits intoapache:mainfrom
piyushka-ally:gh-49232-deprecate-feather-python
Open

GH-49232: [Python] deprecate feather python#49590
piyushka-ally wants to merge 3 commits intoapache:mainfrom
piyushka-ally:gh-49232-deprecate-feather-python

Conversation

@piyushka-ally
Copy link
Copy Markdown

@piyushka-ally piyushka-ally commented Mar 24, 2026

Rationale for this change

Arrow C++ is deprecating the Feather reader/writer (#49231) so we should update the Python functions too. Feather V2 is exactly the Arrow IPC file format, making the separate pyarrow.feather module redundant. Users should migrate to pyarrow.ipc.

What changes are included in this PR?

  • Added FutureWarning deprecation warnings to all four public APIs in pyarrow.feather: write_feather(), read_feather(), read_table(), and FeatherDataset
  • Extracted _read_table_internal() so that read_feather() calling read_table() internally does not produce double warnings
  • Updated FeatherDataset.read_table() to use the internal function for the same reason
  • Added .. deprecated:: 24.0.0 directives to all four public API docstrings
  • Added module-level pytestmark filter in test_feather.py to suppress warnings in existing tests
  • Added 5 new tests verifying deprecation warnings are emitted correctly (including a no-double-warning test)
  • Added @pytest.mark.filterwarnings to 5 test functions in test_dataset.py that use feather as a utility
  • Updated feather.rst with a deprecation notice and migration guide (including a note that pyarrow.ipc does not compress by default unlike feather.write_feather)
  • Updated formats.rst to mark the Feather API section as deprecated

Are these changes tested?

Yes. Five new tests verify that each deprecated function emits exactly one FutureWarning, and existing tests continue to pass with module/function-level warning filters.

Are there any user-facing changes?

Yes — calling pyarrow.feather.write_feather(), read_feather(), read_table(), or FeatherDataset() now emits a FutureWarning directing users to pyarrow.ipc equivalents. Existing functionality is unchanged.

Piyush Kanti Chanda added 2 commits March 24, 2026 13:24
Deprecate the pyarrow.feather module in favor of pyarrow.ipc, since
Feather V2 is the Arrow IPC file format. Add FutureWarning to
write_feather, read_feather, read_table, and FeatherDataset. Extract
_read_table_internal to avoid double-warnings. Update docs with
deprecation notices and migration guide.

Co-authored-by: Isaac
…sion note

- Add missing filterwarnings decorator to test_write_dataset_schema_metadata
- Use tempdir fixture in test_write_feather_deprecated to avoid leaked files
- Document that IPC does not compress by default unlike feather.write_feather

Co-authored-by: Isaac
@github-actions
Copy link
Copy Markdown

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

See also:

@thisisnic thisisnic changed the title Gh 49232 deprecate feather python GH-49232: [Python] deprecate feather python Mar 29, 2026
@github-actions
Copy link
Copy Markdown

⚠️ GitHub issue #49232 has no components, please add labels for components.

Copy link
Copy Markdown
Member

@AlenkaF AlenkaF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @piyushka-ally!
I think it looks good and I just have two minor comments

Also, it might be worth syncing with Arrow C++ and other bindings so that we could get the deprecation in the same release. @pitrou is there an open PR for C++?

- Move `.. deprecated::` after `.. currentmodule::` in formats.rst
- Merge write_feather, read_table, read_feather deprecation tests into
  a single test_feather_deprecation_warnings function

Co-authored-by: Isaac
@piyushka-ally
Copy link
Copy Markdown
Author

Thanks for the PR @piyushka-ally! I think it looks good and I just have two minor comments

Also, it might be worth syncing with Arrow C++ and other bindings so that we could get the deprecation in the same release. @pitrou is there an open PR for C++?

The R deprecation PR is already open at #49276. I don't see a C++ PR for #49231 yet. I'll watch for it. Happy to rebase/adjust timing if needed to align with the same release.

@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Apr 2, 2026
Copy link
Copy Markdown
Member

@AlenkaF AlenkaF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for a quick update!
I missed something, added one more comment.


# --- Deprecation warning tests ---

@pytest.mark.pandas
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if pandas mark is needed here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @pytest.mark.pandas is there because read_feather calls .to_pandas() internally, so the test would fail in environments without pandas installed. write_feather and read_table don't need it, but read_feather does. Should I split this back into two tests, one without the pandas mark for write_feather/read_table, and a separate pandas-marked one for read_feather? Or would you prefer a different approach?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants