Releases: nedbat/coveragepy
4.5.2
Version 4.5.2 — 2018-11-12
- Namespace packages are supported on Python 3.7, where they used to cause TypeErrors about path being None. Fixes issue 700.
- Python 3.8 (as of today!) passes all tests. Fixes issue 707 and issue 714.
- Development moved from Bitbucket to GitHub.
➡️ PyPI page: coverage 4.5.2.
➡️ To install: python3 -m pip install coverage==4.5.2
5.0a3
Version 5.0a3 — 2018-10-06
- Context support: static contexts let you specify a label for a coverage run, which is recorded in the data, and retained when you combine files. See Measurement contexts for more information.
- Dynamic contexts: specifying
[run] dynamic_context = test_function
in the config file will record the test function name as a dynamic context during execution. This is the core of “Who Tests What” (issue 170). Things to note:- There is no reporting support yet. Use SQLite to query the .coverage file for information. Ideas are welcome about how reporting could be extended to use this data.
- There’s a noticeable slow-down before any test is run.
- Data files will now be roughly N times larger, where N is the number of tests you have. Combining data files is therefore also N times slower.
- No other values for
dynamic_context
are recognized yet. Let me know what else would be useful. I’d like to use a pytest plugin to get better information directly from pytest, for example.
- Environment variable substitution in configuration files now supports two syntaxes for controlling the behavior of undefined variables: if
VARNAME
is not defined,${VARNAME?}
will raise an error, and${VARNAME-default value}
will use “default value”. - Partial support for Python 3.8, which has not yet released an alpha. Fixes issue 707 and issue 714.
➡️ PyPI page: coverage 5.0a3.
➡️ To install: python3 -m pip install coverage==5.0a3
5.0a2
Version 5.0a2 — 2018-09-03
- Coverage’s data storage has changed. In version 4.x, .coverage files were basically JSON. Now, they are SQLite databases. This means the data file can be created earlier than it used to. A large amount of code was refactored to support this change.
- Because the data file is created differently than previous releases, you may need
parallel=true
where you didn’t before. - The old data format is still available (for now) by setting the environment variable
COVERAGE_STORAGE=json
. Please tell me if you think you need to keep the JSON format. - The database schema is guaranteed to change in the future, to support new features. I’m looking for opinions about making the schema part of the public API to coverage.py or not.
- Because the data file is created differently than previous releases, you may need
- Development moved from Bitbucket to GitHub.
- HTML files no longer have trailing and extra white space.
- The sort order in the HTML report is stored in local storage rather than cookies, closing issue 611. Thanks, Federico Bond.
- pickle2json, for converting v3 data files to v4 data files, has been removed.
➡️ PyPI page: coverage 5.0a2.
➡️ To install: python3 -m pip install coverage==5.0a2
5.0a1
Version 5.0a1 — 2018-06-05
- Coverage.py no longer supports Python 2.6 or 3.3.
- The location of the configuration file can now be specified with a
COVERAGE_RCFILE
environment variable, as requested in issue 650. - Namespace packages are supported on Python 3.7, where they used to cause TypeErrors about path being None. Fixes issue 700.
- A new warning (
already-imported
) is issued if measurable files have already been imported before coverage.py started measurement. See Warnings for more information. - Running coverage many times for small runs in a single process should be faster, closing issue 625. Thanks, David MacIver.
- Large HTML report pages load faster. Thanks, Pankaj Pandey.
➡️ PyPI page: coverage 5.0a1.
➡️ To install: python3 -m pip install coverage==5.0a1
4.5.1
Version 4.5.1 — 2018-02-10
- Now that 4.5 properly separated the
[run] omit
and[report] omit
settings, an old bug has become apparent. If you specified a package name for[run] source
, then omit patterns weren’t matched inside that package. This bug (issue 638) is now fixed. - On Python 3.7, reporting about a decorated function with no body other than a docstring would crash coverage.py with an IndexError (issue 640). This is now fixed.
- Configurer plugins are now reported in the output of
--debug=sys
.
➡️ PyPI page: coverage 4.5.1.
➡️ To install: python3 -m pip install coverage==4.5.1
4.5
Version 4.5 — 2018-02-03
- A new kind of plugin is supported: configurers are invoked at start-up to allow more complex configuration than the .coveragerc file can easily do. See Plug-in classes for details. This solves the complex configuration problem described in issue 563.
- The
fail_under
option can now be a float. Note that you must specify the[report] precision
configuration option for the fractional part to be used. Thanks to Lars Hupfeldt Nielsen for help with the implementation. Fixes issue 631. - The
include
andomit
options can be specified for both the[run]
and[report]
phases of execution. 4.4.2 introduced some incorrect interactions between those phases, where the options for one were confused for the other. This is now corrected, fixing issue 621 and issue 622. Thanks to Daniel Hahler for seeing more clearly than I could. - The
coverage combine
command used to always overwrite the data file, even when no data had been read from apparently combinable files. Now, an error is raised if we thought there were files to combine, but in fact none of them could be used. Fixes issue 629. - The
coverage combine
command could get confused about path separators when combining data collected on Windows with data collected on Linux, as described in issue 618. This is now fixed: the result path always uses the path separator specified in the[paths]
result. - On Windows, the HTML report could fail when source trees are deeply nested, due to attempting to create HTML filenames longer than the 250-character maximum. Now filenames will never get much larger than 200 characters, fixing issue 627. Thanks to Alex Sandro for helping with the fix.
➡️ PyPI page: coverage 4.5.
➡️ To install: python3 -m pip install coverage==4.5
4.4.2
Version 4.4.2 — 2017-11-05
- Support for Python 3.7. In some cases, class and module docstrings are no longer counted in statement totals, which could slightly change your total results.
- Specifying both
--source
and--include
no longer silently ignores the include setting, instead it displays a warning. Thanks, Loïc Dachary. Closes issue 265 and issue 101. - Fixed a race condition when saving data and multiple threads are tracing (issue 581). It could produce a “dictionary changed size during iteration” RuntimeError. I believe this mostly but not entirely fixes the race condition. A true fix would likely be too expensive. Thanks, Peter Baughman for the debugging, and Olivier Grisel for the fix with tests.
- Configuration values which are file paths will now apply tilde-expansion, closing issue 589.
- Now secondary config files like tox.ini and setup.cfg can be specified explicitly, and prefixed sections like [coverage:run] will be read. Fixes issue 588.
- Be more flexible about the command name displayed by help, fixing issue 600. Thanks, Ben Finney.
➡️ PyPI page: coverage 4.4.2.
➡️ To install: python3 -m pip install coverage==4.4.2
4.4.1
Version 4.4.1 — 2017-05-14
- No code changes: just corrected packaging for Python 2.7 Linux wheels.
➡️ PyPI page: coverage 4.4.1.
➡️ To install: python3 -m pip install coverage==4.4.1
4.4
Version 4.4 — 2017-05-07
- Reports could produce the wrong file names for packages, reporting
pkg.py
instead of the correctpkg/__init__.py
. This is now fixed. Thanks, Dirk Thomas. - XML reports could produce
<source>
and<class>
lines that together didn’t specify a valid source file path. This is now fixed. (issue 526) - Namespace packages are no longer warned as having no code. (issue 572)
- Code that uses
sys.settrace(sys.gettrace())
in a file that wasn’t being coverage-measured would prevent correct coverage measurement in following code. An example of this was running doctests programmatically. This is now fixed. (issue 575) - Errors printed by the
coverage
command now go to stderr instead of stdout. - Running
coverage xml
in a directory named with non-ASCII characters would fail under Python 2. This is now fixed. (issue 573)
➡️ PyPI page: coverage 4.4.
➡️ To install: python3 -m pip install coverage==4.4
4.4b1
Version 4.4b1 — 2017-04-04
- Some warnings can now be individually disabled. Warnings that can be disabled have a short name appended. The
[run] disable_warnings
setting takes a list of these warning names to disable. Closes both issue 96 and issue 355. - The XML report now includes attributes from version 4 of the Cobertura XML format, fixing issue 570.
- In previous versions, calling a method that used collected data would prevent further collection. For example, save(), report(), html_report(), and others would all stop collection. An explicit start() was needed to get it going again. This is no longer true. Now you can use the collected data and also continue measurement. Both issue 79 and issue 448 described this problem, and have been fixed.
- Plugins can now find un-executed files if they choose, by implementing the find_executable_files method. Thanks, Emil Madsen.
- Minimal IronPython support. You should be able to run IronPython programs under
coverage run
, though you will still have to do the reporting phase with CPython. - Coverage.py has long had a special hack to support CPython’s need to measure the coverage of the standard library tests. This code was not installed by kitted versions of coverage.py. Now it is.
➡️ PyPI page: coverage 4.4b1.
➡️ To install: python3 -m pip install coverage==4.4b1