Skip to content
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

🧪 Make pytest notify us about future warnings #15620

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from

Commits on Nov 7, 2024

  1. 🧪 Make pytest notify us about future warnings

    In essence, this configures Python to turn any warnings emitted in
    runtime into errors[[1]]. This is the best practice that allows
    reacting to future deprecation announcements that are coming from the
    dependencies (direct, or transitive, or even CPython itself)[[2]].
    
    The typical workflow looks like this:
    
      1. If a dependency is updated an a warning is hit in tests, the
         deprecated thing should be replaced with newer APIs.
    
      2. If a dependency is transitive or we have no control over it
         otherwise, the specific warning and a regex matching its message,
         plus the module reference (where possible) can be added to the
         list of temporary ignores in `pytest.ini`.
    
      3. The list of temporary ignores should be reevaluated periodically,
         including when dependency re-pinning in lockfile is happening.
    
    [1]: https://docs.python.org/3/using/cmdline.html#cmdoption-W
    [2]: https://pytest-with-eric.com/configuration/pytest-ignore-warnings/
    webknjaz committed Nov 7, 2024
    Configuration menu
    Copy the full SHA
    912a056 View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2024

  1. Address unclosed fd warnings

    AlanCoding authored and webknjaz committed Nov 11, 2024
    Configuration menu
    Copy the full SHA
    9cf4af5 View commit details
    Browse the repository at this point in the history