Skip to content

Releases: nedbat/coveragepy

4.4

13 Oct 23:33
Compare
Choose a tag to compare
4.4

Version 4.4 — 2017-05-07

  • Reports could produce the wrong file names for packages, reporting pkg.py instead of the correct pkg/__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

13 Oct 23:33
Compare
Choose a tag to compare
4.4b1 Pre-release
Pre-release

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

4.3.4

13 Oct 23:33
Compare
Choose a tag to compare

Version 4.3.4 — 2017-01-17

  • Fixing 2.6 in version 4.3.3 broke other things, because the too-tricky exception wasn’t properly derived from Exception, described in issue 556. A newb mistake; it hasn’t been a good few days.

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

4.3.3

13 Oct 23:33
Compare
Choose a tag to compare

Version 4.3.3 — 2017-01-17

  • Python 2.6 support was broken due to a testing exception imported for the benefit of the coverage.py test suite. Properly conditionalizing it fixed issue 554 so that Python 2.6 works again.

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

4.3.2

13 Oct 23:33
Compare
Choose a tag to compare

Version 4.3.2 — 2017-01-16

  • Using the --skip-covered option on an HTML report with 100% coverage would cause a “No data to report” error, as reported in issue 549. This is now fixed; thanks, Loïc Dachary.
  • If-statements can be optimized away during compilation, for example, if 0: or if __debug__:. Coverage.py had problems properly understanding these statements which existed in the source, but not in the compiled bytecode. This problem, reported in issue 522, is now fixed.
  • If you specified --source as a directory, then coverage.py would look for importable Python files in that directory, and could identify ones that had never been executed at all. But if you specified it as a package name, that detection wasn’t performed. Now it is, closing issue 426. Thanks to Loïc Dachary for the fix.
  • If you started and stopped coverage measurement thousands of times in your process, you could crash Python with a “Fatal Python error: deallocating None” error. This is now fixed. Thanks to Alex Groce for the bug report.
  • On PyPy, measuring coverage in subprocesses could produce a warning: “Trace function changed, measurement is likely wrong: None”. This was spurious, and has been suppressed.
  • Previously, coverage.py couldn’t start on Jython, due to that implementation missing the multiprocessing module (issue 551). This problem has now been fixed. Also, issue 322 about not being able to invoke coverage conveniently, seems much better: jython -m coverage run myprog.py works properly.
  • Let’s say you ran the HTML report over and over again in the same output directory, with --skip-covered. And imagine due to your heroic test-writing efforts, a file just achieved the goal of 100% coverage. With coverage.py 4.3, the old HTML file with the less-than-100% coverage would be left behind. This file is now properly deleted.

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

4.3.1

13 Oct 23:32
Compare
Choose a tag to compare

Version 4.3.1 — 2016-12-28

  • Some environments couldn’t install 4.3, as described in issue 540. This is now fixed.
  • The check for conflicting --source and --include was too simple in a few different ways, breaking a few perfectly reasonable use cases, described in issue 541. The check has been reverted while we re-think the fix for issue 265.

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

4.3

13 Oct 23:32
Compare
Choose a tag to compare
4.3

Version 4.3 — 2016-12-27

