TST: Match pandas warnings for concat sort#3897
Conversation
|
|
||
| result = concat_indexed_dataframes([a, b], join=join) | ||
| expected = pd.concat([A, B], axis=0, join=join) | ||
| with warnings.catch_warnings(record=True) as w: |
There was a problem hiding this comment.
The hope is that these tests are future-proof when pandas switches the default to sort=False. Then pandas should no longer emit warnings, but the tests will still pass (and we'll be free to clean this up).
| pd.concat([pdf1, pdf2, pdf3])) | ||
|
|
||
|
|
||
| @pytest.mark.filterwarnings('ignore') |
There was a problem hiding this comment.
This was getting tedious, and I'm hoping the warning behavior is thoroughly tested by now.
|
I have one more fix for compat with pandas master. |
Avoid using a private method removed on pandas master.
|
Latest commit fixes errors failing our cron build against pandas master like https://travis-ci.org/dask/dask/jobs/417927666#L1652 |
|
Taking a look at the remaining failures now. |
|
Lasts failure should be due to pandas-dev/pandas#22465. Haven't figured out if that's a pandas bug or API change yet. |
|
@mrocklin if you're planning to release soon, it'd be nice to get this in for the compatibility fix. I wouldn't recommend delaying the release for the resolution of pandas-dev/pandas#22465 |
|
Noted. Happy to wait. |
|
Seems like that last issue will be fixed upstream in pandas. This should be good to go. |
Pandas now warns on
concat/appendwhen the non-expanding axis isn't already aligned. This PR should make us mostly align with pandas behavior (we may emit two warnings when pandas emits one in some cases, but fixing that would be a hassle).The warnings occur when the graph is constructed, not at runtime.