Python module that measures code coverage during Python execution.
2025-12-29 12:43:22 by Adam Ciarcinski | Files touched by this commit (2) |  |
Log message:
py-coverage: updated to 7.13.1
Version 7.13.1 — 2025-12-28
- Added: the JSON report now includes a ``"start_line"`` key for \
function and
class regions, indicating the first line of the region in the source. Closes
`issue 2110`_.
- Added: The ``debug data`` command now takes file names as arguments on the
command line, so you can inspect specific data files without needing to set
the ``COVERAGE_FILE`` environment variable.
- Fix: the JSON report used to report module docstrings as executed lines,
which no other report did, as described in `issue 2105`_. This is now fixed,
thanks to Jianrong Zhao.
- Fix: coverage.py uses a more disciplined approach to detecting where
third-party code is installed, and avoids measuring it. This shouldn't change
any behavior. If you find that it does, please get in touch.
- Performance: data files that will be combined now record their hash as part
of the file name. This lets us skip duplicate data more quickly, speeding the
combining step.
- Docs: added a section explaining more about what is considered a missing
branch and how it is reported: :ref:`branch_explain`, as requested in `issue
1597`_. Thanks to `Ayisha Mohammed <pull 2092_>`_.
- Tests: the test suite misunderstood what core was being tested if
``COVERAGE_CORE`` wasn't set on 3.14+. This is now fixed, closing `issue
2109`_.
|
2025-12-14 10:29:14 by Adam Ciarcinski | Files touched by this commit (3) |  |
Log message:
py-coverage: updated to 7.13.0
Version 7.13.0 — 2025-12-08
- Feature: coverage.py now supports :file:`.coveragerc.toml` configuration
files. These files use TOML syntax and take priority over
:file:`pyproject.toml` but lower priority than :file:`.coveragerc` files.
Closes `issue 1643`_ thanks to `Olena Yefymenko <pull 1952_>`_.
- Fix: we now include a permanent .pth file which is installed with the code,
fixing `issue 2084`_. In 7.12.1b1 this was done incorrectly: it didn't work
when using the source wheel (``py3-none-any``). This is now fixed. Thanks,
`Henry Schreiner <pull 2100_>`_.
- Deprecated: when coverage.py is installed, it creates three command entry
points: ``coverage``, ``coverage3``, and ``coverage-3.10`` (if installed for
Python 3.10). The second and third of these are not needed and will
eventually be removed. They still work for now, but print a message about
their deprecation.
|
2025-11-18 17:33:21 by Adam Ciarcinski | Files touched by this commit (2) |  |
Log message:
py-coverage: updated to 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 <issue 2081_>`_ and the `implementation
<pull 2085_>`_.
- The JSON report now includes separate coverage totals for statements and
branches, thanks to `Ryuta Otsuka <pull 2090_>`_.
- 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.
|
2025-11-10 12:42:15 by Adam Ciarcinski | Files touched by this commit (2) |  |
Log message:
py-coverage: updated to 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.
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 ``NotPython`` exception 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.
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=core`` shows which core is in use and why.
- Split ``sqlite`` debugging information out of the ``sys`` :ref:`coverage
debug <cmd_debug>` and :ref:`cmd_run_debug` options since it's bulky and not
very useful.
- Updated the :ref:`howitworks` page to better describe the three different
measurement cores.
|
2025-10-23 17:15:54 by Adam Ciarcinski | Files touched by this commit (2) |  |
Log message:
py-coverage: updated to 7.11.0
Version 7.11.0 — 2025-10-15
- Dropped support for Python 3.9, declared support for Python 3.15 alpha.
|
2025-09-22 11:44:19 by Adam Ciarcinski | Files touched by this commit (2) |  |
Log message:
py-coverage: updated to 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`_.
|
2025-09-02 14:48:04 by Adam Ciarcinski | Files touched by this commit (2) |  |
Log message:
py-coverage: updated to 7.10.6
Version 7.10.6 — 2025-08-29
- Fix: ``source`` directories 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 <pull 2038_>`_ the speed of
combination, especially with many contexts.
|
2025-08-25 11:41:08 by Adam Ciarcinski | Files touched by this commit (2) |  |
Log message:
py-coverage: updated to 7.10.5
7.10.5
- Big speed improvements for ``coverage combine``: it's now about twice as
fast!
|