eric6/DebugClients/Python/coverage/doc/CHANGES.rst

changeset 6942
2602857055c5
parent 6649
f1b3a73831c9
child 7427
362cd1b6f81a
equal deleted inserted replaced
6941:f99d60d6b59b 6942:2602857055c5
1 .. Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
2 .. For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
3
4 ==============================
5 Change history for Coverage.py
6 ==============================
7
8 .. When updating the "Unreleased" header to a specific version, use this
9 .. format. Don't forget the jump target:
10 ..
11 ..
12 .. .. _changes_781:
13 ..
14 ..
15 .. Version 7.8.1 --- 2021-07-27
16 .. ----------------------------
17
18
19 .. _changes_452:
20
21 Version 4.5.2 --- 2018-11-12
22 ----------------------------
23
24 - Namespace packages are supported on Python 3.7, where they used to cause
25 TypeErrors about path being None. Fixes `issue 700`_.
26
27 - Python 3.8 (as of today!) passes all tests. Fixes `issue 707` and
28 `issue 714`_.
29
30 - Development moved from `Bitbucket`_ to `GitHub`_.
31
32 .. _issue 700: https://github.com/nedbat/coveragepy/issues/700
33 .. _issue 707: https://github.com/nedbat/coveragepy/issues/707
34 .. _issue 714: https://github.com/nedbat/coveragepy/issues/714
35
36 .. _Bitbucket: https://bitbucket.org/ned/coveragepy
37 .. _GitHub: https://github.com/nedbat/coveragepy
38
39
40 .. _changes_451:
41
42 Version 4.5.1 --- 2018-02-10
43 ----------------------------
44
45 - Now that 4.5 properly separated the ``[run] omit`` and ``[report] omit``
46 settings, an old bug has become apparent. If you specified a package name
47 for ``[run] source``, then omit patterns weren't matched inside that package.
48 This bug (`issue 638`_) is now fixed.
49
50 - On Python 3.7, reporting about a decorated function with no body other than a
51 docstring would crash coverage.py with an IndexError (`issue 640`_). This is
52 now fixed.
53
54 - Configurer plugins are now reported in the output of ``--debug=sys``.
55
56 .. _issue 638: https://bitbucket.org/ned/coveragepy/issues/638/run-omit-is-ignored-since-45
57 .. _issue 640: https://bitbucket.org/ned/coveragepy/issues/640/indexerror-reporting-on-an-empty-decorated
58
59
60 .. _changes_45:
61
62 Version 4.5 --- 2018-02-03
63 --------------------------
64
65 - A new kind of plugin is supported: configurators are invoked at start-up to
66 allow more complex configuration than the .coveragerc file can easily do.
67 See :ref:`api_plugin` for details. This solves the complex configuration
68 problem described in `issue 563`_.
69
70 - The ``fail_under`` option can now be a float. Note that you must specify the
71 ``[report] precision`` configuration option for the fractional part to be
72 used. Thanks to Lars Hupfeldt Nielsen for help with the implementation.
73 Fixes `issue 631`_.
74
75 - The ``include`` and ``omit`` options can be specified for both the ``[run]``
76 and ``[report]`` phases of execution. 4.4.2 introduced some incorrect
77 interactions between those phases, where the options for one were confused
78 for the other. This is now corrected, fixing `issue 621`_ and `issue 622`_.
79 Thanks to Daniel Hahler for seeing more clearly than I could.
80
81 - The ``coverage combine`` command used to always overwrite the data file, even
82 when no data had been read from apparently combinable files. Now, an error
83 is raised if we thought there were files to combine, but in fact none of them
84 could be used. Fixes `issue 629`_.
85
86 - The ``coverage combine`` command could get confused about path separators
87 when combining data collected on Windows with data collected on Linux, as
88 described in `issue 618`_. This is now fixed: the result path always uses
89 the path separator specified in the ``[paths]`` result.
90
91 - On Windows, the HTML report could fail when source trees are deeply nested,
92 due to attempting to create HTML filenames longer than the 250-character
93 maximum. Now filenames will never get much larger than 200 characters,
94 fixing `issue 627`_. Thanks to Alex Sandro for helping with the fix.
95
96 .. _issue 563: https://bitbucket.org/ned/coveragepy/issues/563/platform-specific-configuration
97 .. _issue 618: https://bitbucket.org/ned/coveragepy/issues/618/problem-when-combining-windows-generated
98 .. _issue 621: https://bitbucket.org/ned/coveragepy/issues/621/include-ignored-warning-when-using
99 .. _issue 622: https://bitbucket.org/ned/coveragepy/issues/622/report-omit-overwrites-run-omit
100 .. _issue 627: https://bitbucket.org/ned/coveragepy/issues/627/failure-generating-html-reports-when-the
101 .. _issue 629: https://bitbucket.org/ned/coveragepy/issues/629/multiple-use-of-combine-leads-to-empty
102 .. _issue 631: https://bitbucket.org/ned/coveragepy/issues/631/precise-coverage-percentage-value
103
104
105 .. _changes_442:
106
107 Version 4.4.2 --- 2017-11-05
108 ----------------------------
109
110 - Support for Python 3.7. In some cases, class and module docstrings are no
111 longer counted in statement totals, which could slightly change your total
112 results.
113
114 - Specifying both ``--source`` and ``--include`` no longer silently ignores the
115 include setting, instead it displays a warning. Thanks, Loïc Dachary. Closes
116 `issue 265`_ and `issue 101`_.
117
118 - Fixed a race condition when saving data and multiple threads are tracing
119 (`issue 581`_). It could produce a "dictionary changed size during iteration"
120 RuntimeError. I believe this mostly but not entirely fixes the race
121 condition. A true fix would likely be too expensive. Thanks, Peter Baughman
122 for the debugging, and Olivier Grisel for the fix with tests.
123
124 - Configuration values which are file paths will now apply tilde-expansion,
125 closing `issue 589`_.
126
127 - Now secondary config files like tox.ini and setup.cfg can be specified
128 explicitly, and prefixed sections like `[coverage:run]` will be read. Fixes
129 `issue 588`_.
130
131 - Be more flexible about the command name displayed by help, fixing
132 `issue 600`_. Thanks, Ben Finney.
133
134 .. _issue 101: https://bitbucket.org/ned/coveragepy/issues/101/settings-under-report-affect-running
135 .. _issue 581: https://bitbucket.org/ned/coveragepy/issues/581/race-condition-when-saving-data-under
136 .. _issue 588: https://bitbucket.org/ned/coveragepy/issues/588/using-rcfile-path-to-toxini-uses-run
137 .. _issue 589: https://bitbucket.org/ned/coveragepy/issues/589/allow-expansion-in-coveragerc
138 .. _issue 600: https://bitbucket.org/ned/coveragepy/issues/600/get-program-name-from-command-line-when
139
140
141 .. _changes_441:
142
143 Version 4.4.1 --- 2017-05-14
144 ----------------------------
145
146 - No code changes: just corrected packaging for Python 2.7 Linux wheels.
147
148
149 .. _changes_44:
150
151 Version 4.4 --- 2017-05-07
152 --------------------------
153
154 - Reports could produce the wrong file names for packages, reporting ``pkg.py``
155 instead of the correct ``pkg/__init__.py``. This is now fixed. Thanks, Dirk
156 Thomas.
157
158 - XML reports could produce ``<source>`` and ``<class>`` lines that together
159 didn't specify a valid source file path. This is now fixed. (`issue 526`_)
160
161 - Namespace packages are no longer warned as having no code. (`issue 572`_)
162
163 - Code that uses ``sys.settrace(sys.gettrace())`` in a file that wasn't being
164 coverage-measured would prevent correct coverage measurement in following
165 code. An example of this was running doctests programmatically. This is now
166 fixed. (`issue 575`_)
167
168 - Errors printed by the ``coverage`` command now go to stderr instead of
169 stdout.
170
171 - Running ``coverage xml`` in a directory named with non-ASCII characters would
172 fail under Python 2. This is now fixed. (`issue 573`_)
173
174 .. _issue 526: https://bitbucket.org/ned/coveragepy/issues/526/generated-xml-invalid-paths-for-cobertura
175 .. _issue 572: https://bitbucket.org/ned/coveragepy/issues/572/no-python-source-warning-for-namespace
176 .. _issue 573: https://bitbucket.org/ned/coveragepy/issues/573/cant-generate-xml-report-if-some-source
177 .. _issue 575: https://bitbucket.org/ned/coveragepy/issues/575/running-doctest-prevents-complete-coverage
178
179
180 Version 4.4b1 --- 2017-04-04
181 ----------------------------
182
183 - Some warnings can now be individually disabled. Warnings that can be
184 disabled have a short name appended. The ``[run] disable_warnings`` setting
185 takes a list of these warning names to disable. Closes both `issue 96`_ and
186 `issue 355`_.
187
188 - The XML report now includes attributes from version 4 of the Cobertura XML
189 format, fixing `issue 570`_.
190
191 - In previous versions, calling a method that used collected data would prevent
192 further collection. For example, `save()`, `report()`, `html_report()`, and
193 others would all stop collection. An explicit `start()` was needed to get it
194 going again. This is no longer true. Now you can use the collected data and
195 also continue measurement. Both `issue 79`_ and `issue 448`_ described this
196 problem, and have been fixed.
197
198 - Plugins can now find unexecuted files if they choose, by implementing the
199 `find_executable_files` method. Thanks, Emil Madsen.
200
201 - Minimal IronPython support. You should be able to run IronPython programs
202 under ``coverage run``, though you will still have to do the reporting phase
203 with CPython.
204
205 - Coverage.py has long had a special hack to support CPython's need to measure
206 the coverage of the standard library tests. This code was not installed by
207 kitted versions of coverage.py. Now it is.
208
209 .. _issue 79: https://bitbucket.org/ned/coveragepy/issues/79/save-prevents-harvesting-on-stop
210 .. _issue 96: https://bitbucket.org/ned/coveragepy/issues/96/unhelpful-warnings-produced-when-using
211 .. _issue 355: https://bitbucket.org/ned/coveragepy/issues/355/warnings-should-be-suppressable
212 .. _issue 448: https://bitbucket.org/ned/coveragepy/issues/448/save-and-html_report-prevent-further
213 .. _issue 570: https://bitbucket.org/ned/coveragepy/issues/570/cobertura-coverage-04dtd-support
214
215
216 .. _changes_434:
217
218 Version 4.3.4 --- 2017-01-17
219 ----------------------------
220
221 - Fixing 2.6 in version 4.3.3 broke other things, because the too-tricky
222 exception wasn't properly derived from Exception, described in `issue 556`_.
223 A newb mistake; it hasn't been a good few days.
224
225 .. _issue 556: https://bitbucket.org/ned/coveragepy/issues/556/43-fails-if-there-are-html-files-in-the
226
227
228 .. _changes_433:
229
230 Version 4.3.3 --- 2017-01-17
231 ----------------------------
232
233 - Python 2.6 support was broken due to a testing exception imported for the
234 benefit of the coverage.py test suite. Properly conditionalizing it fixed
235 `issue 554`_ so that Python 2.6 works again.
236
237 .. _issue 554: https://bitbucket.org/ned/coveragepy/issues/554/traceback-on-python-26-starting-with-432
238
239
240 .. _changes_432:
241
242 Version 4.3.2 --- 2017-01-16
243 ----------------------------
244
245 - Using the ``--skip-covered`` option on an HTML report with 100% coverage
246 would cause a "No data to report" error, as reported in `issue 549`_. This is
247 now fixed; thanks, Loïc Dachary.
248
249 - If-statements can be optimized away during compilation, for example, `if 0:`
250 or `if __debug__:`. Coverage.py had problems properly understanding these
251 statements which existed in the source, but not in the compiled bytecode.
252 This problem, reported in `issue 522`_, is now fixed.
253
254 - If you specified ``--source`` as a directory, then coverage.py would look for
255 importable Python files in that directory, and could identify ones that had
256 never been executed at all. But if you specified it as a package name, that
257 detection wasn't performed. Now it is, closing `issue 426`_. Thanks to Loïc
258 Dachary for the fix.
259
260 - If you started and stopped coverage measurement thousands of times in your
261 process, you could crash Python with a "Fatal Python error: deallocating
262 None" error. This is now fixed. Thanks to Alex Groce for the bug report.
263
264 - On PyPy, measuring coverage in subprocesses could produce a warning: "Trace
265 function changed, measurement is likely wrong: None". This was spurious, and
266 has been suppressed.
267
268 - Previously, coverage.py couldn't start on Jython, due to that implementation
269 missing the multiprocessing module (`issue 551`_). This problem has now been
270 fixed. Also, `issue 322`_ about not being able to invoke coverage
271 conveniently, seems much better: ``jython -m coverage run myprog.py`` works
272 properly.
273
274 - Let's say you ran the HTML report over and over again in the same output
275 directory, with ``--skip-covered``. And imagine due to your heroic
276 test-writing efforts, a file just achieved the goal of 100% coverage. With
277 coverage.py 4.3, the old HTML file with the less-than-100% coverage would be
278 left behind. This file is now properly deleted.
279
280 .. _issue 322: https://bitbucket.org/ned/coveragepy/issues/322/cannot-use-coverage-with-jython
281 .. _issue 426: https://bitbucket.org/ned/coveragepy/issues/426/difference-between-coverage-results-with
282 .. _issue 522: https://bitbucket.org/ned/coveragepy/issues/522/incorrect-branch-reporting-with-__debug__
283 .. _issue 549: https://bitbucket.org/ned/coveragepy/issues/549/skip-covered-with-100-coverage-throws-a-no
284 .. _issue 551: https://bitbucket.org/ned/coveragepy/issues/551/coveragepy-cannot-be-imported-in-jython27
285
286
287 .. _changes_431:
288
289 Version 4.3.1 --- 2016-12-28
290 ----------------------------
291
292 - Some environments couldn't install 4.3, as described in `issue 540`_. This is
293 now fixed.
294
295 - The check for conflicting ``--source`` and ``--include`` was too simple in a
296 few different ways, breaking a few perfectly reasonable use cases, described
297 in `issue 541`_. The check has been reverted while we re-think the fix for
298 `issue 265`_.
299
300 .. _issue 540: https://bitbucket.org/ned/coveragepy/issues/540/cant-install-coverage-v43-into-under
301 .. _issue 541: https://bitbucket.org/ned/coveragepy/issues/541/coverage-43-breaks-nosetest-with-coverage
302
303
304 .. _changes_43:
305
306 Version 4.3 --- 2016-12-27
307 --------------------------
308
309 Special thanks to **Loïc Dachary**, who took an extraordinary interest in
310 coverage.py and contributed a number of improvements in this release.
311
312 - Subprocesses that are measured with `automatic subprocess measurement`_ used
313 to read in any pre-existing data file. This meant data would be incorrectly
314 carried forward from run to run. Now those files are not read, so each
315 subprocess only writes its own data. Fixes `issue 510`_.
316
317 - The ``coverage combine`` command will now fail if there are no data files to
318 combine. The combine changes in 4.2 meant that multiple combines could lose
319 data, leaving you with an empty .coverage data file. Fixes
320 `issue 525`_, `issue 412`_, `issue 516`_, and probably `issue 511`_.
321
322 - Coverage.py wouldn't execute `sys.excepthook`_ when an exception happened in
323 your program. Now it does, thanks to Andrew Hoos. Closes `issue 535`_.
324
325 - Branch coverage fixes:
326
327 - Branch coverage could misunderstand a finally clause on a try block that
328 never continued on to the following statement, as described in `issue
329 493`_. This is now fixed. Thanks to Joe Doherty for the report and Loïc
330 Dachary for the fix.
331
332 - A while loop with a constant condition (while True) and a continue
333 statement would be mis-analyzed, as described in `issue 496`_. This is now
334 fixed, thanks to a bug report by Eli Skeggs and a fix by Loïc Dachary.
335
336 - While loops with constant conditions that were never executed could result
337 in a non-zero coverage report. Artem Dayneko reported this in `issue
338 502`_, and Loïc Dachary provided the fix.
339
340 - The HTML report now supports a ``--skip-covered`` option like the other
341 reporting commands. Thanks, Loïc Dachary for the implementation, closing
342 `issue 433`_.
343
344 - Options can now be read from a tox.ini file, if any. Like setup.cfg, sections
345 are prefixed with "coverage:", so ``[run]`` options will be read from the
346 ``[coverage:run]`` section of tox.ini. Implements part of `issue 519`_.
347 Thanks, Stephen Finucane.
348
349 - Specifying both ``--source`` and ``--include`` no longer silently ignores the
350 include setting, instead it fails with a message. Thanks, Nathan Land and
351 Loïc Dachary. Closes `issue 265`_.
352
353 - The ``Coverage.combine`` method has a new parameter, ``strict=False``, to
354 support failing if there are no data files to combine.
355
356 - When forking subprocesses, the coverage data files would have the same random
357 number appended to the file name. This didn't cause problems, because the
358 file names had the process id also, making collisions (nearly) impossible.
359 But it was disconcerting. This is now fixed.
360
361 - The text report now properly sizes headers when skipping some files, fixing
362 `issue 524`_. Thanks, Anthony Sottile and Loïc Dachary.
363
364 - Coverage.py can now search .pex files for source, just as it can .zip and
365 .egg. Thanks, Peter Ebden.
366
367 - Data files are now about 15% smaller.
368
369 - Improvements in the ``[run] debug`` setting:
370
371 - The "dataio" debug setting now also logs when data files are deleted during
372 combining or erasing.
373
374 - A new debug option, "multiproc", for logging the behavior of
375 ``concurrency=multiprocessing``.
376
377 - If you used the debug options "config" and "callers" together, you'd get a
378 call stack printed for every line in the multi-line config output. This is
379 now fixed.
380
381 - Fixed an unusual bug involving multiple coding declarations affecting code
382 containing code in multi-line strings: `issue 529`_.
383
384 - Coverage.py will no longer be misled into thinking that a plain file is a
385 package when interpreting ``--source`` options. Thanks, Cosimo Lupo.
386
387 - If you try to run a non-Python file with coverage.py, you will now get a more
388 useful error message. `Issue 514`_.
389
390 - The default pragma regex changed slightly, but this will only matter to you
391 if you are deranged and use mixed-case pragmas.
392
393 - Deal properly with non-ASCII file names in an ASCII-only world, `issue 533`_.
394
395 - Programs that set Unicode configuration values could cause UnicodeErrors when
396 generating HTML reports. Pytest-cov is one example. This is now fixed.
397
398 - Prevented deprecation warnings from configparser that happened in some
399 circumstances, closing `issue 530`_.
400
401 - Corrected the name of the jquery.ba-throttle-debounce.js library. Thanks,
402 Ben Finney. Closes `issue 505`_.
403
404 - Testing against PyPy 5.6 and PyPy3 5.5.
405
406 - Switched to pytest from nose for running the coverage.py tests.
407
408 - Renamed AUTHORS.txt to CONTRIBUTORS.txt, since there are other ways to
409 contribute than by writing code. Also put the count of contributors into the
410 author string in setup.py, though this might be too cute.
411
412 .. _sys.excepthook: https://docs.python.org/3/library/sys.html#sys.excepthook
413 .. _issue 265: https://bitbucket.org/ned/coveragepy/issues/265/when-using-source-include-is-silently
414 .. _issue 412: https://bitbucket.org/ned/coveragepy/issues/412/coverage-combine-should-error-if-no
415 .. _issue 433: https://bitbucket.org/ned/coveragepy/issues/433/coverage-html-does-not-suport-skip-covered
416 .. _issue 493: https://bitbucket.org/ned/coveragepy/issues/493/confusing-branching-failure
417 .. _issue 496: https://bitbucket.org/ned/coveragepy/issues/496/incorrect-coverage-with-branching-and
418 .. _issue 502: https://bitbucket.org/ned/coveragepy/issues/502/incorrect-coverage-report-with-cover
419 .. _issue 505: https://bitbucket.org/ned/coveragepy/issues/505/use-canonical-filename-for-debounce
420 .. _issue 514: https://bitbucket.org/ned/coveragepy/issues/514/path-to-problem-file-not-reported-when
421 .. _issue 510: https://bitbucket.org/ned/coveragepy/issues/510/erase-still-needed-in-42
422 .. _issue 511: https://bitbucket.org/ned/coveragepy/issues/511/version-42-coverage-combine-empties
423 .. _issue 516: https://bitbucket.org/ned/coveragepy/issues/516/running-coverage-combine-twice-deletes-all
424 .. _issue 519: https://bitbucket.org/ned/coveragepy/issues/519/coverage-run-sections-in-toxini-or-as
425 .. _issue 524: https://bitbucket.org/ned/coveragepy/issues/524/coverage-report-with-skip-covered-column
426 .. _issue 525: https://bitbucket.org/ned/coveragepy/issues/525/coverage-combine-when-not-in-parallel-mode
427 .. _issue 529: https://bitbucket.org/ned/coveragepy/issues/529/encoding-marker-may-only-appear-on-the
428 .. _issue 530: https://bitbucket.org/ned/coveragepy/issues/530/deprecationwarning-you-passed-a-bytestring
429 .. _issue 533: https://bitbucket.org/ned/coveragepy/issues/533/exception-on-unencodable-file-name
430 .. _issue 535: https://bitbucket.org/ned/coveragepy/issues/535/sysexcepthook-is-not-called
431
432
433 .. _changes_42:
434
435 Version 4.2 --- 2016-07-26
436 --------------------------
437
438 - Since ``concurrency=multiprocessing`` uses subprocesses, options specified on
439 the coverage.py command line will not be communicated down to them. Only
440 options in the configuration file will apply to the subprocesses.
441 Previously, the options didn't apply to the subprocesses, but there was no
442 indication. Now it is an error to use ``--concurrency=multiprocessing`` and
443 other run-affecting options on the command line. This prevents
444 failures like those reported in `issue 495`_.
445
446 - Filtering the HTML report is now faster, thanks to Ville Skyttä.
447
448 .. _issue 495: https://bitbucket.org/ned/coveragepy/issues/495/branch-and-concurrency-are-conflicting
449
450
451 Version 4.2b1 --- 2016-07-04
452 ----------------------------
453
454 Work from the PyCon 2016 Sprints!
455
456 - BACKWARD INCOMPATIBILITY: the ``coverage combine`` command now ignores an
457 existing ``.coverage`` data file. It used to include that file in its
458 combining. This caused confusing results, and extra tox "clean" steps. If
459 you want the old behavior, use the new ``coverage combine --append`` option.
460
461 - The ``concurrency`` option can now take multiple values, to support programs
462 using multiprocessing and another library such as eventlet. This is only
463 possible in the configuration file, not from the command line. The
464 configuration file is the only way for sub-processes to all run with the same
465 options. Fixes `issue 484`_. Thanks to Josh Williams for prototyping.
466
467 - Using a ``concurrency`` setting of ``multiprocessing`` now implies
468 ``--parallel`` so that the main program is measured similarly to the
469 sub-processes.
470
471 - When using `automatic subprocess measurement`_, running coverage commands
472 would create spurious data files. This is now fixed, thanks to diagnosis and
473 testing by Dan Riti. Closes `issue 492`_.
474
475 - A new configuration option, ``report:sort``, controls what column of the
476 text report is used to sort the rows. Thanks to Dan Wandschneider, this
477 closes `issue 199`_.
478
479 - The HTML report has a more-visible indicator for which column is being
480 sorted. Closes `issue 298`_, thanks to Josh Williams.
481
482 - If the HTML report cannot find the source for a file, the message now
483 suggests using the ``-i`` flag to allow the report to continue. Closes
484 `issue 231`_, thanks, Nathan Land.
485
486 - When reports are ignoring errors, there's now a warning if a file cannot be
487 parsed, rather than being silently ignored. Closes `issue 396`_. Thanks,
488 Matthew Boehm.
489
490 - A new option for ``coverage debug`` is available: ``coverage debug config``
491 shows the current configuration. Closes `issue 454`_, thanks to Matthew
492 Boehm.
493
494 - Running coverage as a module (``python -m coverage``) no longer shows the
495 program name as ``__main__.py``. Fixes `issue 478`_. Thanks, Scott Belden.
496
497 - The `test_helpers` module has been moved into a separate pip-installable
498 package: `unittest-mixins`_.
499
500 .. _automatic subprocess measurement: https://coverage.readthedocs.io/en/latest/subprocess.html
501 .. _issue 199: https://bitbucket.org/ned/coveragepy/issues/199/add-a-way-to-sort-the-text-report
502 .. _issue 231: https://bitbucket.org/ned/coveragepy/issues/231/various-default-behavior-in-report-phase
503 .. _issue 298: https://bitbucket.org/ned/coveragepy/issues/298/show-in-html-report-that-the-columns-are
504 .. _issue 396: https://bitbucket.org/ned/coveragepy/issues/396/coverage-xml-shouldnt-bail-out-on-parse
505 .. _issue 454: https://bitbucket.org/ned/coveragepy/issues/454/coverage-debug-config-should-be
506 .. _issue 478: https://bitbucket.org/ned/coveragepy/issues/478/help-shows-silly-program-name-when-running
507 .. _issue 484: https://bitbucket.org/ned/coveragepy/issues/484/multiprocessing-greenlet-concurrency
508 .. _issue 492: https://bitbucket.org/ned/coveragepy/issues/492/subprocess-coverage-strange-detection-of
509 .. _unittest-mixins: https://pypi.python.org/pypi/unittest-mixins
510
511
512 .. _changes_41:
513
514 Version 4.1 --- 2016-05-21
515 --------------------------
516
517 - The internal attribute `Reporter.file_reporters` was removed in 4.1b3. It
518 should have come has no surprise that there were third-party tools out there
519 using that attribute. It has been restored, but with a deprecation warning.
520
521
522 Version 4.1b3 --- 2016-05-10
523 ----------------------------
524
525 - When running your program, execution can jump from an ``except X:`` line to
526 some other line when an exception other than ``X`` happens. This jump is no
527 longer considered a branch when measuring branch coverage.
528
529 - When measuring branch coverage, ``yield`` statements that were never resumed
530 were incorrectly marked as missing, as reported in `issue 440`_. This is now
531 fixed.
532
533 - During branch coverage of single-line callables like lambdas and generator
534 expressions, coverage.py can now distinguish between them never being called,
535 or being called but not completed. Fixes `issue 90`_, `issue 460`_ and
536 `issue 475`_.
537
538 - The HTML report now has a map of the file along the rightmost edge of the
539 page, giving an overview of where the missed lines are. Thanks, Dmitry
540 Shishov.
541
542 - The HTML report now uses different monospaced fonts, favoring Consolas over
543 Courier. Along the way, `issue 472`_ about not properly handling one-space
544 indents was fixed. The index page also has slightly different styling, to
545 try to make the clickable detail pages more apparent.
546
547 - Missing branches reported with ``coverage report -m`` will now say ``->exit``
548 for missed branches to the exit of a function, rather than a negative number.
549 Fixes `issue 469`_.
550
551 - ``coverage --help`` and ``coverage --version`` now mention which tracer is
552 installed, to help diagnose problems. The docs mention which features need
553 the C extension. (`issue 479`_)
554
555 - Officially support PyPy 5.1, which required no changes, just updates to the
556 docs.
557
558 - The `Coverage.report` function had two parameters with non-None defaults,
559 which have been changed. `show_missing` used to default to True, but now
560 defaults to None. If you had been calling `Coverage.report` without
561 specifying `show_missing`, you'll need to explicitly set it to True to keep
562 the same behavior. `skip_covered` used to default to False. It is now None,
563 which doesn't change the behavior. This fixes `issue 485`_.
564
565 - It's never been possible to pass a namespace module to one of the analysis
566 functions, but now at least we raise a more specific error message, rather
567 than getting confused. (`issue 456`_)
568
569 - The `coverage.process_startup` function now returns the `Coverage` instance
570 it creates, as suggested in `issue 481`_.
571
572 - Make a small tweak to how we compare threads, to avoid buggy custom
573 comparison code in thread classes. (`issue 245`_)
574
575 .. _issue 90: https://bitbucket.org/ned/coveragepy/issues/90/lambda-expression-confuses-branch
576 .. _issue 245: https://bitbucket.org/ned/coveragepy/issues/245/change-solution-for-issue-164
577 .. _issue 440: https://bitbucket.org/ned/coveragepy/issues/440/yielded-twisted-failure-marked-as-missed
578 .. _issue 456: https://bitbucket.org/ned/coveragepy/issues/456/coverage-breaks-with-implicit-namespaces
579 .. _issue 460: https://bitbucket.org/ned/coveragepy/issues/460/confusing-html-report-for-certain-partial
580 .. _issue 469: https://bitbucket.org/ned/coveragepy/issues/469/strange-1-line-number-in-branch-coverage
581 .. _issue 472: https://bitbucket.org/ned/coveragepy/issues/472/html-report-indents-incorrectly-for-one
582 .. _issue 475: https://bitbucket.org/ned/coveragepy/issues/475/generator-expression-is-marked-as-not
583 .. _issue 479: https://bitbucket.org/ned/coveragepy/issues/479/clarify-the-need-for-the-c-extension
584 .. _issue 481: https://bitbucket.org/ned/coveragepy/issues/481/asyncioprocesspoolexecutor-tracing-not
585 .. _issue 485: https://bitbucket.org/ned/coveragepy/issues/485/coveragereport-ignores-show_missing-and
586
587
588 Version 4.1b2 --- 2016-01-23
589 ----------------------------
590
591 - Problems with the new branch measurement in 4.1 beta 1 were fixed:
592
593 - Class docstrings were considered executable. Now they no longer are.
594
595 - ``yield from`` and ``await`` were considered returns from functions, since
596 they could tranfer control to the caller. This produced unhelpful "missing
597 branch" reports in a number of circumstances. Now they no longer are
598 considered returns.
599
600 - In unusual situations, a missing branch to a negative number was reported.
601 This has been fixed, closing `issue 466`_.
602
603 - The XML report now produces correct package names for modules found in
604 directories specified with ``source=``. Fixes `issue 465`_.
605
606 - ``coverage report`` won't produce trailing whitespace.
607
608 .. _issue 465: https://bitbucket.org/ned/coveragepy/issues/465/coveragexml-produces-package-names-with-an
609 .. _issue 466: https://bitbucket.org/ned/coveragepy/issues/466/impossible-missed-branch-to-a-negative
610
611
612 Version 4.1b1 --- 2016-01-10
613 ----------------------------
614
615 - Branch analysis has been rewritten: it used to be based on bytecode, but now
616 uses AST analysis. This has changed a number of things:
617
618 - More code paths are now considered runnable, especially in
619 ``try``/``except`` structures. This may mean that coverage.py will
620 identify more code paths as uncovered. This could either raise or lower
621 your overall coverage number.
622
623 - Python 3.5's ``async`` and ``await`` keywords are properly supported,
624 fixing `issue 434`_.
625
626 - Some long-standing branch coverage bugs were fixed:
627
628 - `issue 129`_: functions with only a docstring for a body would
629 incorrectly report a missing branch on the ``def`` line.
630
631 - `issue 212`_: code in an ``except`` block could be incorrectly marked as
632 a missing branch.
633
634 - `issue 146`_: context managers (``with`` statements) in a loop or ``try``
635 block could confuse the branch measurement, reporting incorrect partial
636 branches.
637
638 - `issue 422`_: in Python 3.5, an actual partial branch could be marked as
639 complete.
640
641 - Pragmas to disable coverage measurement can now be used on decorator lines,
642 and they will apply to the entire function or class being decorated. This
643 implements the feature requested in `issue 131`_.
644
645 - Multiprocessing support is now available on Windows. Thanks, Rodrigue
646 Cloutier.
647
648 - Files with two encoding declarations are properly supported, fixing
649 `issue 453`_. Thanks, Max Linke.
650
651 - Non-ascii characters in regexes in the configuration file worked in 3.7, but
652 stopped working in 4.0. Now they work again, closing `issue 455`_.
653
654 - Form-feed characters would prevent accurate determination of the beginning of
655 statements in the rest of the file. This is now fixed, closing `issue 461`_.
656
657 .. _issue 129: https://bitbucket.org/ned/coveragepy/issues/129/misleading-branch-coverage-of-empty
658 .. _issue 131: https://bitbucket.org/ned/coveragepy/issues/131/pragma-on-a-decorator-line-should-affect
659 .. _issue 146: https://bitbucket.org/ned/coveragepy/issues/146/context-managers-confuse-branch-coverage
660 .. _issue 212: https://bitbucket.org/ned/coveragepy/issues/212/coverage-erroneously-reports-partial
661 .. _issue 422: https://bitbucket.org/ned/coveragepy/issues/422/python35-partial-branch-marked-as-fully
662 .. _issue 434: https://bitbucket.org/ned/coveragepy/issues/434/indexerror-in-python-35
663 .. _issue 453: https://bitbucket.org/ned/coveragepy/issues/453/source-code-encoding-can-only-be-specified
664 .. _issue 455: https://bitbucket.org/ned/coveragepy/issues/455/unusual-exclusions-stopped-working-in
665 .. _issue 461: https://bitbucket.org/ned/coveragepy/issues/461/multiline-asserts-need-too-many-pragma
666
667
668 .. _changes_403:
669
670 Version 4.0.3 --- 2015-11-24
671 ----------------------------
672
673 - Fixed a mysterious problem that manifested in different ways: sometimes
674 hanging the process (`issue 420`_), sometimes making database connections
675 fail (`issue 445`_).
676
677 - The XML report now has correct ``<source>`` elements when using a
678 ``--source=`` option somewhere besides the current directory. This fixes
679 `issue 439`_. Thanks, Arcady Ivanov.
680
681 - Fixed an unusual edge case of detecting source encodings, described in
682 `issue 443`_.
683
684 - Help messages that mention the command to use now properly use the actual
685 command name, which might be different than "coverage". Thanks to Ben
686 Finney, this closes `issue 438`_.
687
688 .. _issue 420: https://bitbucket.org/ned/coveragepy/issues/420/coverage-40-hangs-indefinitely-on-python27
689 .. _issue 438: https://bitbucket.org/ned/coveragepy/issues/438/parameterise-coverage-command-name
690 .. _issue 439: https://bitbucket.org/ned/coveragepy/issues/439/incorrect-cobertura-file-sources-generated
691 .. _issue 443: https://bitbucket.org/ned/coveragepy/issues/443/coverage-gets-confused-when-encoding
692 .. _issue 445: https://bitbucket.org/ned/coveragepy/issues/445/django-app-cannot-connect-to-cassandra
693
694
695 .. _changes_402:
696
697 Version 4.0.2 --- 2015-11-04
698 ----------------------------
699
700 - More work on supporting unusually encoded source. Fixed `issue 431`_.
701
702 - Files or directories with non-ASCII characters are now handled properly,
703 fixing `issue 432`_.
704
705 - Setting a trace function with sys.settrace was broken by a change in 4.0.1,
706 as reported in `issue 436`_. This is now fixed.
707
708 - Officially support PyPy 4.0, which required no changes, just updates to the
709 docs.
710
711 .. _issue 431: https://bitbucket.org/ned/coveragepy/issues/431/couldnt-parse-python-file-with-cp1252
712 .. _issue 432: https://bitbucket.org/ned/coveragepy/issues/432/path-with-unicode-characters-various
713 .. _issue 436: https://bitbucket.org/ned/coveragepy/issues/436/disabled-coverage-ctracer-may-rise-from
714
715
716 .. _changes_401:
717
718 Version 4.0.1 --- 2015-10-13
719 ----------------------------
720
721 - When combining data files, unreadable files will now generate a warning
722 instead of failing the command. This is more in line with the older
723 coverage.py v3.7.1 behavior, which silently ignored unreadable files.
724 Prompted by `issue 418`_.
725
726 - The --skip-covered option would skip reporting on 100% covered files, but
727 also skipped them when calculating total coverage. This was wrong, it should
728 only remove lines from the report, not change the final answer. This is now
729 fixed, closing `issue 423`_.
730
731 - In 4.0, the data file recorded a summary of the system on which it was run.
732 Combined data files would keep all of those summaries. This could lead to
733 enormous data files consisting of mostly repetitive useless information. That
734 summary is now gone, fixing `issue 415`_. If you want summary information,
735 get in touch, and we'll figure out a better way to do it.
736
737 - Test suites that mocked os.path.exists would experience strange failures, due
738 to coverage.py using their mock inadvertently. This is now fixed, closing
739 `issue 416`_.
740
741 - Importing a ``__init__`` module explicitly would lead to an error:
742 ``AttributeError: 'module' object has no attribute '__path__'``, as reported
743 in `issue 410`_. This is now fixed.
744
745 - Code that uses ``sys.settrace(sys.gettrace())`` used to incur a more than 2x
746 speed penalty. Now there's no penalty at all. Fixes `issue 397`_.
747
748 - Pyexpat C code will no longer be recorded as a source file, fixing
749 `issue 419`_.
750
751 - The source kit now contains all of the files needed to have a complete source
752 tree, re-fixing `issue 137`_ and closing `issue 281`_.
753
754 .. _issue 281: https://bitbucket.org/ned/coveragepy/issues/281/supply-scripts-for-testing-in-the
755 .. _issue 397: https://bitbucket.org/ned/coveragepy/issues/397/stopping-and-resuming-coverage-with
756 .. _issue 410: https://bitbucket.org/ned/coveragepy/issues/410/attributeerror-module-object-has-no
757 .. _issue 415: https://bitbucket.org/ned/coveragepy/issues/415/repeated-coveragedataupdates-cause
758 .. _issue 416: https://bitbucket.org/ned/coveragepy/issues/416/mocking-ospathexists-causes-failures
759 .. _issue 418: https://bitbucket.org/ned/coveragepy/issues/418/json-parse-error
760 .. _issue 419: https://bitbucket.org/ned/coveragepy/issues/419/nosource-no-source-for-code-path-to-c
761 .. _issue 423: https://bitbucket.org/ned/coveragepy/issues/423/skip_covered-changes-reported-total
762
763
764 .. _changes_40:
765
766 Version 4.0 --- 2015-09-20
767 --------------------------
768
769 No changes from 4.0b3
770
771
772 Version 4.0b3 --- 2015-09-07
773 ----------------------------
774
775 - Reporting on an unmeasured file would fail with a traceback. This is now
776 fixed, closing `issue 403`_.
777
778 - The Jenkins ShiningPanda plugin looks for an obsolete file name to find the
779 HTML reports to publish, so it was failing under coverage.py 4.0. Now we
780 create that file if we are running under Jenkins, to keep things working
781 smoothly. `issue 404`_.
782
783 - Kits used to include tests and docs, but didn't install them anywhere, or
784 provide all of the supporting tools to make them useful. Kits no longer
785 include tests and docs. If you were using them from the older packages, get
786 in touch and help me understand how.
787
788 .. _issue 403: https://bitbucket.org/ned/coveragepy/issues/403/hasherupdate-fails-with-typeerror-nonetype
789 .. _issue 404: https://bitbucket.org/ned/coveragepy/issues/404/shiningpanda-jenkins-plugin-cant-find-html
790
791
792 Version 4.0b2 --- 2015-08-22
793 ----------------------------
794
795 - 4.0b1 broke ``--append`` creating new data files. This is now fixed, closing
796 `issue 392`_.
797
798 - ``py.test --cov`` can write empty data, then touch files due to ``--source``,
799 which made coverage.py mistakenly force the data file to record lines instead
800 of arcs. This would lead to a "Can't combine line data with arc data" error
801 message. This is now fixed, and changed some method names in the
802 CoverageData interface. Fixes `issue 399`_.
803
804 - `CoverageData.read_fileobj` and `CoverageData.write_fileobj` replace the
805 `.read` and `.write` methods, and are now properly inverses of each other.
806
807 - When using ``report --skip-covered``, a message will now be included in the
808 report output indicating how many files were skipped, and if all files are
809 skipped, coverage.py won't accidentally scold you for having no data to
810 report. Thanks, Krystian Kichewko.
811
812 - A new conversion utility has been added: ``python -m coverage.pickle2json``
813 will convert v3.x pickle data files to v4.x JSON data files. Thanks,
814 Alexander Todorov. Closes `issue 395`_.
815
816 - A new version identifier is available, `coverage.version_info`, a plain tuple
817 of values similar to `sys.version_info`_.
818
819 .. _issue 392: https://bitbucket.org/ned/coveragepy/issues/392/run-append-doesnt-create-coverage-file
820 .. _issue 395: https://bitbucket.org/ned/coveragepy/issues/395/rfe-read-pickled-files-as-well-for
821 .. _issue 399: https://bitbucket.org/ned/coveragepy/issues/399/coverageexception-cant-combine-line-data
822 .. _sys.version_info: https://docs.python.org/3/library/sys.html#sys.version_info
823
824
825 Version 4.0b1 --- 2015-08-02
826 ----------------------------
827
828 - Coverage.py is now licensed under the Apache 2.0 license. See NOTICE.txt for
829 details. Closes `issue 313`_.
830
831 - The data storage has been completely revamped. The data file is now
832 JSON-based instead of a pickle, closing `issue 236`_. The `CoverageData`
833 class is now a public supported documented API to the data file.
834
835 - A new configuration option, ``[run] note``, lets you set a note that will be
836 stored in the `runs` section of the data file. You can use this to annotate
837 the data file with any information you like.
838
839 - Unrecognized configuration options will now print an error message and stop
840 coverage.py. This should help prevent configuration mistakes from passing
841 silently. Finishes `issue 386`_.
842
843 - In parallel mode, ``coverage erase`` will now delete all of the data files,
844 fixing `issue 262`_.
845
846 - Coverage.py now accepts a directory name for ``coverage run`` and will run a
847 ``__main__.py`` found there, just like Python will. Fixes `issue 252`_.
848 Thanks, Dmitry Trofimov.
849
850 - The XML report now includes a ``missing-branches`` attribute. Thanks, Steve
851 Peak. This is not a part of the Cobertura DTD, so the XML report no longer
852 references the DTD.
853
854 - Missing branches in the HTML report now have a bit more information in the
855 right-hand annotations. Hopefully this will make their meaning clearer.
856
857 - All the reporting functions now behave the same if no data had been
858 collected, exiting with a status code of 1. Fixed ``fail_under`` to be
859 applied even when the report is empty. Thanks, Ionel Cristian Mărieș.
860
861 - Plugins are now initialized differently. Instead of looking for a class
862 called ``Plugin``, coverage.py looks for a function called ``coverage_init``.
863
864 - A file-tracing plugin can now ask to have built-in Python reporting by
865 returning `"python"` from its `file_reporter()` method.
866
867 - Code that was executed with `exec` would be mis-attributed to the file that
868 called it. This is now fixed, closing `issue 380`_.
869
870 - The ability to use item access on `Coverage.config` (introduced in 4.0a2) has
871 been changed to a more explicit `Coverage.get_option` and
872 `Coverage.set_option` API.
873
874 - The ``Coverage.use_cache`` method is no longer supported.
875
876 - The private method ``Coverage._harvest_data`` is now called
877 ``Coverage.get_data``, and returns the ``CoverageData`` containing the
878 collected data.
879
880 - The project is consistently referred to as "coverage.py" throughout the code
881 and the documentation, closing `issue 275`_.
882
883 - Combining data files with an explicit configuration file was broken in 4.0a6,
884 but now works again, closing `issue 385`_.
885
886 - ``coverage combine`` now accepts files as well as directories.
887
888 - The speed is back to 3.7.1 levels, after having slowed down due to plugin
889 support, finishing up `issue 387`_.
890
891 .. _issue 236: https://bitbucket.org/ned/coveragepy/issues/236/pickles-are-bad-and-you-should-feel-bad
892 .. _issue 252: https://bitbucket.org/ned/coveragepy/issues/252/coverage-wont-run-a-program-with
893 .. _issue 262: https://bitbucket.org/ned/coveragepy/issues/262/when-parallel-true-erase-should-erase-all
894 .. _issue 275: https://bitbucket.org/ned/coveragepy/issues/275/refer-consistently-to-project-as-coverage
895 .. _issue 313: https://bitbucket.org/ned/coveragepy/issues/313/add-license-file-containing-2-3-or-4
896 .. _issue 380: https://bitbucket.org/ned/coveragepy/issues/380/code-executed-by-exec-excluded-from
897 .. _issue 385: https://bitbucket.org/ned/coveragepy/issues/385/coverage-combine-doesnt-work-with-rcfile
898 .. _issue 386: https://bitbucket.org/ned/coveragepy/issues/386/error-on-unrecognised-configuration
899 .. _issue 387: https://bitbucket.org/ned/coveragepy/issues/387/performance-degradation-from-371-to-40
900
901 .. 40 issues closed in 4.0 below here
902
903
904 Version 4.0a6 --- 2015-06-21
905 ----------------------------
906
907 - Python 3.5b2 and PyPy 2.6.0 are supported.
908
909 - The original module-level function interface to coverage.py is no longer
910 supported. You must now create a ``coverage.Coverage`` object, and use
911 methods on it.
912
913 - The ``coverage combine`` command now accepts any number of directories as
914 arguments, and will combine all the data files from those directories. This
915 means you don't have to copy the files to one directory before combining.
916 Thanks, Christine Lytwynec. Finishes `issue 354`_.
917
918 - Branch coverage couldn't properly handle certain extremely long files. This
919 is now fixed (`issue 359`_).
920
921 - Branch coverage didn't understand yield statements properly. Mickie Betz
922 persisted in pursuing this despite Ned's pessimism. Fixes `issue 308`_ and
923 `issue 324`_.
924
925 - The COVERAGE_DEBUG environment variable can be used to set the
926 ``[run] debug`` configuration option to control what internal operations are
927 logged.
928
929 - HTML reports were truncated at formfeed characters. This is now fixed
930 (`issue 360`_). It's always fun when the problem is due to a `bug in the
931 Python standard library <http://bugs.python.org/issue19035>`_.
932
933 - Files with incorrect encoding declaration comments are no longer ignored by
934 the reporting commands, fixing `issue 351`_.
935
936 - HTML reports now include a timestamp in the footer, closing `issue 299`_.
937 Thanks, Conrad Ho.
938
939 - HTML reports now begrudgingly use double-quotes rather than single quotes,
940 because there are "software engineers" out there writing tools that read HTML
941 and somehow have no idea that single quotes exist. Capitulates to the absurd
942 `issue 361`_. Thanks, Jon Chappell.
943
944 - The ``coverage annotate`` command now handles non-ASCII characters properly,
945 closing `issue 363`_. Thanks, Leonardo Pistone.
946
947 - Drive letters on Windows were not normalized correctly, now they are. Thanks,
948 Ionel Cristian Mărieș.
949
950 - Plugin support had some bugs fixed, closing `issue 374`_ and `issue 375`_.
951 Thanks, Stefan Behnel.
952
953 .. _issue 299: https://bitbucket.org/ned/coveragepy/issues/299/inserted-created-on-yyyy-mm-dd-hh-mm-in
954 .. _issue 308: https://bitbucket.org/ned/coveragepy/issues/308/yield-lambda-branch-coverage
955 .. _issue 324: https://bitbucket.org/ned/coveragepy/issues/324/yield-in-loop-confuses-branch-coverage
956 .. _issue 351: https://bitbucket.org/ned/coveragepy/issues/351/files-with-incorrect-encoding-are-ignored
957 .. _issue 354: https://bitbucket.org/ned/coveragepy/issues/354/coverage-combine-should-take-a-list-of
958 .. _issue 359: https://bitbucket.org/ned/coveragepy/issues/359/xml-report-chunk-error
959 .. _issue 360: https://bitbucket.org/ned/coveragepy/issues/360/html-reports-get-confused-by-l-in-the-code
960 .. _issue 361: https://bitbucket.org/ned/coveragepy/issues/361/use-double-quotes-in-html-output-to
961 .. _issue 363: https://bitbucket.org/ned/coveragepy/issues/363/annotate-command-hits-unicode-happy-fun
962 .. _issue 374: https://bitbucket.org/ned/coveragepy/issues/374/c-tracer-lookups-fail-in
963 .. _issue 375: https://bitbucket.org/ned/coveragepy/issues/375/ctracer_handle_return-reads-byte-code
964
965
966 Version 4.0a5 --- 2015-02-16
967 ----------------------------
968
969 - Plugin support is now implemented in the C tracer instead of the Python
970 tracer. This greatly improves the speed of tracing projects using plugins.
971
972 - Coverage.py now always adds the current directory to sys.path, so that
973 plugins can import files in the current directory (`issue 358`_).
974
975 - If the `config_file` argument to the Coverage constructor is specified as
976 ".coveragerc", it is treated as if it were True. This means setup.cfg is
977 also examined, and a missing file is not considered an error (`issue 357`_).
978
979 - Wildly experimental: support for measuring processes started by the
980 multiprocessing module. To use, set ``--concurrency=multiprocessing``,
981 either on the command line or in the .coveragerc file (`issue 117`_). Thanks,
982 Eduardo Schettino. Currently, this does not work on Windows.
983
984 - A new warning is possible, if a desired file isn't measured because it was
985 imported before coverage.py was started (`issue 353`_).
986
987 - The `coverage.process_startup` function now will start coverage measurement
988 only once, no matter how many times it is called. This fixes problems due
989 to unusual virtualenv configurations (`issue 340`_).
990
991 - Added 3.5.0a1 to the list of supported CPython versions.
992
993 .. _issue 117: https://bitbucket.org/ned/coveragepy/issues/117/enable-coverage-measurement-of-code-run-by
994 .. _issue 340: https://bitbucket.org/ned/coveragepy/issues/340/keyerror-subpy
995 .. _issue 353: https://bitbucket.org/ned/coveragepy/issues/353/40a3-introduces-an-unexpected-third-case
996 .. _issue 357: https://bitbucket.org/ned/coveragepy/issues/357/behavior-changed-when-coveragerc-is
997 .. _issue 358: https://bitbucket.org/ned/coveragepy/issues/358/all-coverage-commands-should-adjust
998
999
1000 Version 4.0a4 --- 2015-01-25
1001 ----------------------------
1002
1003 - Plugins can now provide sys_info for debugging output.
1004
1005 - Started plugins documentation.
1006
1007 - Prepared to move the docs to readthedocs.org.
1008
1009
1010 Version 4.0a3 --- 2015-01-20
1011 ----------------------------
1012
1013 - Reports now use file names with extensions. Previously, a report would
1014 describe a/b/c.py as "a/b/c". Now it is shown as "a/b/c.py". This allows
1015 for better support of non-Python files, and also fixed `issue 69`_.
1016
1017 - The XML report now reports each directory as a package again. This was a bad
1018 regression, I apologize. This was reported in `issue 235`_, which is now
1019 fixed.
1020
1021 - A new configuration option for the XML report: ``[xml] package_depth``
1022 controls which directories are identified as packages in the report.
1023 Directories deeper than this depth are not reported as packages.
1024 The default is that all directories are reported as packages.
1025 Thanks, Lex Berezhny.
1026
1027 - When looking for the source for a frame, check if the file exists. On
1028 Windows, .pyw files are no longer recorded as .py files. Along the way, this
1029 fixed `issue 290`_.
1030
1031 - Empty files are now reported as 100% covered in the XML report, not 0%
1032 covered (`issue 345`_).
1033
1034 - Regexes in the configuration file are now compiled as soon as they are read,
1035 to provide error messages earlier (`issue 349`_).
1036
1037 .. _issue 69: https://bitbucket.org/ned/coveragepy/issues/69/coverage-html-overwrite-files-that-doesnt
1038 .. _issue 235: https://bitbucket.org/ned/coveragepy/issues/235/package-name-is-missing-in-xml-report
1039 .. _issue 290: https://bitbucket.org/ned/coveragepy/issues/290/running-programmatically-with-pyw-files
1040 .. _issue 345: https://bitbucket.org/ned/coveragepy/issues/345/xml-reports-line-rate-0-for-empty-files
1041 .. _issue 349: https://bitbucket.org/ned/coveragepy/issues/349/bad-regex-in-config-should-get-an-earlier
1042
1043
1044 Version 4.0a2 --- 2015-01-14
1045 ----------------------------
1046
1047 - Officially support PyPy 2.4, and PyPy3 2.4. Drop support for
1048 CPython 3.2 and older versions of PyPy. The code won't work on CPython 3.2.
1049 It will probably still work on older versions of PyPy, but I'm not testing
1050 against them.
1051
1052 - Plugins!
1053
1054 - The original command line switches (`-x` to run a program, etc) are no
1055 longer supported.
1056
1057 - A new option: `coverage report --skip-covered` will reduce the number of
1058 files reported by skipping files with 100% coverage. Thanks, Krystian
1059 Kichewko. This means that empty `__init__.py` files will be skipped, since
1060 they are 100% covered, closing `issue 315`_.
1061
1062 - You can now specify the ``--fail-under`` option in the ``.coveragerc`` file
1063 as the ``[report] fail_under`` option. This closes `issue 314`_.
1064
1065 - The ``COVERAGE_OPTIONS`` environment variable is no longer supported. It was
1066 a hack for ``--timid`` before configuration files were available.
1067
1068 - The HTML report now has filtering. Type text into the Filter box on the
1069 index page, and only modules with that text in the name will be shown.
1070 Thanks, Danny Allen.
1071
1072 - The textual report and the HTML report used to report partial branches
1073 differently for no good reason. Now the text report's "missing branches"
1074 column is a "partial branches" column so that both reports show the same
1075 numbers. This closes `issue 342`_.
1076
1077 - If you specify a ``--rcfile`` that cannot be read, you will get an error
1078 message. Fixes `issue 343`_.
1079
1080 - The ``--debug`` switch can now be used on any command.
1081
1082 - You can now programmatically adjust the configuration of coverage.py by
1083 setting items on `Coverage.config` after construction.
1084
1085 - A module run with ``-m`` can be used as the argument to ``--source``, fixing
1086 `issue 328`_. Thanks, Buck Evan.
1087
1088 - The regex for matching exclusion pragmas has been fixed to allow more kinds
1089 of whitespace, fixing `issue 334`_.
1090
1091 - Made some PyPy-specific tweaks to improve speed under PyPy. Thanks, Alex
1092 Gaynor.
1093
1094 - In some cases, with a source file missing a final newline, coverage.py would
1095 count statements incorrectly. This is now fixed, closing `issue 293`_.
1096
1097 - The status.dat file that HTML reports use to avoid re-creating files that
1098 haven't changed is now a JSON file instead of a pickle file. This obviates
1099 `issue 287`_ and `issue 237`_.
1100
1101 .. _issue 237: https://bitbucket.org/ned/coveragepy/issues/237/htmlcov-with-corrupt-statusdat
1102 .. _issue 287: https://bitbucket.org/ned/coveragepy/issues/287/htmlpy-doesnt-specify-pickle-protocol
1103 .. _issue 293: https://bitbucket.org/ned/coveragepy/issues/293/number-of-statement-detection-wrong-if-no
1104 .. _issue 314: https://bitbucket.org/ned/coveragepy/issues/314/fail_under-param-not-working-in-coveragerc
1105 .. _issue 315: https://bitbucket.org/ned/coveragepy/issues/315/option-to-omit-empty-files-eg-__init__py
1106 .. _issue 328: https://bitbucket.org/ned/coveragepy/issues/328/misbehavior-in-run-source
1107 .. _issue 334: https://bitbucket.org/ned/coveragepy/issues/334/pragma-not-recognized-if-tab-character
1108 .. _issue 342: https://bitbucket.org/ned/coveragepy/issues/342/console-and-html-coverage-reports-differ
1109 .. _issue 343: https://bitbucket.org/ned/coveragepy/issues/343/an-explicitly-named-non-existent-config
1110
1111
1112 Version 4.0a1 --- 2014-09-27
1113 ----------------------------
1114
1115 - Python versions supported are now CPython 2.6, 2.7, 3.2, 3.3, and 3.4, and
1116 PyPy 2.2.
1117
1118 - Gevent, eventlet, and greenlet are now supported, closing `issue 149`_.
1119 The ``concurrency`` setting specifies the concurrency library in use. Huge
1120 thanks to Peter Portante for initial implementation, and to Joe Jevnik for
1121 the final insight that completed the work.
1122
1123 - Options are now also read from a setup.cfg file, if any. Sections are
1124 prefixed with "coverage:", so the ``[run]`` options will be read from the
1125 ``[coverage:run]`` section of setup.cfg. Finishes `issue 304`_.
1126
1127 - The ``report -m`` command can now show missing branches when reporting on
1128 branch coverage. Thanks, Steve Leonard. Closes `issue 230`_.
1129
1130 - The XML report now contains a <source> element, fixing `issue 94`_. Thanks
1131 Stan Hu.
1132
1133 - The class defined in the coverage module is now called ``Coverage`` instead
1134 of ``coverage``, though the old name still works, for backward compatibility.
1135
1136 - The ``fail-under`` value is now rounded the same as reported results,
1137 preventing paradoxical results, fixing `issue 284`_.
1138
1139 - The XML report will now create the output directory if need be, fixing
1140 `issue 285`_. Thanks, Chris Rose.
1141
1142 - HTML reports no longer raise UnicodeDecodeError if a Python file has
1143 undecodable characters, fixing `issue 303`_ and `issue 331`_.
1144
1145 - The annotate command will now annotate all files, not just ones relative to
1146 the current directory, fixing `issue 57`_.
1147
1148 - The coverage module no longer causes deprecation warnings on Python 3.4 by
1149 importing the imp module, fixing `issue 305`_.
1150
1151 - Encoding declarations in source files are only considered if they are truly
1152 comments. Thanks, Anthony Sottile.
1153
1154 .. _issue 57: https://bitbucket.org/ned/coveragepy/issues/57/annotate-command-fails-to-annotate-many
1155 .. _issue 94: https://bitbucket.org/ned/coveragepy/issues/94/coverage-xml-doesnt-produce-sources
1156 .. _issue 149: https://bitbucket.org/ned/coveragepy/issues/149/coverage-gevent-looks-broken
1157 .. _issue 230: https://bitbucket.org/ned/coveragepy/issues/230/show-line-no-for-missing-branches-in
1158 .. _issue 284: https://bitbucket.org/ned/coveragepy/issues/284/fail-under-should-show-more-precision
1159 .. _issue 285: https://bitbucket.org/ned/coveragepy/issues/285/xml-report-fails-if-output-file-directory
1160 .. _issue 303: https://bitbucket.org/ned/coveragepy/issues/303/unicodedecodeerror
1161 .. _issue 304: https://bitbucket.org/ned/coveragepy/issues/304/attempt-to-get-configuration-from-setupcfg
1162 .. _issue 305: https://bitbucket.org/ned/coveragepy/issues/305/pendingdeprecationwarning-the-imp-module
1163 .. _issue 331: https://bitbucket.org/ned/coveragepy/issues/331/failure-of-encoding-detection-on-python2
1164
1165
1166 .. _changes_371:
1167
1168 Version 3.7.1 --- 2013-12-13
1169 ----------------------------
1170
1171 - Improved the speed of HTML report generation by about 20%.
1172
1173 - Fixed the mechanism for finding OS-installed static files for the HTML report
1174 so that it will actually find OS-installed static files.
1175
1176
1177 .. _changes_37:
1178
1179 Version 3.7 --- 2013-10-06
1180 --------------------------
1181
1182 - Added the ``--debug`` switch to ``coverage run``. It accepts a list of
1183 options indicating the type of internal activity to log to stderr.
1184
1185 - Improved the branch coverage facility, fixing `issue 92`_ and `issue 175`_.
1186
1187 - Running code with ``coverage run -m`` now behaves more like Python does,
1188 setting sys.path properly, which fixes `issue 207`_ and `issue 242`_.
1189
1190 - Coverage.py can now run .pyc files directly, closing `issue 264`_.
1191
1192 - Coverage.py properly supports .pyw files, fixing `issue 261`_.
1193
1194 - Omitting files within a tree specified with the ``source`` option would
1195 cause them to be incorrectly marked as unexecuted, as described in
1196 `issue 218`_. This is now fixed.
1197
1198 - When specifying paths to alias together during data combining, you can now
1199 specify relative paths, fixing `issue 267`_.
1200
1201 - Most file paths can now be specified with username expansion (``~/src``, or
1202 ``~build/src``, for example), and with environment variable expansion
1203 (``build/$BUILDNUM/src``).
1204
1205 - Trying to create an XML report with no files to report on, would cause a
1206 ZeroDivideError, but no longer does, fixing `issue 250`_.
1207
1208 - When running a threaded program under the Python tracer, coverage.py no
1209 longer issues a spurious warning about the trace function changing: "Trace
1210 function changed, measurement is likely wrong: None." This fixes `issue
1211 164`_.
1212
1213 - Static files necessary for HTML reports are found in system-installed places,
1214 to ease OS-level packaging of coverage.py. Closes `issue 259`_.
1215
1216 - Source files with encoding declarations, but a blank first line, were not
1217 decoded properly. Now they are. Thanks, Roger Hu.
1218
1219 - The source kit now includes the ``__main__.py`` file in the root coverage
1220 directory, fixing `issue 255`_.
1221
1222 .. _issue 92: https://bitbucket.org/ned/coveragepy/issues/92/finally-clauses-arent-treated-properly-in
1223 .. _issue 164: https://bitbucket.org/ned/coveragepy/issues/164/trace-function-changed-warning-when-using
1224 .. _issue 175: https://bitbucket.org/ned/coveragepy/issues/175/branch-coverage-gets-confused-in-certain
1225 .. _issue 207: https://bitbucket.org/ned/coveragepy/issues/207/run-m-cannot-find-module-or-package-in
1226 .. _issue 242: https://bitbucket.org/ned/coveragepy/issues/242/running-a-two-level-package-doesnt-work
1227 .. _issue 218: https://bitbucket.org/ned/coveragepy/issues/218/run-command-does-not-respect-the-omit-flag
1228 .. _issue 250: https://bitbucket.org/ned/coveragepy/issues/250/uncaught-zerodivisionerror-when-generating
1229 .. _issue 255: https://bitbucket.org/ned/coveragepy/issues/255/directory-level-__main__py-not-included-in
1230 .. _issue 259: https://bitbucket.org/ned/coveragepy/issues/259/allow-use-of-system-installed-third-party
1231 .. _issue 261: https://bitbucket.org/ned/coveragepy/issues/261/pyw-files-arent-reported-properly
1232 .. _issue 264: https://bitbucket.org/ned/coveragepy/issues/264/coverage-wont-run-pyc-files
1233 .. _issue 267: https://bitbucket.org/ned/coveragepy/issues/267/relative-path-aliases-dont-work
1234
1235
1236 .. _changes_36:
1237
1238 Version 3.6 --- 2013-01-05
1239 --------------------------
1240
1241 - Added a page to the docs about troublesome situations, closing `issue 226`_,
1242 and added some info to the TODO file, closing `issue 227`_.
1243
1244 .. _issue 226: https://bitbucket.org/ned/coveragepy/issues/226/make-readme-section-to-describe-when
1245 .. _issue 227: https://bitbucket.org/ned/coveragepy/issues/227/update-todo
1246
1247
1248 Version 3.6b3 --- 2012-12-29
1249 ----------------------------
1250
1251 - Beta 2 broke the nose plugin. It's fixed again, closing `issue 224`_.
1252
1253 .. _issue 224: https://bitbucket.org/ned/coveragepy/issues/224/36b2-breaks-nosexcover
1254
1255
1256 Version 3.6b2 --- 2012-12-23
1257 ----------------------------
1258
1259 - Coverage.py runs on Python 2.3 and 2.4 again. It was broken in 3.6b1.
1260
1261 - The C extension is optionally compiled using a different more widely-used
1262 technique, taking another stab at fixing `issue 80`_ once and for all.
1263
1264 - Combining data files would create entries for phantom files if used with
1265 ``source`` and path aliases. It no longer does.
1266
1267 - ``debug sys`` now shows the configuration file path that was read.
1268
1269 - If an oddly-behaved package claims that code came from an empty-string
1270 file name, coverage.py no longer associates it with the directory name,
1271 fixing `issue 221`_.
1272
1273 .. _issue 221: https://bitbucket.org/ned/coveragepy/issues/221/coveragepy-incompatible-with-pyratemp
1274
1275
1276 Version 3.6b1 --- 2012-11-28
1277 ----------------------------
1278
1279 - Wildcards in ``include=`` and ``omit=`` arguments were not handled properly
1280 in reporting functions, though they were when running. Now they are handled
1281 uniformly, closing `issue 143`_ and `issue 163`_. **NOTE**: it is possible
1282 that your configurations may now be incorrect. If you use ``include`` or
1283 ``omit`` during reporting, whether on the command line, through the API, or
1284 in a configuration file, please check carefully that you were not relying on
1285 the old broken behavior.
1286
1287 - The **report**, **html**, and **xml** commands now accept a ``--fail-under``
1288 switch that indicates in the exit status whether the coverage percentage was
1289 less than a particular value. Closes `issue 139`_.
1290
1291 - The reporting functions coverage.report(), coverage.html_report(), and
1292 coverage.xml_report() now all return a float, the total percentage covered
1293 measurement.
1294
1295 - The HTML report's title can now be set in the configuration file, with the
1296 ``--title`` switch on the command line, or via the API.
1297
1298 - Configuration files now support substitution of environment variables, using
1299 syntax like ``${WORD}``. Closes `issue 97`_.
1300
1301 - Embarrassingly, the ``[xml] output=`` setting in the .coveragerc file simply
1302 didn't work. Now it does.
1303
1304 - The XML report now consistently uses file names for the file name attribute,
1305 rather than sometimes using module names. Fixes `issue 67`_.
1306 Thanks, Marcus Cobden.
1307
1308 - Coverage percentage metrics are now computed slightly differently under
1309 branch coverage. This means that completely unexecuted files will now
1310 correctly have 0% coverage, fixing `issue 156`_. This also means that your
1311 total coverage numbers will generally now be lower if you are measuring
1312 branch coverage.
1313
1314 - When installing, now in addition to creating a "coverage" command, two new
1315 aliases are also installed. A "coverage2" or "coverage3" command will be
1316 created, depending on whether you are installing in Python 2.x or 3.x.
1317 A "coverage-X.Y" command will also be created corresponding to your specific
1318 version of Python. Closes `issue 111`_.
1319
1320 - The coverage.py installer no longer tries to bootstrap setuptools or
1321 Distribute. You must have one of them installed first, as `issue 202`_
1322 recommended.
1323
1324 - The coverage.py kit now includes docs (closing `issue 137`_) and tests.
1325
1326 - On Windows, files are now reported in their correct case, fixing `issue 89`_
1327 and `issue 203`_.
1328
1329 - If a file is missing during reporting, the path shown in the error message
1330 is now correct, rather than an incorrect path in the current directory.
1331 Fixes `issue 60`_.
1332
1333 - Running an HTML report in Python 3 in the same directory as an old Python 2
1334 HTML report would fail with a UnicodeDecodeError. This issue (`issue 193`_)
1335 is now fixed.
1336
1337 - Fixed yet another error trying to parse non-Python files as Python, this
1338 time an IndentationError, closing `issue 82`_ for the fourth time...
1339
1340 - If `coverage xml` fails because there is no data to report, it used to
1341 create a zero-length XML file. Now it doesn't, fixing `issue 210`_.
1342
1343 - Jython files now work with the ``--source`` option, fixing `issue 100`_.
1344
1345 - Running coverage.py under a debugger is unlikely to work, but it shouldn't
1346 fail with "TypeError: 'NoneType' object is not iterable". Fixes `issue
1347 201`_.
1348
1349 - On some Linux distributions, when installed with the OS package manager,
1350 coverage.py would report its own code as part of the results. Now it won't,
1351 fixing `issue 214`_, though this will take some time to be repackaged by the
1352 operating systems.
1353
1354 - Docstrings for the legacy singleton methods are more helpful. Thanks Marius
1355 Gedminas. Closes `issue 205`_.
1356
1357 - The pydoc tool can now show documentation for the class `coverage.coverage`.
1358 Closes `issue 206`_.
1359
1360 - Added a page to the docs about contributing to coverage.py, closing
1361 `issue 171`_.
1362
1363 - When coverage.py ended unsuccessfully, it may have reported odd errors like
1364 ``'NoneType' object has no attribute 'isabs'``. It no longer does,
1365 so kiss `issue 153`_ goodbye.
1366
1367 .. _issue 60: https://bitbucket.org/ned/coveragepy/issues/60/incorrect-path-to-orphaned-pyc-files
1368 .. _issue 67: https://bitbucket.org/ned/coveragepy/issues/67/xml-report-filenames-may-be-generated
1369 .. _issue 89: https://bitbucket.org/ned/coveragepy/issues/89/on-windows-all-packages-are-reported-in
1370 .. _issue 97: https://bitbucket.org/ned/coveragepy/issues/97/allow-environment-variables-to-be
1371 .. _issue 100: https://bitbucket.org/ned/coveragepy/issues/100/source-directive-doesnt-work-for-packages
1372 .. _issue 111: https://bitbucket.org/ned/coveragepy/issues/111/when-installing-coverage-with-pip-not
1373 .. _issue 137: https://bitbucket.org/ned/coveragepy/issues/137/provide-docs-with-source-distribution
1374 .. _issue 139: https://bitbucket.org/ned/coveragepy/issues/139/easy-check-for-a-certain-coverage-in-tests
1375 .. _issue 143: https://bitbucket.org/ned/coveragepy/issues/143/omit-doesnt-seem-to-work-in-coverage
1376 .. _issue 153: https://bitbucket.org/ned/coveragepy/issues/153/non-existent-filename-triggers
1377 .. _issue 156: https://bitbucket.org/ned/coveragepy/issues/156/a-completely-unexecuted-file-shows-14
1378 .. _issue 163: https://bitbucket.org/ned/coveragepy/issues/163/problem-with-include-and-omit-filename
1379 .. _issue 171: https://bitbucket.org/ned/coveragepy/issues/171/how-to-contribute-and-run-tests
1380 .. _issue 193: https://bitbucket.org/ned/coveragepy/issues/193/unicodedecodeerror-on-htmlpy
1381 .. _issue 201: https://bitbucket.org/ned/coveragepy/issues/201/coverage-using-django-14-with-pydb-on
1382 .. _issue 202: https://bitbucket.org/ned/coveragepy/issues/202/get-rid-of-ez_setuppy-and
1383 .. _issue 203: https://bitbucket.org/ned/coveragepy/issues/203/duplicate-filenames-reported-when-filename
1384 .. _issue 205: https://bitbucket.org/ned/coveragepy/issues/205/make-pydoc-coverage-more-friendly
1385 .. _issue 206: https://bitbucket.org/ned/coveragepy/issues/206/pydoc-coveragecoverage-fails-with-an-error
1386 .. _issue 210: https://bitbucket.org/ned/coveragepy/issues/210/if-theres-no-coverage-data-coverage-xml
1387 .. _issue 214: https://bitbucket.org/ned/coveragepy/issues/214/coveragepy-measures-itself-on-precise
1388
1389
1390 .. _changes_353:
1391
1392 Version 3.5.3 --- 2012-09-29
1393 ----------------------------
1394
1395 - Line numbers in the HTML report line up better with the source lines, fixing
1396 `issue 197`_, thanks Marius Gedminas.
1397
1398 - When specifying a directory as the source= option, the directory itself no
1399 longer needs to have a ``__init__.py`` file, though its sub-directories do,
1400 to be considered as source files.
1401
1402 - Files encoded as UTF-8 with a BOM are now properly handled, fixing
1403 `issue 179`_. Thanks, Pablo Carballo.
1404
1405 - Fixed more cases of non-Python files being reported as Python source, and
1406 then not being able to parse them as Python. Closes `issue 82`_ (again).
1407 Thanks, Julian Berman.
1408
1409 - Fixed memory leaks under Python 3, thanks, Brett Cannon. Closes `issue 147`_.
1410
1411 - Optimized .pyo files may not have been handled correctly, `issue 195`_.
1412 Thanks, Marius Gedminas.
1413
1414 - Certain unusually named file paths could have been mangled during reporting,
1415 `issue 194`_. Thanks, Marius Gedminas.
1416
1417 - Try to do a better job of the impossible task of detecting when we can't
1418 build the C extension, fixing `issue 183`_.
1419
1420 - Testing is now done with `tox`_, thanks, Marc Abramowitz.
1421
1422 .. _issue 147: https://bitbucket.org/ned/coveragepy/issues/147/massive-memory-usage-by-ctracer
1423 .. _issue 179: https://bitbucket.org/ned/coveragepy/issues/179/htmlreporter-fails-when-source-file-is
1424 .. _issue 183: https://bitbucket.org/ned/coveragepy/issues/183/install-fails-for-python-23
1425 .. _issue 194: https://bitbucket.org/ned/coveragepy/issues/194/filelocatorrelative_filename-could-mangle
1426 .. _issue 195: https://bitbucket.org/ned/coveragepy/issues/195/pyo-file-handling-in-codeunit
1427 .. _issue 197: https://bitbucket.org/ned/coveragepy/issues/197/line-numbers-in-html-report-do-not-align
1428 .. _tox: https://tox.readthedocs.io/
1429
1430
1431 .. _changes_352:
1432
1433 Version 3.5.2 --- 2012-05-04
1434 ----------------------------
1435
1436 No changes since 3.5.2.b1
1437
1438
1439 Version 3.5.2b1 --- 2012-04-29
1440 ------------------------------
1441
1442 - The HTML report has slightly tweaked controls: the buttons at the top of
1443 the page are color-coded to the source lines they affect.
1444
1445 - Custom CSS can be applied to the HTML report by specifying a CSS file as
1446 the ``extra_css`` configuration value in the ``[html]`` section.
1447
1448 - Source files with custom encodings declared in a comment at the top are now
1449 properly handled during reporting on Python 2. Python 3 always handled them
1450 properly. This fixes `issue 157`_.
1451
1452 - Backup files left behind by editors are no longer collected by the source=
1453 option, fixing `issue 168`_.
1454
1455 - If a file doesn't parse properly as Python, we don't report it as an error
1456 if the file name seems like maybe it wasn't meant to be Python. This is a
1457 pragmatic fix for `issue 82`_.
1458
1459 - The ``-m`` switch on ``coverage report``, which includes missing line numbers
1460 in the summary report, can now be specified as ``show_missing`` in the
1461 config file. Closes `issue 173`_.
1462
1463 - When running a module with ``coverage run -m <modulename>``, certain details
1464 of the execution environment weren't the same as for
1465 ``python -m <modulename>``. This had the unfortunate side-effect of making
1466 ``coverage run -m unittest discover`` not work if you had tests in a
1467 directory named "test". This fixes `issue 155`_ and `issue 142`_.
1468
1469 - Now the exit status of your product code is properly used as the process
1470 status when running ``python -m coverage run ...``. Thanks, JT Olds.
1471
1472 - When installing into pypy, we no longer attempt (and fail) to compile
1473 the C tracer function, closing `issue 166`_.
1474
1475 .. _issue 142: https://bitbucket.org/ned/coveragepy/issues/142/executing-python-file-syspath-is-replaced
1476 .. _issue 155: https://bitbucket.org/ned/coveragepy/issues/155/cant-use-coverage-run-m-unittest-discover
1477 .. _issue 157: https://bitbucket.org/ned/coveragepy/issues/157/chokes-on-source-files-with-non-utf-8
1478 .. _issue 166: https://bitbucket.org/ned/coveragepy/issues/166/dont-try-to-compile-c-extension-on-pypy
1479 .. _issue 168: https://bitbucket.org/ned/coveragepy/issues/168/dont-be-alarmed-by-emacs-droppings
1480 .. _issue 173: https://bitbucket.org/ned/coveragepy/issues/173/theres-no-way-to-specify-show-missing-in
1481
1482
1483 .. _changes_351:
1484
1485 Version 3.5.1 --- 2011-09-23
1486 ----------------------------
1487
1488 - The ``[paths]`` feature unfortunately didn't work in real world situations
1489 where you wanted to, you know, report on the combined data. Now all paths
1490 stored in the combined file are canonicalized properly.
1491
1492
1493 Version 3.5.1b1 --- 2011-08-28
1494 ------------------------------
1495
1496 - When combining data files from parallel runs, you can now instruct
1497 coverage.py about which directories are equivalent on different machines. A
1498 ``[paths]`` section in the configuration file lists paths that are to be
1499 considered equivalent. Finishes `issue 17`_.
1500
1501 - for-else constructs are understood better, and don't cause erroneous partial
1502 branch warnings. Fixes `issue 122`_.
1503
1504 - Branch coverage for ``with`` statements is improved, fixing `issue 128`_.
1505
1506 - The number of partial branches reported on the HTML summary page was
1507 different than the number reported on the individual file pages. This is
1508 now fixed.
1509
1510 - An explicit include directive to measure files in the Python installation
1511 wouldn't work because of the standard library exclusion. Now the include
1512 directive takes precedence, and the files will be measured. Fixes
1513 `issue 138`_.
1514
1515 - The HTML report now handles Unicode characters in Python source files
1516 properly. This fixes `issue 124`_ and `issue 144`_. Thanks, Devin
1517 Jeanpierre.
1518
1519 - In order to help the core developers measure the test coverage of the
1520 standard library, Brandon Rhodes devised an aggressive hack to trick Python
1521 into running some coverage.py code before anything else in the process.
1522 See the coverage/fullcoverage directory if you are interested.
1523
1524 .. _issue 17: https://bitbucket.org/ned/coveragepy/issues/17/support-combining-coverage-data-from
1525 .. _issue 122: https://bitbucket.org/ned/coveragepy/issues/122/for-else-always-reports-missing-branch
1526 .. _issue 124: https://bitbucket.org/ned/coveragepy/issues/124/no-arbitrary-unicode-in-html-reports-in
1527 .. _issue 128: https://bitbucket.org/ned/coveragepy/issues/128/branch-coverage-of-with-statement-in-27
1528 .. _issue 138: https://bitbucket.org/ned/coveragepy/issues/138/include-should-take-precedence-over-is
1529 .. _issue 144: https://bitbucket.org/ned/coveragepy/issues/144/failure-generating-html-output-for
1530
1531
1532 .. _changes_35:
1533
1534 Version 3.5 --- 2011-06-29
1535 --------------------------
1536
1537 - The HTML report hotkeys now behave slightly differently when the current
1538 chunk isn't visible at all: a chunk on the screen will be selected,
1539 instead of the old behavior of jumping to the literal next chunk.
1540 The hotkeys now work in Google Chrome. Thanks, Guido van Rossum.
1541
1542
1543 Version 3.5b1 --- 2011-06-05
1544 ----------------------------
1545
1546 - The HTML report now has hotkeys. Try ``n``, ``s``, ``m``, ``x``, ``b``,
1547 ``p``, and ``c`` on the overview page to change the column sorting.
1548 On a file page, ``r``, ``m``, ``x``, and ``p`` toggle the run, missing,
1549 excluded, and partial line markings. You can navigate the highlighted
1550 sections of code by using the ``j`` and ``k`` keys for next and previous.
1551 The ``1`` (one) key jumps to the first highlighted section in the file,
1552 and ``0`` (zero) scrolls to the top of the file.
1553
1554 - The ``--omit`` and ``--include`` switches now interpret their values more
1555 usefully. If the value starts with a wildcard character, it is used as-is.
1556 If it does not, it is interpreted relative to the current directory.
1557 Closes `issue 121`_.
1558
1559 - Partial branch warnings can now be pragma'd away. The configuration option
1560 ``partial_branches`` is a list of regular expressions. Lines matching any of
1561 those expressions will never be marked as a partial branch. In addition,
1562 there's a built-in list of regular expressions marking statements which
1563 should never be marked as partial. This list includes ``while True:``,
1564 ``while 1:``, ``if 1:``, and ``if 0:``.
1565
1566 - The ``coverage()`` constructor accepts single strings for the ``omit=`` and
1567 ``include=`` arguments, adapting to a common error in programmatic use.
1568
1569 - Modules can now be run directly using ``coverage run -m modulename``, to
1570 mirror Python's ``-m`` flag. Closes `issue 95`_, thanks, Brandon Rhodes.
1571
1572 - ``coverage run`` didn't emulate Python accurately in one small detail: the
1573 current directory inserted into ``sys.path`` was relative rather than
1574 absolute. This is now fixed.
1575
1576 - HTML reporting is now incremental: a record is kept of the data that
1577 produced the HTML reports, and only files whose data has changed will
1578 be generated. This should make most HTML reporting faster.
1579
1580 - Pathological code execution could disable the trace function behind our
1581 backs, leading to incorrect code measurement. Now if this happens,
1582 coverage.py will issue a warning, at least alerting you to the problem.
1583 Closes `issue 93`_. Thanks to Marius Gedminas for the idea.
1584
1585 - The C-based trace function now behaves properly when saved and restored
1586 with ``sys.gettrace()`` and ``sys.settrace()``. This fixes `issue 125`_
1587 and `issue 123`_. Thanks, Devin Jeanpierre.
1588
1589 - Source files are now opened with Python 3.2's ``tokenize.open()`` where
1590 possible, to get the best handling of Python source files with encodings.
1591 Closes `issue 107`_, thanks, Brett Cannon.
1592
1593 - Syntax errors in supposed Python files can now be ignored during reporting
1594 with the ``-i`` switch just like other source errors. Closes `issue 115`_.
1595
1596 - Installation from source now succeeds on machines without a C compiler,
1597 closing `issue 80`_.
1598
1599 - Coverage.py can now be run directly from a working tree by specifying
1600 the directory name to python: ``python coverage_py_working_dir run ...``.
1601 Thanks, Brett Cannon.
1602
1603 - A little bit of Jython support: `coverage run` can now measure Jython
1604 execution by adapting when $py.class files are traced. Thanks, Adi Roiban.
1605 Jython still doesn't provide the Python libraries needed to make
1606 coverage reporting work, unfortunately.
1607
1608 - Internally, files are now closed explicitly, fixing `issue 104`_. Thanks,
1609 Brett Cannon.
1610
1611 .. _issue 80: https://bitbucket.org/ned/coveragepy/issues/80/is-there-a-duck-typing-way-to-know-we-cant
1612 .. _issue 93: https://bitbucket.org/ned/coveragepy/issues/93/copying-a-mock-object-breaks-coverage
1613 .. _issue 95: https://bitbucket.org/ned/coveragepy/issues/95/run-subcommand-should-take-a-module-name
1614 .. _issue 104: https://bitbucket.org/ned/coveragepy/issues/104/explicitly-close-files
1615 .. _issue 107: https://bitbucket.org/ned/coveragepy/issues/107/codeparser-not-opening-source-files-with
1616 .. _issue 115: https://bitbucket.org/ned/coveragepy/issues/115/fail-gracefully-when-reporting-on-file
1617 .. _issue 121: https://bitbucket.org/ned/coveragepy/issues/121/filename-patterns-are-applied-stupidly
1618 .. _issue 123: https://bitbucket.org/ned/coveragepy/issues/123/pyeval_settrace-used-in-way-that-breaks
1619 .. _issue 125: https://bitbucket.org/ned/coveragepy/issues/125/coverage-removes-decoratortoolss-tracing
1620
1621
1622 .. _changes_34:
1623
1624 Version 3.4 --- 2010-09-19
1625 --------------------------
1626
1627 - The XML report is now sorted by package name, fixing `issue 88`_.
1628
1629 - Programs that exited with ``sys.exit()`` with no argument weren't handled
1630 properly, producing a coverage.py stack trace. That is now fixed.
1631
1632 .. _issue 88: https://bitbucket.org/ned/coveragepy/issues/88/xml-report-lists-packages-in-random-order
1633
1634
1635 Version 3.4b2 --- 2010-09-06
1636 ----------------------------
1637
1638 - Completely unexecuted files can now be included in coverage results, reported
1639 as 0% covered. This only happens if the --source option is specified, since
1640 coverage.py needs guidance about where to look for source files.
1641
1642 - The XML report output now properly includes a percentage for branch coverage,
1643 fixing `issue 65`_ and `issue 81`_.
1644
1645 - Coverage percentages are now displayed uniformly across reporting methods.
1646 Previously, different reports could round percentages differently. Also,
1647 percentages are only reported as 0% or 100% if they are truly 0 or 100, and
1648 are rounded otherwise. Fixes `issue 41`_ and `issue 70`_.
1649
1650 - The precision of reported coverage percentages can be set with the
1651 ``[report] precision`` config file setting. Completes `issue 16`_.
1652
1653 - Threads derived from ``threading.Thread`` with an overridden `run` method
1654 would report no coverage for the `run` method. This is now fixed, closing
1655 `issue 85`_.
1656
1657 .. _issue 16: https://bitbucket.org/ned/coveragepy/issues/16/allow-configuration-of-accuracy-of-percentage-totals
1658 .. _issue 41: https://bitbucket.org/ned/coveragepy/issues/41/report-says-100-when-it-isnt-quite-there
1659 .. _issue 65: https://bitbucket.org/ned/coveragepy/issues/65/branch-option-not-reported-in-cobertura
1660 .. _issue 70: https://bitbucket.org/ned/coveragepy/issues/70/text-report-and-html-report-disagree-on-coverage
1661 .. _issue 81: https://bitbucket.org/ned/coveragepy/issues/81/xml-report-does-not-have-condition-coverage-attribute-for-lines-with-a
1662 .. _issue 85: https://bitbucket.org/ned/coveragepy/issues/85/threadrun-isnt-measured
1663
1664
1665 Version 3.4b1 --- 2010-08-21
1666 ----------------------------
1667
1668 - BACKWARD INCOMPATIBILITY: the ``--omit`` and ``--include`` switches now take
1669 file patterns rather than file prefixes, closing `issue 34`_ and `issue 36`_.
1670
1671 - BACKWARD INCOMPATIBILITY: the `omit_prefixes` argument is gone throughout
1672 coverage.py, replaced with `omit`, a list of file name patterns suitable for
1673 `fnmatch`. A parallel argument `include` controls what files are included.
1674
1675 - The run command now has a ``--source`` switch, a list of directories or
1676 module names. If provided, coverage.py will only measure execution in those
1677 source files.
1678
1679 - Various warnings are printed to stderr for problems encountered during data
1680 measurement: if a ``--source`` module has no Python source to measure, or is
1681 never encountered at all, or if no data is collected.
1682
1683 - The reporting commands (report, annotate, html, and xml) now have an
1684 ``--include`` switch to restrict reporting to modules matching those file
1685 patterns, similar to the existing ``--omit`` switch. Thanks, Zooko.
1686
1687 - The run command now supports ``--include`` and ``--omit`` to control what
1688 modules it measures. This can speed execution and reduce the amount of data
1689 during reporting. Thanks Zooko.
1690
1691 - Since coverage.py 3.1, using the Python trace function has been slower than
1692 it needs to be. A cache of tracing decisions was broken, but has now been
1693 fixed.
1694
1695 - Python 2.7 and 3.2 have introduced new opcodes that are now supported.
1696
1697 - Python files with no statements, for example, empty ``__init__.py`` files,
1698 are now reported as having zero statements instead of one. Fixes `issue 1`_.
1699
1700 - Reports now have a column of missed line counts rather than executed line
1701 counts, since developers should focus on reducing the missed lines to zero,
1702 rather than increasing the executed lines to varying targets. Once
1703 suggested, this seemed blindingly obvious.
1704
1705 - Line numbers in HTML source pages are clickable, linking directly to that
1706 line, which is highlighted on arrival. Added a link back to the index page
1707 at the bottom of each HTML page.
1708
1709 - Programs that call ``os.fork`` will properly collect data from both the child
1710 and parent processes. Use ``coverage run -p`` to get two data files that can
1711 be combined with ``coverage combine``. Fixes `issue 56`_.
1712
1713 - Coverage.py is now runnable as a module: ``python -m coverage``. Thanks,
1714 Brett Cannon.
1715
1716 - When measuring code running in a virtualenv, most of the system library was
1717 being measured when it shouldn't have been. This is now fixed.
1718
1719 - Doctest text files are no longer recorded in the coverage data, since they
1720 can't be reported anyway. Fixes `issue 52`_ and `issue 61`_.
1721
1722 - Jinja HTML templates compile into Python code using the HTML file name,
1723 which confused coverage.py. Now these files are no longer traced, fixing
1724 `issue 82`_.
1725
1726 - Source files can have more than one dot in them (foo.test.py), and will be
1727 treated properly while reporting. Fixes `issue 46`_.
1728
1729 - Source files with DOS line endings are now properly tokenized for syntax
1730 coloring on non-DOS machines. Fixes `issue 53`_.
1731
1732 - Unusual code structure that confused exits from methods with exits from
1733 classes is now properly analyzed. See `issue 62`_.
1734
1735 - Asking for an HTML report with no files now shows a nice error message rather
1736 than a cryptic failure ('int' object is unsubscriptable). Fixes `issue 59`_.
1737
1738 .. _issue 1: https://bitbucket.org/ned/coveragepy/issues/1/empty-__init__py-files-are-reported-as-1-executable
1739 .. _issue 34: https://bitbucket.org/ned/coveragepy/issues/34/enhanced-omit-globbing-handling
1740 .. _issue 36: https://bitbucket.org/ned/coveragepy/issues/36/provide-regex-style-omit
1741 .. _issue 46: https://bitbucket.org/ned/coveragepy/issues/46
1742 .. _issue 53: https://bitbucket.org/ned/coveragepy/issues/53
1743 .. _issue 52: https://bitbucket.org/ned/coveragepy/issues/52/doctesttestfile-confuses-source-detection
1744 .. _issue 56: https://bitbucket.org/ned/coveragepy/issues/56
1745 .. _issue 61: https://bitbucket.org/ned/coveragepy/issues/61/annotate-i-doesnt-work
1746 .. _issue 62: https://bitbucket.org/ned/coveragepy/issues/62
1747 .. _issue 59: https://bitbucket.org/ned/coveragepy/issues/59/html-report-fails-with-int-object-is
1748 .. _issue 82: https://bitbucket.org/ned/coveragepy/issues/82/tokenerror-when-generating-html-report
1749
1750
1751 .. _changes_331:
1752
1753 Version 3.3.1 --- 2010-03-06
1754 ----------------------------
1755
1756 - Using `parallel=True` in .coveragerc file prevented reporting, but now does
1757 not, fixing `issue 49`_.
1758
1759 - When running your code with "coverage run", if you call `sys.exit()`,
1760 coverage.py will exit with that status code, fixing `issue 50`_.
1761
1762 .. _issue 49: https://bitbucket.org/ned/coveragepy/issues/49
1763 .. _issue 50: https://bitbucket.org/ned/coveragepy/issues/50
1764
1765
1766 .. _changes_33:
1767
1768 Version 3.3 --- 2010-02-24
1769 --------------------------
1770
1771 - Settings are now read from a .coveragerc file. A specific file can be
1772 specified on the command line with --rcfile=FILE. The name of the file can
1773 be programmatically set with the `config_file` argument to the coverage()
1774 constructor, or reading a config file can be disabled with
1775 `config_file=False`.
1776
1777 - Fixed a problem with nested loops having their branch possibilities
1778 mischaracterized: `issue 39`_.
1779
1780 - Added coverage.process_start to enable coverage measurement when Python
1781 starts.
1782
1783 - Parallel data file names now have a random number appended to them in
1784 addition to the machine name and process id.
1785
1786 - Parallel data files combined with "coverage combine" are deleted after
1787 they're combined, to clean up unneeded files. Fixes `issue 40`_.
1788
1789 - Exceptions thrown from product code run with "coverage run" are now displayed
1790 without internal coverage.py frames, so the output is the same as when the
1791 code is run without coverage.py.
1792
1793 - The `data_suffix` argument to the coverage constructor is now appended with
1794 an added dot rather than simply appended, so that .coveragerc files will not
1795 be confused for data files.
1796
1797 - Python source files that don't end with a newline can now be executed, fixing
1798 `issue 47`_.
1799
1800 - Added an AUTHORS.txt file.
1801
1802 .. _issue 39: https://bitbucket.org/ned/coveragepy/issues/39
1803 .. _issue 40: https://bitbucket.org/ned/coveragepy/issues/40
1804 .. _issue 47: https://bitbucket.org/ned/coveragepy/issues/47
1805
1806
1807 .. _changes_32:
1808
1809 Version 3.2 --- 2009-12-05
1810 --------------------------
1811
1812 - Added a ``--version`` option on the command line.
1813
1814
1815 Version 3.2b4 --- 2009-12-01
1816 ----------------------------
1817
1818 - Branch coverage improvements:
1819
1820 - The XML report now includes branch information.
1821
1822 - Click-to-sort HTML report columns are now persisted in a cookie. Viewing
1823 a report will sort it first the way you last had a coverage report sorted.
1824 Thanks, `Chris Adams`_.
1825
1826 - On Python 3.x, setuptools has been replaced by `Distribute`_.
1827
1828 .. _Distribute: https://pypi.python.org/pypi/distribute
1829
1830
1831 Version 3.2b3 --- 2009-11-23
1832 ----------------------------
1833
1834 - Fixed a memory leak in the C tracer that was introduced in 3.2b1.
1835
1836 - Branch coverage improvements:
1837
1838 - Branches to excluded code are ignored.
1839
1840 - The table of contents in the HTML report is now sortable: click the headers
1841 on any column. Thanks, `Chris Adams`_.
1842
1843 .. _Chris Adams: http://chris.improbable.org
1844
1845
1846 Version 3.2b2 --- 2009-11-19
1847 ----------------------------
1848
1849 - Branch coverage improvements:
1850
1851 - Classes are no longer incorrectly marked as branches: `issue 32`_.
1852
1853 - "except" clauses with types are no longer incorrectly marked as branches:
1854 `issue 35`_.
1855
1856 - Fixed some problems syntax coloring sources with line continuations and
1857 source with tabs: `issue 30`_ and `issue 31`_.
1858
1859 - The --omit option now works much better than before, fixing `issue 14`_ and
1860 `issue 33`_. Thanks, Danek Duvall.
1861
1862 .. _issue 14: https://bitbucket.org/ned/coveragepy/issues/14
1863 .. _issue 30: https://bitbucket.org/ned/coveragepy/issues/30
1864 .. _issue 31: https://bitbucket.org/ned/coveragepy/issues/31
1865 .. _issue 32: https://bitbucket.org/ned/coveragepy/issues/32
1866 .. _issue 33: https://bitbucket.org/ned/coveragepy/issues/33
1867 .. _issue 35: https://bitbucket.org/ned/coveragepy/issues/35
1868
1869
1870 Version 3.2b1 --- 2009-11-10
1871 ----------------------------
1872
1873 - Branch coverage!
1874
1875 - XML reporting has file paths that let Cobertura find the source code.
1876
1877 - The tracer code has changed, it's a few percent faster.
1878
1879 - Some exceptions reported by the command line interface have been cleaned up
1880 so that tracebacks inside coverage.py aren't shown. Fixes `issue 23`_.
1881
1882 .. _issue 23: https://bitbucket.org/ned/coveragepy/issues/23
1883
1884
1885 .. _changes_31:
1886
1887 Version 3.1 --- 2009-10-04
1888 --------------------------
1889
1890 - Source code can now be read from eggs. Thanks, Ross Lawley. Fixes
1891 `issue 25`_.
1892
1893 .. _issue 25: https://bitbucket.org/ned/coveragepy/issues/25
1894
1895
1896 Version 3.1b1 --- 2009-09-27
1897 ----------------------------
1898
1899 - Python 3.1 is now supported.
1900
1901 - Coverage.py has a new command line syntax with sub-commands. This expands
1902 the possibilities for adding features and options in the future. The old
1903 syntax is still supported. Try "coverage help" to see the new commands.
1904 Thanks to Ben Finney for early help.
1905
1906 - Added an experimental "coverage xml" command for producing coverage reports
1907 in a Cobertura-compatible XML format. Thanks, Bill Hart.
1908
1909 - Added the --timid option to enable a simpler slower trace function that works
1910 for DecoratorTools projects, including TurboGears. Fixed `issue 12`_ and
1911 `issue 13`_.
1912
1913 - HTML reports show modules from other directories. Fixed `issue 11`_.
1914
1915 - HTML reports now display syntax-colored Python source.
1916
1917 - Programs that change directory will still write .coverage files in the
1918 directory where execution started. Fixed `issue 24`_.
1919
1920 - Added a "coverage debug" command for getting diagnostic information about the
1921 coverage.py installation.
1922
1923 .. _issue 11: https://bitbucket.org/ned/coveragepy/issues/11
1924 .. _issue 12: https://bitbucket.org/ned/coveragepy/issues/12
1925 .. _issue 13: https://bitbucket.org/ned/coveragepy/issues/13
1926 .. _issue 24: https://bitbucket.org/ned/coveragepy/issues/24
1927
1928
1929 .. _changes_301:
1930
1931 Version 3.0.1 --- 2009-07-07
1932 ----------------------------
1933
1934 - Removed the recursion limit in the tracer function. Previously, code that
1935 ran more than 500 frames deep would crash. Fixed `issue 9`_.
1936
1937 - Fixed a bizarre problem involving pyexpat, whereby lines following XML parser
1938 invocations could be overlooked. Fixed `issue 10`_.
1939
1940 - On Python 2.3, coverage.py could mis-measure code with exceptions being
1941 raised. This is now fixed.
1942
1943 - The coverage.py code itself will now not be measured by coverage.py, and no
1944 coverage.py modules will be mentioned in the nose --with-cover plug-in.
1945 Fixed `issue 8`_.
1946
1947 - When running source files, coverage.py now opens them in universal newline
1948 mode just like Python does. This lets it run Windows files on Mac, for
1949 example.
1950
1951 .. _issue 9: https://bitbucket.org/ned/coveragepy/issues/9
1952 .. _issue 10: https://bitbucket.org/ned/coveragepy/issues/10
1953 .. _issue 8: https://bitbucket.org/ned/coveragepy/issues/8
1954
1955
1956 .. _changes_30:
1957
1958 Version 3.0 --- 2009-06-13
1959 --------------------------
1960
1961 - Fixed the way the Python library was ignored. Too much code was being
1962 excluded the old way.
1963
1964 - Tabs are now properly converted in HTML reports. Previously indentation was
1965 lost. Fixed `issue 6`_.
1966
1967 - Nested modules now get a proper flat_rootname. Thanks, Christian Heimes.
1968
1969 .. _issue 6: https://bitbucket.org/ned/coveragepy/issues/6
1970
1971
1972 Version 3.0b3 --- 2009-05-16
1973 ----------------------------
1974
1975 - Added parameters to coverage.__init__ for options that had been set on the
1976 coverage object itself.
1977
1978 - Added clear_exclude() and get_exclude_list() methods for programmatic
1979 manipulation of the exclude regexes.
1980
1981 - Added coverage.load() to read previously-saved data from the data file.
1982
1983 - Improved the finding of code files. For example, .pyc files that have been
1984 installed after compiling are now located correctly. Thanks, Detlev
1985 Offenbach.
1986
1987 - When using the object API (that is, constructing a coverage() object), data
1988 is no longer saved automatically on process exit. You can re-enable it with
1989 the auto_data=True parameter on the coverage() constructor. The module-level
1990 interface still uses automatic saving.
1991
1992
1993 Version 3.0b --- 2009-04-30
1994 ---------------------------
1995
1996 HTML reporting, and continued refactoring.
1997
1998 - HTML reports and annotation of source files: use the new -b (browser) switch.
1999 Thanks to George Song for code, inspiration and guidance.
2000
2001 - Code in the Python standard library is not measured by default. If you need
2002 to measure standard library code, use the -L command-line switch during
2003 execution, or the cover_pylib=True argument to the coverage() constructor.
2004
2005 - Source annotation into a directory (-a -d) behaves differently. The
2006 annotated files are named with their hierarchy flattened so that same-named
2007 files from different directories no longer collide. Also, only files in the
2008 current tree are included.
2009
2010 - coverage.annotate_file is no longer available.
2011
2012 - Programs executed with -x now behave more as they should, for example,
2013 __file__ has the correct value.
2014
2015 - .coverage data files have a new pickle-based format designed for better
2016 extensibility.
2017
2018 - Removed the undocumented cache_file argument to coverage.usecache().
2019
2020
2021 Version 3.0b1 --- 2009-03-07
2022 ----------------------------
2023
2024 Major overhaul.
2025
2026 - Coverage.py is now a package rather than a module. Functionality has been
2027 split into classes.
2028
2029 - The trace function is implemented in C for speed. Coverage.py runs are now
2030 much faster. Thanks to David Christian for productive micro-sprints and
2031 other encouragement.
2032
2033 - Executable lines are identified by reading the line number tables in the
2034 compiled code, removing a great deal of complicated analysis code.
2035
2036 - Precisely which lines are considered executable has changed in some cases.
2037 Therefore, your coverage stats may also change slightly.
2038
2039 - The singleton coverage object is only created if the module-level functions
2040 are used. This maintains the old interface while allowing better
2041 programmatic use of Coverage.py.
2042
2043 - The minimum supported Python version is 2.3.
2044
2045
2046 Version 2.85 --- 2008-09-14
2047 ---------------------------
2048
2049 - Add support for finding source files in eggs. Don't check for
2050 morf's being instances of ModuleType, instead use duck typing so that
2051 pseudo-modules can participate. Thanks, Imri Goldberg.
2052
2053 - Use os.realpath as part of the fixing of file names so that symlinks won't
2054 confuse things. Thanks, Patrick Mezard.
2055
2056
2057 Version 2.80 --- 2008-05-25
2058 ---------------------------
2059
2060 - Open files in rU mode to avoid line ending craziness. Thanks, Edward Loper.
2061
2062
2063 Version 2.78 --- 2007-09-30
2064 ---------------------------
2065
2066 - Don't try to predict whether a file is Python source based on the extension.
2067 Extension-less files are often Pythons scripts. Instead, simply parse the
2068 file and catch the syntax errors. Hat tip to Ben Finney.
2069
2070
2071 Version 2.77 --- 2007-07-29
2072 ---------------------------
2073
2074 - Better packaging.
2075
2076
2077 Version 2.76 --- 2007-07-23
2078 ---------------------------
2079
2080 - Now Python 2.5 is *really* fully supported: the body of the new with
2081 statement is counted as executable.
2082
2083
2084 Version 2.75 --- 2007-07-22
2085 ---------------------------
2086
2087 - Python 2.5 now fully supported. The method of dealing with multi-line
2088 statements is now less sensitive to the exact line that Python reports during
2089 execution. Pass statements are handled specially so that their disappearance
2090 during execution won't throw off the measurement.
2091
2092
2093 Version 2.7 --- 2007-07-21
2094 --------------------------
2095
2096 - "#pragma: nocover" is excluded by default.
2097
2098 - Properly ignore docstrings and other constant expressions that appear in the
2099 middle of a function, a problem reported by Tim Leslie.
2100
2101 - coverage.erase() shouldn't clobber the exclude regex. Change how parallel
2102 mode is invoked, and fix erase() so that it erases the cache when called
2103 programmatically.
2104
2105 - In reports, ignore code executed from strings, since we can't do anything
2106 useful with it anyway.
2107
2108 - Better file handling on Linux, thanks Guillaume Chazarain.
2109
2110 - Better shell support on Windows, thanks Noel O'Boyle.
2111
2112 - Python 2.2 support maintained, thanks Catherine Proulx.
2113
2114 - Minor changes to avoid lint warnings.
2115
2116
2117 Version 2.6 --- 2006-08-23
2118 --------------------------
2119
2120 - Applied Joseph Tate's patch for function decorators.
2121
2122 - Applied Sigve Tjora and Mark van der Wal's fixes for argument handling.
2123
2124 - Applied Geoff Bache's parallel mode patch.
2125
2126 - Refactorings to improve testability. Fixes to command-line logic for parallel
2127 mode and collect.
2128
2129
2130 Version 2.5 --- 2005-12-04
2131 --------------------------
2132
2133 - Call threading.settrace so that all threads are measured. Thanks Martin
2134 Fuzzey.
2135
2136 - Add a file argument to report so that reports can be captured to a different
2137 destination.
2138
2139 - Coverage.py can now measure itself.
2140
2141 - Adapted Greg Rogers' patch for using relative file names, and sorting and
2142 omitting files to report on.
2143
2144
2145 Version 2.2 --- 2004-12-31
2146 --------------------------
2147
2148 - Allow for keyword arguments in the module global functions. Thanks, Allen.
2149
2150
2151 Version 2.1 --- 2004-12-14
2152 --------------------------
2153
2154 - Return 'analysis' to its original behavior and add 'analysis2'. Add a global
2155 for 'annotate', and factor it, adding 'annotate_file'.
2156
2157
2158 Version 2.0 --- 2004-12-12
2159 --------------------------
2160
2161 Significant code changes.
2162
2163 - Finding executable statements has been rewritten so that docstrings and
2164 other quirks of Python execution aren't mistakenly identified as missing
2165 lines.
2166
2167 - Lines can be excluded from consideration, even entire suites of lines.
2168
2169 - The file system cache of covered lines can be disabled programmatically.
2170
2171 - Modernized the code.
2172
2173
2174 Earlier History
2175 ---------------
2176
2177 2001-12-04 GDR Created.
2178
2179 2001-12-06 GDR Added command-line interface and source code annotation.
2180
2181 2001-12-09 GDR Moved design and interface to separate documents.
2182
2183 2001-12-10 GDR Open cache file as binary on Windows. Allow simultaneous -e and
2184 -x, or -a and -r.
2185
2186 2001-12-12 GDR Added command-line help. Cache analysis so that it only needs to
2187 be done once when you specify -a and -r.
2188
2189 2001-12-13 GDR Improved speed while recording. Portable between Python 1.5.2
2190 and 2.1.1.
2191
2192 2002-01-03 GDR Module-level functions work correctly.
2193
2194 2002-01-07 GDR Update sys.path when running a file with the -x option, so that
2195 it matches the value the program would get if it were run on its own.

eric ide

mercurial