FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[FEA] Remove `FutureWarning`s from Python tests · Issue #10363 · NVIDIA/cudf · GitHub

Repository navigation

[FEA] Remove FutureWarnings from Python tests #10363

Closed

Description

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 run pytest -W error::FutureWarning to catch any deprecated APIs being called by our tests, which may conceal a regression in the user API.

Activity

  1. changed the title [-][FEA] Remove warnings from Python tests[/-] [+][FEA] Remove `FutureWarning`s from Python tests[/+] on Feb 25, 2022
  2. self-assigned this
    on Feb 25, 2022
  3. bdice commented on Mar 12, 2022

    ContributorAuthor

    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 pytest -W error::FutureWarning:cudf.* on the command line. This follows the guidelines for how to specify warning filters as action:message:category:module:line.

    I expected that this would raise an error for any FutureWarning raised by the cudf module or its subpackages, by interpreting the cudf.* module string as a regular expression. However, we can't do this with -W, because the input strings for message and module are escaped and not interpreted as regular expressions when defined with -W or PYTHONWARNINGS. The docs indicate that the module string is always treated as a regular expression, but that is only true for warnings.filterwarnings and not the command line option -W or environment variable PYTHONWARNINGS. This problem in the docs was reported in https://bugs.python.org/issue42272 and fixed in python/cpython#23172.

    The workaround for this is to define this in our pytest configuration, setup.cfg, with the following:

    [tool:pytest]
    filterwarnings = error::FutureWarning:cudf.*

    References:

  4. github-actions commented on Apr 11, 2022

    This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

  5. github-actions commented on Jul 10, 2022

    This issue has been labeled inactive-90d due to no recent activity in the past 90 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed.

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

Metadata

Metadata

Assignees

Labels

PythonAffects Python cuDF API.feature requestNew feature or requestnon-breakingNon-breaking changetestsUnit testing for project

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL