Releases: coveragepy/coveragepy
7.12.0
Version 7.12.0 — 2025-11-18
- The HTML report now shows separate coverage totals for statements and branches, as well as the usual combined coverage percentage. Thanks to Ryuta Otsuka for the discussion and the implementation.
- The JSON report now includes separate coverage totals for statements and branches, thanks to Ryuta Otsuka.
- Fix:
except*clauses were not handled properly under the “sysmon” measurement core, causing KeyError exceptions as described in issue 2086. This is now fixed. - Fix: we now defend against aggressive mocking of
open()that could cause errors inside coverage.py. An example of a failure is in issue 2083. - Fix: in unusual cases where a test suite intentionally exhausts the system’s file descriptors to test handling errors in
open(), coverage.py would fail when trying to open source files, as described in issue 2091. This is now fixed. - A small tweak to the HTML report: file paths now use thin spaces around slashes to make them easier to read.
➡️ PyPI page: coverage 7.12.0.
➡️ To install: python3 -m pip install coverage==7.12.0
7.11.3
Version 7.11.3 — 2025-11-09
-
Fix: the 7.11.1 changes meant that conflicts between a requested measurement core and other settings would raise an error. This was a breaking change from previous behavior, as reported in issue 2076 and issue 2078.
The previous behavior has been restored: when the requested core conflicts with other settings, another core is used instead, and a warning is issued.
-
For contributors: the repo has moved from Ned’s nedbat GitHub account to the coveragepy GitHub organization. The default branch has changed from master to main.
➡️ PyPI page: coverage 7.11.3.
➡️ To install: python3 -m pip install coverage==7.11.3
7.11.2
Version 7.11.2 — 2025-11-08
- Fix: using the “sysmon” measurement core in 7.11.1, if Python code was claimed to come from a non-Python file, a
NotPythonexception could be raised. This could happen for example with Jinja templates compiled to Python, as reported in issue 2077. This is now fixed. - Doc: corrected the first entry in the 7.11.1 changelog.
➡️ PyPI page: coverage 7.11.2.
➡️ To install: python3 -m pip install coverage==7.11.2
7.11.1
Version 7.11.1 — 2025-11-07
- Fix: some chanages to details of how the measurement core is chosen, and how conflicting settings are handled. The “sysmon” core cannot be used with some conurrency settings, with dynamic context, and in Python 3.12/3.13, with branch measurement.
- If the core is not specified and defaults to “sysmon” (Python 3.14+), but other settings conflict with sysmon, then the “ctrace” core will be used instead with no warning. For concurrency conflicts, this used to produce an error, as described in issue 2064.
- If the “sysmon” core is explicitly requested in your configuration, but other settings conflict, an error is now raised. This used to produce a warning.
- Fix: some multi-line case clauses or for loops (and probably other constructs) could cause incorrect claims of missing branches with the sys.monitoring core, as described in issue 2070. This is now fixed.
- Fix: when running in pytest under coverage, a
breakpoint()would stop in the wrong frame, one level down from where it should, as described in issue 1420. This was due to a coverage change in v6.4.1 that seemed to give a slight performance improvement, but I couldn’t reproduce the performance gain, so it’s been reverted, fixing the debugger problem. - A new debug option
--debug=coreshows which core is in use and why. - Split
sqlitedebugging information out of thesyscoverage debug and --debug option options since it’s bulky and not very useful. - Updated the How coverage.py works page to better describe the three different measurement cores.
➡️ PyPI page: coverage 7.11.1.
➡️ To install: python3 -m pip install coverage==7.11.1
7.11.0
Version 7.11.0 — 2025-10-15
- Dropped support for Python 3.9, declared support for Python 3.15 alpha.
➡️ PyPI page: coverage 7.11.0.
➡️ To install: python3 -m pip install coverage==7.11.0
7.10.7
Version 7.10.7 — 2025-09-21
- Performance: with branch coverage in large files, generating HTML, JSON, or LCOV reports could take far too long due to some quadratic behavior when creating the function and class index pages. This is now fixed, closing issue 2048. Thanks to Daniel Diniz for help diagnosing the problem.
- Most warnings and a few errors now have links to a page in the docs explaining the specific message. Closes issue 1921.
➡️ PyPI page: coverage 7.10.7.
➡️ To install: python3 -m pip install coverage==7.10.7
7.10.6
Version 7.10.6 — 2025-08-29
- Fix:
sourcedirectories were not properly communicated to subprocesses that ran in different directories, as reported in issue 1499. This is now fixed. - Performance: Alex Gaynor continues fine-tuning the speed of combination, especially with many contexts.
➡️ PyPI page: coverage 7.10.6.
➡️ To install: python3 -m pip install coverage==7.10.6
7.10.5
7.10.4
Version 7.10.4 — 2025-08-16
- Added
patch = forkfor times when the built-in forking support is insufficient. - Fix:
patch = execvalso inherits the entire coverage configuration now.
➡️ PyPI page: coverage 7.10.4.
➡️ To install: python3 -m pip install coverage==7.10.4
7.10.3
Version 7.10.3 — 2025-08-10
- Fixes for
patch = subprocess:- If subprocesses spawned yet more subprocesses simultaneously, some coverage could be missed. This is now fixed, closing issue 2024.
- If subprocesses were created in other directories, their data files were stranded there and not combined into the totals, as described in issue 2025. This is now fixed.
- On Windows (or maybe only some Windows?) the patch would fail with a
ModuleNotFounderror trying to import coverage. This is now fixed, closing issue 2022. - Originally only options set in the coverage configuration file would apply to subprocesses. Options set on the
coverage runcommand line (such as--branch) wouldn’t be communicated to the subprocesses. This could lead to combining failures, as described in issue 2021. Now the entire configuration is used in subprocesses, regardless of its origin. - Added
debug=patchto help diagnose problems.
- Fix: really close all SQLite databases, even in-memory ones. Closes issue 2017.
➡️ PyPI page: coverage 7.10.3.
➡️ To install: python3 -m pip install coverage==7.10.3