Releases: nedbat/coveragepy
7.0.0
Version 7.0.0 — 2022-12-18
Nothing new beyond 7.0.0b1.
➡️ PyPI page: coverage 7.0.0.
➡️ To install: python3 -m pip install coverage==7.0.0
7.0.0b1
Version 7.0.0b1 — 2022-12-03
A number of changes have been made to file path handling, including pattern matching and path remapping with the [paths]
setting (see [paths]). These changes might affect you, and require you to update your settings.
(This release includes the changes from 6.6.0b1, since 6.6.0 was never released.)
- Changes to file pattern matching, which might require updating your configuration:
- Previously,
*
would incorrectly match directory separators, making precise matching difficult. This is now fixed, closing issue 1407. - Now
**
matches any number of nested directories, including none.
- Previously,
- Improvements to combining data files when using the [run] relative_files setting, which might require updating your configuration:
- During
coverage combine
, relative file paths are implicitly combined without needing a[paths]
configuration setting. This also fixed issue 991. - A
[paths]
setting like*/foo
will now matchfoo/bar.py
so that relative file paths can be combined more easily. - The [run] relative_files setting is properly interpreted in more places, fixing issue 1280.
- During
- When remapping file paths with
[paths]
, a path will be remapped only if the resulting path exists. The documentation has long said the prefix had to exist, but it was never enforced. This fixes issue 608, improves issue 649, and closes issue 757. - Reporting operations now implicitly use the
[paths]
setting to remap file paths within a single data file. Combining multiple files still requires thecoverage combine
step, but this simplifies some single-file situations. Closes issue 1212 and issue 713. - The
coverage report
command now has a--format=
option. The original style is now--format=text
, and is the default.- Using
--format=markdown
will write the table in Markdown format, thanks to Steve Oswald, closing issue 1418. - Using
--format=total
will write a single total number to the output. This can be useful for making badges or writing status updates.
- Using
- Combining data files with
coverage combine
now hashes the data files to skip files that add no new information. This can reduce the time needed. Many details affect the speed-up, but for coverage.py’s own test suite, combining is about 40% faster. Closes issue 1483. - When searching for completely un-executed files, coverage.py uses the presence of
__init__.py
files to determine which directories have source that could have been imported. However, implicit namespace packages don’t require__init__.py
. A new setting[report] include_namespace_packages
tells coverage.py to consider these directories during reporting. Thanks to Felix Horvat for the contribution. Closes issue 1383 and issue 1024. - Fixed environment variable expansion in pyproject.toml files. It was overly broad, causing errors outside of coverage.py settings, as described in issue 1481 and issue 1345. This is now fixed, but in rare cases will require changing your pyproject.toml to quote non-string values that use environment substitution.
- An empty file has a coverage total of 100%, but used to fail with
--fail-under
. This has been fixed, closing issue 1470. - The text report table no longer writes out two separator lines if there are no files listed in the table. One is plenty.
- Fixed a mis-measurement of a strange use of wildcard alternatives in match/case statements, closing issue 1421.
- Fixed internal logic that prevented coverage.py from running on implementations other than CPython or PyPy (issue 1474).
- The deprecated
[run] note
setting has been completely removed.
➡️ PyPI page: coverage 7.0.0b1.
➡️ To install: python3 -m pip install coverage==7.0.0b1
6.6.0b1
Version 6.6.0b1 — 2022-10-31
(Note: 6.6.0 final was never released. These changes are part of 7.0.0b1.)
- Changes to file pattern matching, which might require updating your configuration:
- Previously,
*
would incorrectly match directory separators, making precise matching difficult. This is now fixed, closing issue 1407. - Now
**
matches any number of nested directories, including none.
- Previously,
- Improvements to combining data files when using the [run] relative_files setting:
- During
coverage combine
, relative file paths are implicitly combined without needing a[paths]
configuration setting. This also fixed issue 991. - A
[paths]
setting like*/foo
will now matchfoo/bar.py
so that relative file paths can be combined more easily. - The setting is properly interpreted in more places, fixing issue 1280.
- During
- Fixed environment variable expansion in pyproject.toml files. It was overly broad, causing errors outside of coverage.py settings, as described in issue 1481 and issue 1345. This is now fixed, but in rare cases will require changing your pyproject.toml to quote non-string values that use environment substitution.
- Fixed internal logic that prevented coverage.py from running on implementations other than CPython or PyPy (issue 1474).
➡️ PyPI page: coverage 6.6.0b1.
➡️ To install: python3 -m pip install coverage==6.6.0b1
6.5.0
Version 6.5.0 — 2022-09-29
- The JSON report now includes details of which branches were taken, and which are missing for each file. Thanks, Christoph Blessing. Closes issue 1425.
- Starting with coverage.py 6.2,
class
statements were marked as a branch. This wasn’t right, and has been reverted, fixing issue 1449. Note this will very slightly reduce your coverage total if you are measuring branch coverage. - Packaging is now compliant with PEP 517, closing issue 1395.
- A new debug option
--debug=pathmap
shows details of the remapping of paths that happens during combine due to the[paths]
setting. - Fix an internal problem with caching of invalid Python parsing. Found by OSS-Fuzz, fixing their bug 50381.
➡️ PyPI page: coverage 6.5.0.
➡️ To install: python3 -m pip install coverage==6.5.0
6.4.4
Version 6.4.4 — 2022-08-16
- Wheels are now provided for Python 3.11.
➡️ PyPI page: coverage 6.4.4.
➡️ To install: python3 -m pip install coverage==6.4.4
6.4.3
Version 6.4.3 — 2022-08-06
- Fix a failure when combining data files if the file names contained glob-like patterns. Thanks, Michael Krebs and Benjamin Schubert.
- Fix a messaging failure when combining Windows data files on a different drive than the current directory, closing issue 1428. Thanks, Lorenzo Micò.
- Fix path calculations when running in the root directory, as you might do in a Docker container. Thanks Arthur Rio.
- Filtering in the HTML report wouldn’t work when reloading the index page. This is now fixed. Thanks, Marc Legendre.
- Fix a problem with Cython code measurement, closing issue 972. Thanks, Matus Valo.
➡️ PyPI page: coverage 6.4.3.
➡️ To install: python3 -m pip install coverage==6.4.3
6.4.2
Version 6.4.2 — 2022-07-12
- Updated for a small change in Python 3.11.0 beta 4: modules now start with a line with line number 0, which is ignored. This line cannot be executed, so coverage totals were thrown off. This line is now ignored by coverage.py, but this also means that truly empty modules (like
__init__.py
) have no lines in them, rather than one phantom line. Fixes issue 1419. - Internal debugging data added to sys.modules is now an actual module, to avoid confusing code that examines everything in sys.modules. Thanks, Yilei Yang.
➡️ PyPI page: coverage 6.4.2.
➡️ To install: python3 -m pip install coverage==6.4.2
6.4.1
Version 6.4.1 — 2022-06-02
- Greatly improved performance on PyPy, and other environments that need the pure Python trace function. Thanks, Carl Friedrich Bolz-Tereick (pull 1381 and pull 1388). Slightly improved performance when using the C trace function, as most environments do. Closes issue 1339.
- The conditions for using tomllib from the standard library have been made more precise, so that 3.11 alphas will continue to work. Closes issue 1390.
➡️ PyPI page: coverage 6.4.1.
➡️ To install: python3 -m pip install coverage==6.4.1
6.4
Version 6.4 — 2022-05-22
- A new setting, [run] sigterm, controls whether a SIGTERM signal handler is used. In 6.3, the signal handler was always installed, to capture data at unusual process ends. Unfortunately, this introduced other problems (see issue 1310). Now the signal handler is only used if you opt-in by setting
[run] sigterm = true
. - Small changes to the HTML report:
- Added links to next and previous file, and more keyboard shortcuts:
[
and]
for next file and previous file;u
for up to the index; and?
to open/close the help panel. Thanks, J. M. F. Tsang. - The time stamp and version are displayed at the top of the report. Thanks, Ammar Askar. Closes issue 1351.
- Added links to next and previous file, and more keyboard shortcuts:
- A new debug option
debug=sqldata
adds more detail todebug=sql
, logging all the data being written to the database. - Previously, running
coverage report
(or any of the reporting commands) in an empty directory would create a .coverage data file. Now they do not, fixing issue 1328. - On Python 3.11, the
[toml]
extra no longer installs tomli, instead using tomllib from the standard library. Thanks Shantanu. - In-memory CoverageData objects now properly update(), closing issue 1323.
➡️ PyPI page: coverage 6.4.
➡️ To install: python3 -m pip install coverage==6.4
6.3.3
Version 6.3.3 — 2022-05-12
- Fix: Coverage.py now builds successfully on CPython 3.11 (3.11.0b1) again. Closes issue 1367. Some results for generators may have changed.
➡️ PyPI page: coverage 6.3.3.
➡️ To install: python3 -m pip install coverage==6.3.3