Coverage

Latest version: v7.7.1

Safety actively analyzes 720574 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 12

7.7.1

--------------------------

- A few small tweaks to the sys.monitoring support for Python 3.14. Please
test!


.. _changes_7-7-0:

7.7.0

--------------------------

- The Coverage object has a new method, :meth:`.Coverage.branch_stats` for
getting simple branch information for a module. Closes `issue 1888`_.

- The :class:`Coverage constructor<.Coverage>` now has a ``plugins`` parameter
for passing in plugin objects directly, thanks to `Alex Gaynor <pull
1919_>`_.

- Many constant tests in if statements are now recognized as being optimized
away. For example, previously ``if 13:`` would have been considered a branch
with one path not taken. Now it is understood as always true and no coverage
is missing.

- The experimental sys.monitoring support now works for branch coverage if you
are using Python 3.14.0 alpha 6 or newer. This should reduce the overhead
coverage.py imposes on your test suite. Set the environment variable
``COVERAGE_CORE=sysmon`` to try it out.

- Confirmed support for PyPy 3.11. Thanks Michał Górny.

.. _issue 1888: https://github.com/nedbat/coveragepy/issues/1888
.. _pull 1919: https://github.com/nedbat/coveragepy/pull/1919


.. _changes_7-6-12:

7.6.12

---------------------------

- Fix: some aarch64 distributions were missing (`issue 1927`_). These are now
building reliably.

.. _issue 1927: https://github.com/nedbat/coveragepy/issues/1927

.. _changes_7-6-11:

7.6.11

---------------------------

- Fix: a memory leak in CTracer has been fixed. The details are in `issue
1924`_ and `pytest-dev 676`_. This should reduce the memory footprint for
everyone even if it hadn't caused a problem before.

- We now ship a py3-none-any.whl wheel file. Thanks, `Russell Keith-Magee
<pull 1914_>`_.

.. _pull 1914: https://github.com/nedbat/coveragepy/pull/1914
.. _issue 1924: https://github.com/nedbat/coveragepy/issues/1924
.. _pytest-dev 676: https://github.com/pytest-dev/pytest-cov/issues/676

.. _changes_7-6-10:

7.6.10

---------------------------

- Fix: some descriptions of missing branches in HTML and LCOV reports were
incorrect when multi-line statements were involved (`issue 1874`_ and `issue
1875`_). These are now fixed.

- Fix: Python 3.14 `defers evaluation of annotations <pep649_>`_ by moving them
into separate code objects. That code is rarely executed, so coverage.py
would mark them as missing, as reported in `issue 1908`_. Now they are
ignored by coverage automatically.

- Fixed an obscure and mysterious problem on PyPy 3.10 seemingly involving
mocks, imports, and trace functions: `issue 1902`_. To be honest, I don't
understand the problem or the solution, but ``git bisect`` helped find it,
and now it's fixed.

- Docs: re-wrote the :ref:`subprocess` page to put multiprocessing first and to
highlight the correct use of :class:`multiprocessing.Pool
<python:multiprocessing.pool.Pool>`.

.. _issue 1874: https://github.com/nedbat/coveragepy/issues/1874
.. _issue 1875: https://github.com/nedbat/coveragepy/issues/1875
.. _issue 1902: https://github.com/nedbat/coveragepy/issues/1902
.. _issue 1908: https://github.com/nedbat/coveragepy/issues/1908
.. _pep649: https://docs.python.org/3.14/whatsnew/3.14.html#pep-649-deferred-evaluation-of-annotations


.. _changes_7-6-9:

7.6.9

--------------------------

- Fix: `Tomas Uribe fixed <pull 1901_>`_ a performance problem in the XML
report. Large code bases should produce XML reports much faster now.

.. _pull 1901: https://github.com/nedbat/coveragepy/pull/1901


.. _changes_7-6-8:

Page 1 of 12

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.