Repository navigation
Pandas 3.1: use suffixes= instead of deprecated lsuffix/rsuffix in join - #12712
Merged
Merged
Conversation
pandas 4 deprecates DataFrame.join(lsuffix=..., rsuffix=...) in favour of suffixes=(...). The pandas reference frames in these tests triggered Pandas4Warning, which dask's filterwarnings=error turns into a failure. The dask collection calls intentionally keep using dask's public lsuffix/rsuffix keywords, so the tests still cover dask's mapping of those keywords onto pandas' suffixes.
pandas added the `suffixes` keyword to `DataFrame.join` only in 3.1, at the same time it deprecated `lsuffix`/`rsuffix`. Replacing the deprecated keywords outright broke the tests on older pandas with `TypeError: DataFrame.join() got an unexpected keyword argument 'suffixes'`. Add a version-aware helper for the pandas expectations.
suffixes= instead of deprecated lsuffix/rsuffix in join
crusaderky
marked this pull request as ready for review
November 12, 2026 15:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pandas 3.1 deprecates
DataFrame.join(lsuffix=..., rsuffix=...)in favour ofDataFrame.join(suffixes=(...)), emittingPandas4Warning.This was triggered by
dask/dataframe/tests/test_multi.py::test_sequential_joinsdask/dataframe/tests/test_multi.py::test_join_by_index_patterns[disk|tasks-{inner,left,right,outer}]dask/dataframe/tests/test_dataframe.py::test_join_seriesThe warnings come from the pandas reference frames in these tests, not from dask
internals:
DataFrame.joinindask/dataframe/dask_expr/_collection.pyalreadyforwards
lsuffix/rsuffixassuffixes=(lsuffix, rsuffix)tomerge.