-
Notifications
You must be signed in to change notification settings - Fork 922
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
[FEA] Remove FutureWarning
s from Python tests
#10363
Comments
FutureWarning
s from Python tests
…unaops. (#10402) Fixes or catches a few `FutureWarning`s in Python test files. Part of #10363. (I am working through one test file at a time so we can enable `-Werr` in the future.) Authors: - Bradley Dice (https://github.com/bdice) Approvers: - GALI PREM SAGAR (https://github.com/galipremsagar) URL: #10402
Fixes or catches warnings in `test_rolling.py`. Part of #10363. (I am working through one test file at a time so we can enable `-Werr` in the future.) Authors: - Bradley Dice (https://github.com/bdice) Approvers: - GALI PREM SAGAR (https://github.com/galipremsagar) URL: #10405
Resolves part of #10363, there still are some warnings remaining, which I tried to resolve and went down a rabbit hole of a bug inside pyarrow<->pandas conversions so will take it up later. Authors: - GALI PREM SAGAR (https://github.com/galipremsagar) - Bradley Dice (https://github.com/bdice) Approvers: - Bradley Dice (https://github.com/bdice) URL: #10416
Partially addresses #10363, by removing all warnings from `test_timedelta.py`. Authors: - GALI PREM SAGAR (https://github.com/galipremsagar) Approvers: - Bradley Dice (https://github.com/bdice) URL: #10418
I traced down some unexpected behavior and it turns out to be an error in the Python docs. This comment explains what I found, for posterity/reference. cc: @galipremsagar I tried to specify a warning filter I expected that this would raise an error for any The workaround for this is to define this in our pytest configuration, [tool:pytest]
filterwarnings = error::FutureWarning:cudf.* References: |
This issue has been labeled |
This issue has been labeled |
Contributes to #9999 and #10363. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Ashwin Srinath (https://github.com/shwina) URL: #12293
Contributes to #9999 and #10363. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Michael Wang (https://github.com/isVoid) URL: #12305
Contributes to #9999 and #10363. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - https://github.com/brandon-b-miller - Matthew Roeschke (https://github.com/mroeschke) URL: #12304
Contributes to #9999 and #10363. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Ashwin Srinath (https://github.com/shwina) URL: #12310
Contributes to #9999 and #10363. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - GALI PREM SAGAR (https://github.com/galipremsagar) - Lawrence Mitchell (https://github.com/wence-) URL: #12326
Contributes to #9999 and #10363. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Bradley Dice (https://github.com/bdice) URL: #12313
Contributes to #9999 and #10363. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Bradley Dice (https://github.com/bdice) URL: #12324
One note with these deprecations. pandas has a special value used for parameters that are defaulted, and as a result explicitly passing None will throw a warning. We don't do this, hence the difference in the warnings contexts I use for our calls vs pandas (`pytest.warns` vs `expect_warning_if`). I didn't feel like this was worth commenting on in every place, but I can if reviewers want. Contributes to #9999 and #10363. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Bradley Dice (https://github.com/bdice) URL: #12334
I realized that my previous warning reduction PRs were causing some circular work where I would add a new warning to cudf to match pandas, which would cause those new warnings to appear in modules that I had previously declared free of warnings. To prevent this, I've changed my approach to instead go through the test modules in alphabetical order and ensure that they are all error free up to that point. This PR removes warnings from all test modules up to test_dataframe.py. Contributes to #9999 and #10363. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Bradley Dice (https://github.com/bdice) URL: #12355
Contributes to #9999 and #10363. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Matthew Roeschke (https://github.com/mroeschke) URL: #12381
Contributes to #9999 and #10363. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Matthew Roeschke (https://github.com/mroeschke) - Ashwin Srinath (https://github.com/shwina) URL: #12369
Contributes to #9999 and #10363. When I merge these changes with #12369 I no longer see any warnings on my machine. I suspect that there will be slightly different results on different machines, so we'll see have to see how CI looks after both PRs are merged before we close #10363. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Matthew Roeschke (https://github.com/mroeschke) - Bradley Dice (https://github.com/bdice) URL: #12406
This is a meta-issue as part of #9999. Here, I catalog the current list of test files that raise a
FutureWarning
.The use of a
FutureWarning
indicates a deprecated API, mostly from cudf or pandas. We should explicitly catch or filter out these warnings, depending on the circumstances. Eventually we will be able to runpytest -W error::FutureWarning
to catch any deprecated APIs being called by our tests, which may conceal a regression in the user API.test_csv.py
Fix warnings in test_csv.py. #10362test_cuda_apply.py
Fix warnings in test_cuda_apply, test_numerical, test_pickling, test_unaops. #10402test_dataframe.py
test_groupby.py
test_index.py
test_indexing.py
Fix warnings in test_indexing.py #12305test_joining.py
Fix warnings in test_joining.py #12304test_multiindex.py
Fix warnings in test_multiindex.py #12310test_numerical.py
Fix warnings in test_cuda_apply, test_numerical, test_pickling, test_unaops. #10402test_orc.py
test_parquet.py
(partial) [REVIEW] Fix some warnings intest_parquet.py
#10416test_pickling.py
Fix warnings in test_cuda_apply, test_numerical, test_pickling, test_unaops. #10402test_rolling.py
Fix warnings intest_rolling
#10405test_stats.py
Fix warnings in test_stats.py #12293test_timedelta.py
[REVIEW] Remove warnings intest_timedelta.py
#10418test_unaops.py
Fix warnings in test_cuda_apply, test_numerical, test_pickling, test_unaops. #10402FutureWarning
:pytest -W error::FutureWarning
The text was updated successfully, but these errors were encountered: