pypi coverage 7.0.0b1

latest releases: 7.6.4, 7.6.3, 7.6.2...
23 months ago

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.
  • 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 match foo/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.
  • 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.
  • 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

Don't miss a new coverage release

NewReleases is sending notifications on new releases.