Sourced from pytest-cov's changelog.
6.2.0 (2025-06-11)
The plugin now adds 3 rules in the filter warnings configuration to prevent common coverage warnings being raised as obscure errors::
default:unclosed database in <sqlite3.Connection object at:ResourceWarning once::PytestCovWarning once::CoverageWarning
This fixes most of the bad interactions that are occurring on pytest 8.4 with
filterwarnings=error.The plugin will check if there already matching rules for the 3 categories (
ResourceWarning,PytestCovWarning,CoverageWarning) and message (unclosed database in <sqlite3.Connection object at) before adding the filters.This means you can have this in your pytest configuration for complete oblivion (not recommended, if that is not clear)::
filterwarnings = [ "error", "ignore:unclosed database in <sqlite3.Connection object at:ResourceWarning", "ignore::PytestCovWarning", "ignore::CoverageWarning", ]
dca5723
Bump version: 6.1.1 → 6.2.0f69166a
Also trigger the sqlite warning.9dabad3
Do not mess with the warnings if the plugin is disabled. Also, upgrade
to new...222e991
Do some checks before adding the filters to allow users to silence these
warn...ddc162b
Update changelog.22cc4e7
Bump.5f6d020
Add some basic warnings configuration overrides for the common
offenders. Sho...d2a2557
Add latest xdist.cc06ea3
Make this pass for now.b221fb1
Add reproducer for #693.