Releases: nedbat/coveragepy
4.5.4
6.0
Version 6.0 — 2021-10-03
- The
coverage html
command now prints a message indicating where the HTML report was written. Fixes issue 1195. - The
coverage combine
command now prints messages indicating each data file being combined. Fixes issue 1105. - The HTML report now includes a sentence about skipped files due to
skip_covered
orskip_empty
settings. Fixes issue 1163. - Unrecognized options in the configuration file are no longer errors. They are now warnings, to ease the use of coverage across versions. Fixes issue 1035.
- Fix handling of exceptions through context managers in Python 3.10. A missing exception is no longer considered a missing branch from the with statement. Fixes issue 1205.
- Fix another rarer instance of “Error binding parameter 0 - probably unsupported type.” (issue 1010).
- Creating a directory for the coverage data file now is safer against conflicts when two coverage runs happen simultaneously (pull 1220). Thanks, Clément Pit-Claudel.
➡️ PyPI page: coverage 6.0.
➡️ To install: python3 -m pip install coverage==6.0
6.0b1
Version 6.0b1 — 2021-07-18
- Dropped support for Python 2.7, PyPy 2, and Python 3.5.
- Added support for the Python 3.10
match/case
syntax. - Data collection is now thread-safe. There may have been rare instances of exceptions raised in multi-threaded programs.
- Plugins (like the Django coverage plugin) were generating “Already imported a file that will be measured” warnings about Django itself. These have been fixed, closing issue 1150.
- Warnings generated by coverage.py are now real Python warnings.
- Using
--fail-under=100
with coverage near 100% could result in the self-contradictory messagetotal of 100 is less than fail-under=100
. This bug (issue 1168) is now fixed. - The
COVERAGE_DEBUG_FILE
environment variable now acceptsstdout
andstderr
to write to those destinations. - TOML parsing now uses the tomli library.
- Some minor changes to usually invisible details of the HTML report:
- Use a modern hash algorithm when fingerprinting, for high-security environments (issue 1189). When generating the HTML report, we save the hash of the data, to avoid regenerating an unchanged HTML page. We used to use MD5 to generate the hash, and now use SHA-3-256. This was never a security concern, but security scanners would notice the MD5 algorithm and raise a false alarm.
- Change how report file names are generated, to avoid leading underscores (issue 1167), to avoid rare file name collisions (issue 584), and to avoid file names becoming too long (issue 580).
➡️ PyPI page: coverage 6.0b1.
➡️ To install: python3 -m pip install coverage==6.0b1
5.6b1
Version 5.6b1 — 2021-04-13
Note: 5.6 final was never released. These changes are part of 6.0.
- Third-party packages are now ignored in coverage reporting. This solves a few problems:
- The HTML report uses j/k to move up and down among the highlighted chunks of code. They used to highlight the current chunk, but 5.0 broke that behavior. Now the highlighting is working again.
- The JSON report now includes
percent_covered_display
, a string with the total percentage, rounded to the same number of decimal places as the other reports’ totals.
➡️ PyPI page: coverage 5.6b1.
➡️ To install: python3 -m pip install coverage==5.6b1
5.4
Version 5.4 — 2021-01-24
- The text report produced by
coverage report
now always outputs a TOTAL line, even if only one Python file is reported. This makes regex parsing of the output easier. Thanks, Judson Neer. This had been requested a number of times (issue 1086, issue 922, issue 732). - The
skip_covered
andskip_empty
settings in the configuration file can now be specified in the[html]
section, so that text reports and HTML reports can use separate settings. The HTML report will still use the[report]
settings if there isn’t a value in the[html]
section. Closes issue 1090. - Combining files on Windows across drives now works properly, fixing issue 577. Thanks, Valentin Lab.
- Fix an obscure warning from deep in the _decimal module, as reported in issue 1084.
- Update to support Python 3.10 alphas in progress, including PEP 626: Precise line numbers for debugging and other tools.
➡️ PyPI page: coverage 5.4.
➡️ To install: python3 -m pip install coverage==5.4
5.3.1
Version 5.3.1 — 2020-12-19
- When using
--source
on a large source tree, v5.x was slower than previous versions. This performance regression is now fixed, closing issue 1037. - Mysterious SQLite errors can happen on PyPy, as reported in issue 1010. An immediate retry seems to fix the problem, although it is an unsatisfying solution.
- The HTML report now saves the sort order in a more widely supported way, fixing issue 986. Thanks, Sebastián Ramírez (pull request 1066).
- The HTML report pages now have a Sleepy Snake favicon.
- Wheels are now provided for manylinux2010, and for PyPy3 (pp36 and pp37).
- Continuous integration has moved from Travis and AppVeyor to GitHub Actions.
➡️ PyPI page: coverage 5.3.1.
➡️ To install: python3 -m pip install coverage==5.3.1
5.3
Version 5.3 — 2020-09-13
- The
source
setting has always been interpreted as either a file path or a module, depending on which existed. If both interpretations were valid, it was assumed to be a file path. The newsource_pkgs
setting can be used to name a package to disambiguate this case. Thanks, Thomas Grainger. Fixes issue 268. - If a plugin was disabled due to an exception, we used to still try to record its information, causing an exception, as reported in issue 1011. This is now fixed.
➡️ PyPI page: coverage 5.3.
➡️ To install: python3 -m pip install coverage==5.3
5.2.1
Version 5.2.1 — 2020-07-23
- The dark mode HTML report still used light colors for the context listing, making them unreadable (issue 1009). This is now fixed.
- The time stamp on the HTML report now includes the time zone. Thanks, Xie Yanbo (pull request 960).
➡️ PyPI page: coverage 5.2.1.
➡️ To install: python3 -m pip install coverage==5.2.1
5.2
Version 5.2 — 2020-07-05
- The HTML report has been redesigned by Vince Salvino. There is now a dark mode, the code text is larger, and system sans serif fonts are used, in addition to other small changes (issue 858 and pull request 931).
- The
coverage report
andcoverage html
commands now accept a--precision
option to control the number of decimal points displayed. Thanks, Teake Nutma (pull request 982). - The
coverage report
andcoverage html
commands now accept a--no-skip-covered
option to negate--skip-covered
. Thanks, Anthony Sottile (issue 779 and pull request 932). - The
--skip-empty
option is now available for the XML report, closing issue 976. - The
coverage report
command now accepts a--sort
option to specify how to sort the results. Thanks, Jerin Peter George (pull request 1005). - If coverage fails due to the coverage total not reaching the
--fail-under
value, it will now print a message making the condition clear. Thanks, Naveen Yadav (pull request 977). - TOML configuration files with non-ASCII characters would cause errors on Windows (issue 990). This is now fixed.
- The output of
--debug=trace
now includes information about how the--source
option is being interpreted, and the module names being considered.
➡️ PyPI page: coverage 5.2.
➡️ To install: python3 -m pip install coverage==5.2
5.1
Version 5.1 — 2020-04-12
- The JSON report now includes counts of covered and missing branches. Thanks, Salvatore Zagaria.
- On Python 3.8, try-finally-return reported wrong branch coverage with decorated async functions (issue 964). This is now fixed. Thanks, Kjell Braden.
- The get_option() and set_option() methods can now manipulate the
[paths]
configuration setting. Thanks to Bernát Gábor for the fix for issue 967.
➡️ PyPI page: coverage 5.1.
➡️ To install: python3 -m pip install coverage==5.1