Releases: nedbat/coveragepy
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
4.1b3
Version 4.1b3 — 2016-05-10
- When running your program, execution can jump from an
except X:
line to some other line when an exception other thanX
happens. This jump is no longer considered a branch when measuring branch coverage. - When measuring branch coverage,
yield
statements that were never resumed were incorrectly marked as missing, as reported in issue 440. This is now fixed. - During branch coverage of single-line callables like lambdas and generator expressions, coverage.py can now distinguish between them never being called, or being called but not completed. Fixes issue 90, issue 460 and issue 475.
- The HTML report now has a map of the file along the rightmost edge of the page, giving an overview of where the missed lines are. Thanks, Dmitry Shishov.
- The HTML report now uses different monospaced fonts, favoring Consolas over Courier. Along the way, issue 472 about not properly handling one-space indents was fixed. The index page also has slightly different styling, to try to make the clickable detail pages more apparent.
- Missing branches reported with
coverage report -m
will now say->exit
for missed branches to the exit of a function, rather than a negative number. Fixes issue 469. coverage --help
andcoverage --version
now mention which tracer is installed, to help diagnose problems. The docs mention which features need the C extension. (issue 479)- Officially support PyPy 5.1, which required no changes, just updates to the docs.
- The Coverage.report function had two parameters with non-None defaults, which have been changed. show_missing used to default to True, but now defaults to None. If you had been calling Coverage.report without specifying show_missing, you’ll need to explicitly set it to True to keep the same behavior. skip_covered used to default to False. It is now None, which doesn’t change the behavior. This fixes issue 485.
- It’s never been possible to pass a namespace module to one of the analysis functions, but now at least we raise a more specific error message, rather than getting confused. (issue 456)
- The coverage.process_startup function now returns the Coverage instance it creates, as suggested in issue 481.
- Make a small tweak to how we compare threads, to avoid buggy custom comparison code in thread classes. (issue 245)
➡️ PyPI page: coverage 4.1b3.
➡️ To install: python3 -m pip install coverage==4.1b3
4.1b2
Version 4.1b2 — 2016-01-23
- Problems with the new branch measurement in 4.1 beta 1 were fixed:
- Class docstrings were considered executable. Now they no longer are.
yield from
andawait
were considered returns from functions, since they could transfer control to the caller. This produced unhelpful “missing branch” reports in a number of circumstances. Now they no longer are considered returns.- In unusual situations, a missing branch to a negative number was reported. This has been fixed, closing issue 466.
- The XML report now produces correct package names for modules found in directories specified with
source=
. Fixes issue 465. coverage report
won’t produce trailing white space.
➡️ PyPI page: coverage 4.1b2.
➡️ To install: python3 -m pip install coverage==4.1b2
4.1b1
Version 4.1b1 — 2016-01-10
- Branch analysis has been rewritten: it used to be based on bytecode, but now uses AST analysis. This has changed a number of things:
- More code paths are now considered runnable, especially in
try
/except
structures. This may mean that coverage.py will identify more code paths as uncovered. This could either raise or lower your overall coverage number. - Python 3.5’s
async
andawait
keywords are properly supported, fixing issue 434. - Some long-standing branch coverage bugs were fixed:
- issue 129: functions with only a docstring for a body would incorrectly report a missing branch on the
def
line. - issue 212: code in an
except
block could be incorrectly marked as a missing branch. - issue 146: context managers (
with
statements) in a loop ortry
block could confuse the branch measurement, reporting incorrect partial branches. - issue 422: in Python 3.5, an actual partial branch could be marked as complete.
- issue 129: functions with only a docstring for a body would incorrectly report a missing branch on the
- More code paths are now considered runnable, especially in
- Pragmas to disable coverage measurement can now be used on decorator lines, and they will apply to the entire function or class being decorated. This implements the feature requested in issue 131.
- Multiprocessing support is now available on Windows. Thanks, Rodrigue Cloutier.
- Files with two encoding declarations are properly supported, fixing issue 453. Thanks, Max Linke.
- Non-ascii characters in regexes in the configuration file worked in 3.7, but stopped working in 4.0. Now they work again, closing issue 455.
- Form-feed characters would prevent accurate determination of the beginning of statements in the rest of the file. This is now fixed, closing issue 461.
➡️ PyPI page: coverage 4.1b1.
➡️ To install: python3 -m pip install coverage==4.1b1
4.0.3
Version 4.0.3 — 2015-11-24
- Fixed a mysterious problem that manifested in different ways: sometimes hanging the process (issue 420), sometimes making database connections fail (issue 445).
- The XML report now has correct
<source>
elements when using a--source=
option somewhere besides the current directory. This fixes issue 439. Thanks, Arcadiy Ivanov. - Fixed an unusual edge case of detecting source encodings, described in issue 443.
- Help messages that mention the command to use now properly use the actual command name, which might be different than “coverage”. Thanks to Ben Finney, this closes issue 438.
➡️ PyPI page: coverage 4.0.3.
➡️ To install: python3 -m pip install coverage==4.0.3
4.0.2
Version 4.0.2 — 2015-11-04
- More work on supporting unusually encoded source. Fixed issue 431.
- Files or directories with non-ASCII characters are now handled properly, fixing issue 432.
- Setting a trace function with sys.settrace was broken by a change in 4.0.1, as reported in issue 436. This is now fixed.
- Officially support PyPy 4.0, which required no changes, just updates to the docs.
➡️ PyPI page: coverage 4.0.2.
➡️ To install: python3 -m pip install coverage==4.0.2
4.0.1
Version 4.0.1 — 2015-10-13
- When combining data files, unreadable files will now generate a warning instead of failing the command. This is more in line with the older coverage.py v3.7.1 behavior, which silently ignored unreadable files. Prompted by issue 418.
- The –skip-covered option would skip reporting on 100% covered files, but also skipped them when calculating total coverage. This was wrong, it should only remove lines from the report, not change the final answer. This is now fixed, closing issue 423.
- In 4.0, the data file recorded a summary of the system on which it was run. Combined data files would keep all of those summaries. This could lead to enormous data files consisting of mostly repetitive useless information. That summary is now gone, fixing issue 415. If you want summary information, get in touch, and we’ll figure out a better way to do it.
- Test suites that mocked os.path.exists would experience strange failures, due to coverage.py using their mock inadvertently. This is now fixed, closing issue 416.
- Importing a
__init__
module explicitly would lead to an error:AttributeError: 'module' object has no attribute '__path__'
, as reported in issue 410. This is now fixed. - Code that uses
sys.settrace(sys.gettrace())
used to incur a more than 2x speed penalty. Now there’s no penalty at all. Fixes issue 397. - Pyexpat C code will no longer be recorded as a source file, fixing issue 419.
- The source kit now contains all of the files needed to have a complete source tree, re-fixing issue 137 and closing issue 281.
➡️ PyPI page: coverage 4.0.1.
➡️ To install: python3 -m pip install coverage==4.0.1
4.0
Version 4.0 — 2015-09-20
No changes from 4.0b3
➡️ PyPI page: coverage 4.0.
➡️ To install: python3 -m pip install coverage==4.0
4.0b3
Version 4.0b3 — 2015-09-07
- Reporting on an unmeasured file would fail with a traceback. This is now fixed, closing issue 403.
- The Jenkins ShiningPanda plugin looks for an obsolete file name to find the HTML reports to publish, so it was failing under coverage.py 4.0. Now we create that file if we are running under Jenkins, to keep things working smoothly. issue 404.
- Kits used to include tests and docs, but didn’t install them anywhere, or provide all of the supporting tools to make them useful. Kits no longer include tests and docs. If you were using them from the older packages, get in touch and help me understand how.
➡️ PyPI page: coverage 4.0b3.
➡️ To install: python3 -m pip install coverage==4.0b3
4.0b2
Version 4.0b2 — 2015-08-22
- 4.0b1 broke
--append
creating new data files. This is now fixed, closing issue 392. py.test --cov
can write empty data, then touch files due to--source
, which made coverage.py mistakenly force the data file to record lines instead of arcs. This would lead to a “Can’t combine line data with arc data” error message. This is now fixed, and changed some method names in the CoverageData interface. Fixes issue 399.- CoverageData.read_fileobj and CoverageData.write_fileobj replace the .read and .write methods, and are now properly inverses of each other.
- When using
report --skip-covered
, a message will now be included in the report output indicating how many files were skipped, and if all files are skipped, coverage.py won’t accidentally scold you for having no data to report. Thanks, Krystian Kichewko. - A new conversion utility has been added:
python -m coverage.pickle2json
will convert v3.x pickle data files to v4.x JSON data files. Thanks, Alexander Todorov. Closes issue 395. - A new version identifier is available, coverage.version_info, a plain tuple of values similar to sys.version_info.
➡️ PyPI page: coverage 4.0b2.
➡️ To install: python3 -m pip install coverage==4.0b2