Skip to content

CI: Include FutureWarning from numpy in npdev build #48041

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 17, 2022

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke commented Aug 11, 2022

xref #46767 (comment)

cc @jbrockmendel

@mroeschke mroeschke added the CI Continuous Integration label Aug 11, 2022
@mroeschke
Copy link
Member Author

mroeschke commented Aug 11, 2022

@jbrockmendel just to confirm, do we want to check FutureWarnings that pandas issues or numpy? I don't think I fully understand the use case here yet.

@jbrockmendel
Copy link
Member

just to confirm, do we want to check FutureWarnings that pandas issues or numpy?

pandas

I don't think I fully understand the use case here yet.

based on test_fillna_datelike:

df = DataFrame(
            {
                "Date": [NaT, Timestamp("2014-1-1")],
                "Date2": [Timestamp("2013-1-1"), NaT],
            }
        )

>>> result = df.fillna(value={"Date": df["Date2"]})
<stdin>:1: FutureWarning: In a future version, `df.iloc[:, i] = newvals` will attempt to set the values inplace instead of always setting a new array. To retain the old behavior, use either `df[df.columns[i]] = newvals` or, if columns are non-unique, `df.isetitem(i, newvals)`

The warning issued here isn't because the user needs to update their code, but because we haven't updated our internal usage. i.e. it indicates something we need to change on our end, and shouldn't be shown to the user. So getting it should fail the CI.

@mroeschke
Copy link
Member Author

Ah gotcha, that makes sense. I think failing the CI for pandas warning should happen for all builds not just the npdev one so I'll work on adding that.

@mroeschke
Copy link
Member Author

mroeschke commented Aug 12, 2022

I'll try to add separate PRs addressing these warnings too (I see some pyarrow ones as well). This PR may be quite large if we tackle them all in this PR. I think running pytest with -W error:::pandas should catch them.

This PR though independently should be a positive change; we will also now fail the npdev build if there are FutureWarnings from numpy

@mroeschke mroeschke added this to the 1.5 milestone Aug 15, 2022
@jreback jreback merged commit d906b33 into pandas-dev:main Aug 17, 2022
@mroeschke mroeschke deleted the ci/npdev/futurewarning branch August 17, 2022 02:12
noatamir pushed a commit to noatamir/pandas that referenced this pull request Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants