7.10.0
Version 7.10.0 — 2025-07-24
- A new configuration option: “[run] patch” specifies named patches to work around some limitations in coverage measurement. These patches are available:
patch = _exit
lets coverage save its data even when https://docs.python.org/3/library/os.html#os._exit is used to abruptly end the process. This closes long-standing issue 310 as well as its duplicates: issue 312, issue 1673, issue 1845, and issue 1941.patch = subprocess
measures coverage in Python subprocesses created with https://docs.python.org/3/library/subprocess.html#module-subprocess, https://docs.python.org/3/library/os.html#os.system, or one of the https://docs.python.org/3/library/os.html#os.execl or https://docs.python.org/3/library/os.html#os.spawnl family of functions. Closes old issue 367 and duplicate issue 378.patch = execv
adjusts the https://docs.python.org/3/library/os.html#os.execl family of functions to save coverage data before ending the current program and starting the next. Not available on Windows. Closes issue 43 after 15 years!
- The HTML report now dimly colors subsequent lines in multi-line statements. They used to have no color. This gives a better indication of the amount of code missing in the report. Closes issue 1308.
- Two new exclusion patterns are part of the defaults:
...
is automatically excluded as a line andif TYPE_CHECKING:
is excluded as a branch. Closes issue 831. - A new command-line option:
--save-signal=USR1
specifies a signal that coverage.py will listen for. When the signal is sent, the coverage data will be saved. This makes it possible to save data from within long-running processes. Thanks, Arkady Gilinsky. - A new configuration option: “[report] partial_also” is a list of regexes to add as pragmas for partial branches. This parallels the “[report] exclude_also” setting for adding line exclusion patterns.
- A few file path configuration settings didn’t allow for tilde expansion: [json] output, [lcov] output and [run] debug_file. This is now fixed.
- Wheels are included for 3.14 now that 3.14 rc1 is available.
- We no longer ship a PyPy-specific wheel. PyPy will install the pure-Python wheel. Closes issue 2001.
- In the very unusual situation of not having a current frame, coverage no longer crashes when using the sysmon core, fixing issue 2005.
➡️ PyPI page: coverage 7.10.0.
➡️ To install: python3 -m pip install coverage==7.10.0