Special thanks to Loïc Dachary, who took an extraordinary interest in coverage.py and contributed a number of improvements in this release.

  • Subprocesses that are measured with automatic subprocess measurement used to read in any pre-existing data file. This meant data would be incorrectly carried forward from run to run. Now those files are not read, so each subprocess only writes its own data. Fixes issue 510.
  • The coverage combine command will now fail if there are no data files to combine. The combine changes in 4.2 meant that multiple combines could lose data, leaving you with an empty .coverage data file. Fixes issue 525, issue 412, issue 516, and probably issue 511.
  • Coverage.py wouldn’t execute sys.excepthook when an exception happened in your program. Now it does, thanks to Andrew Hoos. Closes issue 535.
  • Branch coverage fixes:
    • Branch coverage could misunderstand a finally clause on a try block that never continued on to the following statement, as described in issue 493. This is now fixed. Thanks to Joe Doherty for the report and Loïc Dachary for the fix.
    • A while loop with a constant condition (while True) and a continue statement would be mis-analyzed, as described in issue 496. This is now fixed, thanks to a bug report by Eli Skeggs and a fix by Loïc Dachary.
    • While loops with constant conditions that were never executed could result in a non-zero coverage report. Artem Dayneko reported this in issue 502, and Loïc Dachary provided the fix.
  • The HTML report now supports a --skip-covered option like the other reporting commands. Thanks, Loïc Dachary for the implementation, closing issue 433.
  • Options can now be read from a tox.ini file, if any. Like setup.cfg, sections are prefixed with “coverage:”, so [run] options will be read from the [coverage:run] section of tox.ini. Implements part of issue 519. Thanks, Stephen Finucane.
  • Specifying both --source and --include no longer silently ignores the include setting, instead it fails with a message. Thanks, Nathan Land and Loïc Dachary. Closes issue 265.
  • The Coverage.combine method has a new parameter, strict=False, to support failing if there are no data files to combine.
  • When forking subprocesses, the coverage data files would have the same random number appended to the file name. This didn’t cause problems, because the file names had the process id also, making collisions (nearly) impossible. But it was disconcerting. This is now fixed.
  • The text report now properly sizes headers when skipping some files, fixing issue 524. Thanks, Anthony Sottile and Loïc Dachary.
  • Coverage.py can now search .pex files for source, just as it can .zip and .egg. Thanks, Peter Ebden.
  • Data files are now about 15% smaller.
  • Improvements in the [run] debug setting:
    • The “dataio” debug setting now also logs when data files are deleted during combining or erasing.
    • A new debug option, “multiproc”, for logging the behavior of concurrency=multiprocessing.
    • If you used the debug options “config” and “callers” together, you’d get a call stack printed for every line in the multi-line config output. This is now fixed.
  • Fixed an unusual bug involving multiple coding declarations affecting code containing code in multi-line strings: issue 529.
  • Coverage.py will no longer be misled into thinking that a plain file is a package when interpreting --source options. Thanks, Cosimo Lupo.
  • If you try to run a non-Python file with coverage.py, you will now get a more useful error message. Issue 514.
  • The default pragma regex changed slightly, but this will only matter to you if you are deranged and use mixed-case pragmas.
  • Deal properly with non-ASCII file names in an ASCII-only world, issue 533.
  • Programs that set Unicode configuration values could cause UnicodeErrors when generating HTML reports. Pytest-cov is one example. This is now fixed.
  • Prevented deprecation warnings from configparser that happened in some circumstances, closing issue 530.
  • Corrected the name of the jquery.ba-throttle-debounce.js library. Thanks, Ben Finney. Closes issue 505.
  • Testing against PyPy 5.6 and PyPy3 5.5.
  • Switched to pytest from nose for running the coverage.py tests.
  • Renamed AUTHORS.txt to CONTRIBUTORS.txt, since there are other ways to contribute than by writing code. Also put the count of contributors into the author string in setup.py, though this might be too cute.

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

4.2

13 Oct 23:32
Compare
Choose a tag to compare
4.2

Version 4.2 — 2016-07-26

  • Since concurrency=multiprocessing uses subprocesses, options specified on the coverage.py command line will not be communicated down to them. Only options in the configuration file will apply to the subprocesses. Previously, the options didn’t apply to the subprocesses, but there was no indication. Now it is an error to use --concurrency=multiprocessing and other run-affecting options on the command line. This prevents failures like those reported in issue 495.
  • Filtering the HTML report is now faster, thanks to Ville Skyttä.

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

4.2b1

13 Oct 23:32
Compare
Choose a tag to compare
4.2b1 Pre-release
Pre-release

Version 4.2b1 — 2016-07-04

Work from the PyCon 2016 Sprints!

  • BACKWARD INCOMPATIBILITY: the coverage combine command now ignores an existing .coverage data file. It used to include that file in its combining. This caused confusing results, and extra tox “clean” steps. If you want the old behavior, use the new coverage combine --append option.
  • The concurrency option can now take multiple values, to support programs using multiprocessing and another library such as eventlet. This is only possible in the configuration file, not from the command line. The configuration file is the only way for sub-processes to all run with the same options. Fixes issue 484. Thanks to Josh Williams for prototyping.
  • Using a concurrency setting of multiprocessing now implies --parallel so that the main program is measured similarly to the sub-processes.
  • When using automatic subprocess measurement, running coverage commands would create spurious data files. This is now fixed, thanks to diagnosis and testing by Dan Riti. Closes issue 492.
  • A new configuration option, report:sort, controls what column of the text report is used to sort the rows. Thanks to Dan Wandschneider, this closes issue 199.
  • The HTML report has a more-visible indicator for which column is being sorted. Closes issue 298, thanks to Josh Williams.
  • If the HTML report cannot find the source for a file, the message now suggests using the -i flag to allow the report to continue. Closes issue 231, thanks, Nathan Land.
  • When reports are ignoring errors, there’s now a warning if a file cannot be parsed, rather than being silently ignored. Closes issue 396. Thanks, Matthew Boehm.
  • A new option for coverage debug is available: coverage debug config shows the current configuration. Closes issue 454, thanks to Matthew Boehm.
  • Running coverage as a module (python -m coverage) no longer shows the program name as __main__.py. Fixes issue 478. Thanks, Scott Belden.
  • The test_helpers module has been moved into a separate pip-installable package: unittest-mixins.

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

4.1

13 Oct 23:32
Compare
Choose a tag to compare
4.1

Version 4.1 — 2016-05-21

  • The internal attribute Reporter.file_reporters was removed in 4.1b3. It should have come has no surprise that there were third-party tools out there using that attribute. It has been restored, but with a deprecation warning.

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