Releases: nedbat/coveragepy
4.0a2
Version 4.0a2 — 2015-01-14
- Officially support PyPy 2.4, and PyPy3 2.4. Drop support for CPython 3.2 and older versions of PyPy. The code won’t work on CPython 3.2. It will probably still work on older versions of PyPy, but I’m not testing against them.
- Plugins!
- The original command line switches (-x to run a program, etc) are no longer supported.
- A new option: coverage report –skip-covered will reduce the number of files reported by skipping files with 100% coverage. Thanks, Krystian Kichewko. This means that empty __init__.py files will be skipped, since they are 100% covered, closing issue 315.
- You can now specify the
--fail-under
option in the.coveragerc
file as the[report] fail_under
option. This closes issue 314. - The
COVERAGE_OPTIONS
environment variable is no longer supported. It was a hack for--timid
before configuration files were available. - The HTML report now has filtering. Type text into the Filter box on the index page, and only modules with that text in the name will be shown. Thanks, Danny Allen.
- The textual report and the HTML report used to report partial branches differently for no good reason. Now the text report’s “missing branches” column is a “partial branches” column so that both reports show the same numbers. This closes issue 342.
- If you specify a
--rcfile
that cannot be read, you will get an error message. Fixes issue 343. - The
--debug
switch can now be used on any command. - You can now programmatically adjust the configuration of coverage.py by setting items on Coverage.config after construction.
- A module run with
-m
can be used as the argument to--source
, fixing issue 328. Thanks, Buck Evan. - The regex for matching exclusion pragmas has been fixed to allow more kinds of white space, fixing issue 334.
- Made some PyPy-specific tweaks to improve speed under PyPy. Thanks, Alex Gaynor.
- In some cases, with a source file missing a final newline, coverage.py would count statements incorrectly. This is now fixed, closing issue 293.
- The status.dat file that HTML reports use to avoid re-creating files that haven’t changed is now a JSON file instead of a pickle file. This obviates issue 287 and issue 237.
➡️ PyPI page: coverage 4.0a2.
➡️ To install: python3 -m pip install coverage==4.0a2
4.0a1
Version 4.0a1 — 2014-09-27
- Python versions supported are now CPython 2.6, 2.7, 3.2, 3.3, and 3.4, and PyPy 2.2.
- Gevent, eventlet, and greenlet are now supported, closing issue 149. The
concurrency
setting specifies the concurrency library in use. Huge thanks to Peter Portante for initial implementation, and to Joe Jevnik for the final insight that completed the work. - Options are now also read from a setup.cfg file, if any. Sections are prefixed with “coverage:”, so the
[run]
options will be read from the[coverage:run]
section of setup.cfg. Finishes issue 304. - The
report -m
command can now show missing branches when reporting on branch coverage. Thanks, Steve Leonard. Closes issue 230. - The XML report now contains a <source> element, fixing issue 94. Thanks Stan Hu.
- The class defined in the coverage module is now called
Coverage
instead ofcoverage
, though the old name still works, for backward compatibility. - The
fail-under
value is now rounded the same as reported results, preventing paradoxical results, fixing issue 284. - The XML report will now create the output directory if need be, fixing issue 285. Thanks, Chris Rose.
- HTML reports no longer raise UnicodeDecodeError if a Python file has un-decodable characters, fixing issue 303 and issue 331.
- The annotate command will now annotate all files, not just ones relative to the current directory, fixing issue 57.
- The coverage module no longer causes deprecation warnings on Python 3.4 by importing the imp module, fixing issue 305.
- Encoding declarations in source files are only considered if they are truly comments. Thanks, Anthony Sottile.
➡️ PyPI page: coverage 4.0a1.
➡️ To install: python3 -m pip install coverage==4.0a1
3.7.1
Version 3.7.1 — 2013-12-13
- Improved the speed of HTML report generation by about 20%.
- Fixed the mechanism for finding OS-installed static files for the HTML report so that it will actually find OS-installed static files.
➡️ PyPI page: coverage 3.7.1.
➡️ To install: python3 -m pip install coverage==3.7.1
3.7
Version 3.7 — 2013-10-06
- Added the
--debug
switch tocoverage run
. It accepts a list of options indicating the type of internal activity to log to stderr. - Improved the branch coverage facility, fixing issue 92 and issue 175.
- Running code with
coverage run -m
now behaves more like Python does, setting sys.path properly, which fixes issue 207 and issue 242. - Coverage.py can now run .pyc files directly, closing issue 264.
- Coverage.py properly supports .pyw files, fixing issue 261.
- Omitting files within a tree specified with the
source
option would cause them to be incorrectly marked as un-executed, as described in issue 218. This is now fixed. - When specifying paths to alias together during data combining, you can now specify relative paths, fixing issue 267.
- Most file paths can now be specified with username expansion (
~/src
, or~build/src
, for example), and with environment variable expansion (build/$BUILDNUM/src
). - Trying to create an XML report with no files to report on, would cause a ZeroDivisionError, but no longer does, fixing issue 250.
- When running a threaded program under the Python tracer, coverage.py no longer issues a spurious warning about the trace function changing: “Trace function changed, measurement is likely wrong: None.” This fixes issue 164.
- Static files necessary for HTML reports are found in system-installed places, to ease OS-level packaging of coverage.py. Closes issue 259.
- Source files with encoding declarations, but a blank first line, were not decoded properly. Now they are. Thanks, Roger Hu.
- The source kit now includes the
__main__.py
file in the root coverage directory, fixing issue 255.
➡️ PyPI page: coverage 3.7.
➡️ To install: python3 -m pip install coverage==3.7
3.6
Version 3.6 — 2013-01-05
- Added a page to the docs about troublesome situations, closing issue 226, and added some info to the TODO file, closing issue 227.
➡️ PyPI page: coverage 3.6.
➡️ To install: python3 -m pip install coverage==3.6
3.6b3
Version 3.6b3 — 2012-12-29
- Beta 2 broke the nose plugin. It’s fixed again, closing issue 224.
➡️ PyPI page: coverage 3.6b3.
➡️ To install: python3 -m pip install coverage==3.6b3
3.6b2
Version 3.6b2 — 2012-12-23
- Coverage.py runs on Python 2.3 and 2.4 again. It was broken in 3.6b1.
- The C extension is optionally compiled using a different more widely-used technique, taking another stab at fixing issue 80 once and for all.
- Combining data files would create entries for phantom files if used with
source
and path aliases. It no longer does. debug sys
now shows the configuration file path that was read.- If an oddly-behaved package claims that code came from an empty-string file name, coverage.py no longer associates it with the directory name, fixing issue 221.
➡️ PyPI page: coverage 3.6b2.
➡️ To install: python3 -m pip install coverage==3.6b2
3.6b1
Version 3.6b1 — 2012-11-28
- Wildcards in
include=
andomit=
arguments were not handled properly in reporting functions, though they were when running. Now they are handled uniformly, closing issue 143 and issue 163. NOTE: it is possible that your configurations may now be incorrect. If you useinclude
oromit
during reporting, whether on the command line, through the API, or in a configuration file, please check carefully that you were not relying on the old broken behavior. - The report, html, and xml commands now accept a
--fail-under
switch that indicates in the exit status whether the coverage percentage was less than a particular value. Closes issue 139. - The reporting functions coverage.report(), coverage.html_report(), and coverage.xml_report() now all return a float, the total percentage covered measurement.
- The HTML report’s title can now be set in the configuration file, with the
--title
switch on the command line, or via the API. - Configuration files now support substitution of environment variables, using syntax like
${WORD}
. Closes issue 97. - Embarrassingly, the
[xml] output=
setting in the .coveragerc file simply didn’t work. Now it does. - The XML report now consistently uses file names for the file name attribute, rather than sometimes using module names. Fixes issue 67. Thanks, Marcus Cobden.
- Coverage percentage metrics are now computed slightly differently under branch coverage. This means that completely un-executed files will now correctly have 0% coverage, fixing issue 156. This also means that your total coverage numbers will generally now be lower if you are measuring branch coverage.
- When installing, now in addition to creating a “coverage” command, two new aliases are also installed. A “coverage2” or “coverage3” command will be created, depending on whether you are installing in Python 2.x or 3.x. A “coverage-X.Y” command will also be created corresponding to your specific version of Python. Closes issue 111.
- The coverage.py installer no longer tries to bootstrap setuptools or Distribute. You must have one of them installed first, as issue 202 recommended.
- The coverage.py kit now includes docs (closing issue 137) and tests.
- On Windows, files are now reported in their correct case, fixing issue 89 and issue 203.
- If a file is missing during reporting, the path shown in the error message is now correct, rather than an incorrect path in the current directory. Fixes issue 60.
- Running an HTML report in Python 3 in the same directory as an old Python 2 HTML report would fail with a UnicodeDecodeError. This issue (issue 193) is now fixed.
- Fixed yet another error trying to parse non-Python files as Python, this time an IndentationError, closing issue 82 for the fourth time…
- If coverage xml fails because there is no data to report, it used to create a zero-length XML file. Now it doesn’t, fixing issue 210.
- Jython files now work with the
--source
option, fixing issue 100. - Running coverage.py under a debugger is unlikely to work, but it shouldn’t fail with “TypeError: ‘NoneType’ object is not iterable”. Fixes issue 201.
- On some Linux distributions, when installed with the OS package manager, coverage.py would report its own code as part of the results. Now it won’t, fixing issue 214, though this will take some time to be repackaged by the operating systems.
- Docstrings for the legacy singleton methods are more helpful. Thanks Marius Gedminas. Closes issue 205.
- The pydoc tool can now show documentation for the class coverage.coverage. Closes issue 206.
- Added a page to the docs about contributing to coverage.py, closing issue 171.
- When coverage.py ended unsuccessfully, it may have reported odd errors like
'NoneType' object has no attribute 'isabs'
. It no longer does, so kiss issue 153 goodbye.
➡️ PyPI page: coverage 3.6b1.
➡️ To install: python3 -m pip install coverage==3.6b1
3.5.3
Version 3.5.3 — 2012-09-29
- Line numbers in the HTML report line up better with the source lines, fixing issue 197, thanks Marius Gedminas.
- When specifying a directory as the source= option, the directory itself no longer needs to have a
__init__.py
file, though its sub-directories do, to be considered as source files. - Files encoded as UTF-8 with a BOM are now properly handled, fixing issue 179. Thanks, Pablo Carballo.
- Fixed more cases of non-Python files being reported as Python source, and then not being able to parse them as Python. Closes issue 82 (again). Thanks, Julian Berman.
- Fixed memory leaks under Python 3, thanks, Brett Cannon. Closes issue 147.
- Optimized .pyo files may not have been handled correctly, issue 195. Thanks, Marius Gedminas.
- Certain unusually named file paths could have been mangled during reporting, issue 194. Thanks, Marius Gedminas.
- Try to do a better job of the impossible task of detecting when we can’t build the C extension, fixing issue 183.
- Testing is now done with tox, thanks, Marc Abramowitz.
➡️ PyPI page: coverage 3.5.3.
➡️ To install: python3 -m pip install coverage==3.5.3
3.5.2
Version 3.5.2 — 2012-05-04
No changes since 3.5.2.b1
➡️ PyPI page: coverage 3.5.2.
➡️ To install: python3 -m pip install coverage==3.5.2