pypi / coverage
coverage
What changed in coverage 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
1 breaking1 behavior and defaults10 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initcoverage 712 changes
Breaking changes 1
When combining files, path separator slashes are converted to the local file system style, reducing the need for [paths] configuration across operating systems.
Behavior and default changes 1
With
dynamic_context = test_function, staticmethod and classmethod test methods receive a context of their own on Python 3.11 and later.
Fixes and other changes 10
On Python 3.14 and later, a for loop immediately before a function return no longer mistakenly reports an uncovered branch.
On Python 3.14 and later, the else clause of a try whose body is a with statement is no longer incorrectly reported as covered when the with raises.
Calling CoverageData.update() twice on an in-memory database no longer fails.
When an irrefutable case body is entirely excluded, the case line is now excluded too, so it is no longer reported as missing.
An invalid regex now raises a proper configuration error naming the bad regex instead of a confusing data-file error.
Annotated copies now preserve the original extension, avoiding an AssertionError for measured files with extensions other than .py.
Each named concurrency library is considered when refusing run-affecting options that cannot reach subprocesses.
A [paths] pattern is now replaced only once, in the leading portion of a file path.
Negative precision settings now produce useful error messages.
Non-string values in TOML settings now produce helpful error messages instead of tracebacks, including list settings, file settings, and values in [paths].