Skip to content

Releases: nedbat/coveragepy

7.1.0

25 Jan 01:26
7.1.0
32fd81e
Compare
Choose a tag to compare
  • Added: the debug output file can now be specified with [run] debug_file in the configuration file. Closes issue 1319.
  • Performance: fixed a slowdown with dynamic contexts that's been around since 6.4.3. The fix closes issue 1538. Thankfully this doesn't break the Cython change that fixed issue 972. Thanks to Mathieu Kniewallner for the deep investigative work and comprehensive issue report.
  • Typing: all product and test code has type annotations.

➡️  PyPI page: coverage 7.1.0.
➡️  To install: python3 -m pip install coverage==7.1.0

7.0.5

11 Jan 00:03
7.0.5
97642c8
Compare
Choose a tag to compare
  • Fix: On Python 3.7, a file with type annotations but no from __future__ import annotations would be missing statements in the coverage report. This is now fixed, closing issue 1524.

➡️  PyPI page: coverage 7.0.5.
➡️  To install: python3 -m pip install coverage==7.0.5

7.0.4

07 Jan 21:58
7.0.4
f4c27c7
Compare
Choose a tag to compare
  • Performance: an internal cache of file names was accidentally disabled, resulting in sometimes drastic reductions in performance. This is now fixed, closing issue 1527. Thanks to Ivan Ciuvalschii for the reproducible test case.

➡️  PyPI page: coverage 7.0.4.
➡️  To install: python3 -m pip install coverage==7.0.4

7.0.3

04 Jan 00:17
7.0.3
2ff9098
Compare
Choose a tag to compare
  • Fix: when using pytest-cov or pytest-xdist, or perhaps both, the combining step could fail with assert row is not None using 7.0.2. This was due to a race condition that has always been possible and is still possible. In 7.0.1 and before, the error was silently swallowed by the combining code. Now it will produce a message "Couldn't combine data file" and ignore the data file as it used to do before 7.0.2. Closes issue 1522.

➡️  PyPI page: coverage 7.0.3.
➡️  To install: python3 -m pip install coverage==7.0.3

7.0.2

02 Jan 19:01
7.0.2
2f731e2
Compare
Choose a tag to compare
  • Fix: when using the [run] relative_files = True setting, a relative [paths] pattern was still being made absolute. This is now fixed, closing issue 1519.
  • Fix: if Python doesn't provide tomllib, then TOML configuration files can only be read if coverage.py is installed with the [toml] extra. Coverage.py will raise an error if TOML support is not installed when it sees your settings are in a .toml file. But it didn't understand that [tools.coverage] was a valid section header, so the error wasn't reported if you used that header, and settings were silently ignored. This is now fixed, closing issue 1516.
  • Fix: adjusted how decorators are traced on PyPy 7.3.10, fixing issue 1515.
  • Fix: the coverage lcov report did not properly implement the --fail-under=MIN option. This has been fixed.
  • Refactor: added many type annotations, including a number of refactorings. This should not affect outward behavior, but they were a bit invasive in some places, so keep your eyes peeled for oddities.
  • Refactor: removed the vestigial and long untested support for Jython and IronPython.

➡️  PyPI page: coverage 7.0.2.
➡️  To install: python3 -m pip install coverage==7.0.2

7.0.1

23 Dec 23:20
7.0.1
c5cda3a
Compare
Choose a tag to compare
  • When checking if a file mapping resolved to a file that exists, we weren't considering files in .whl files. This is now fixed, closing issue 1511.
  • File pattern rules were too strict, forbidding plus signs and curly braces in directory and file names. This is now fixed, closing issue 1513.
  • Unusual Unicode or control characters in source files could prevent reporting. This is now fixed, closing issue 1512.
  • The PyPy wheel now installs on PyPy 3.7, 3.8, and 3.9, closing issue 1510.

➡️  PyPI page: coverage 7.0.1.
➡️  To install: python3 -m pip install coverage==7.0.1

7.0.0

18 Dec 21:35
7.0.0
df3f2bf
Compare
Choose a tag to compare

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

03 Dec 18:18
7.0.0b1
f09e389
Compare
Choose a tag to compare
7.0.0b1 Pre-release
Pre-release

A number of changes have been made to file path handling, including pattern matching and path remapping with the [paths] setting (see config_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.
  • Improvements to combining data files when using the config_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 match foo/bar.py so that relative file paths can be combined more easily.
    • The config_run_relative_files setting is properly interpreted in more places, fixing issue 1280.
  • 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 the coverage 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.
  • 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

31 Oct 11:11
6.6.0b1
64559a0
Compare
Choose a tag to compare
6.6.0b1 Pre-release
Pre-release

(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.
  • Improvements to combining data files when using the config_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 match foo/bar.py so that relative file paths can be combined more easily.
    • The setting is properly interpreted in more places, fixing issue 1280.
  • 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

30 Sep 10:11
Compare
Choose a tag to compare
  • 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