|
1 .. Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 |
|
2 .. For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt |
|
3 |
|
4 ============================== |
|
5 Change history for coverage.py |
|
6 ============================== |
|
7 |
|
8 These changes are listed in decreasing version number order. Note this can be |
|
9 different from a strict chronological order when there are two branches in |
|
10 development at the same time, such as 4.5.x and 5.0. |
|
11 |
|
12 This list is detailed and covers changes in each pre-release version. If you |
|
13 want to know what's different in 5.0 since 4.5.x, see :ref:`whatsnew5x`. |
|
14 |
|
15 |
|
16 .. When updating the "Unreleased" header to a specific version, use this |
|
17 .. format. Don't forget the jump target: |
|
18 .. |
|
19 .. .. _changes_981: |
|
20 .. |
|
21 .. Version 9.8.1 --- 2027-07-27 |
|
22 .. ---------------------------- |
|
23 |
|
24 .. _changes_531: |
|
25 |
|
26 Version 5.3.1 --- 2020-12-19 |
|
27 ---------------------------- |
|
28 |
|
29 - When using ``--source`` on a large source tree, v5.x was slower than previous |
|
30 versions. This performance regression is now fixed, closing `issue 1037`_. |
|
31 |
|
32 - Mysterious SQLite errors can happen on PyPy, as reported in `issue 1010`_. An |
|
33 immediate retry seems to fix the problem, although it is an unsatisfying |
|
34 solution. |
|
35 |
|
36 - The HTML report now saves the sort order in a more widely supported way, |
|
37 fixing `issue 986`_. Thanks, Sebastián Ramírez (`pull request 1066`_). |
|
38 |
|
39 - The HTML report pages now have a :ref:`Sleepy Snake <sleepy>` favicon. |
|
40 |
|
41 - Wheels are now provided for manylinux2010, and for PyPy3 (pp36 and pp37). |
|
42 |
|
43 - Continuous integration has moved from Travis and AppVeyor to GitHub Actions. |
|
44 |
|
45 .. _issue 986: https://github.com/nedbat/coveragepy/issues/986 |
|
46 .. _issue 1037: https://github.com/nedbat/coveragepy/issues/1037 |
|
47 .. _issue 1010: https://github.com/nedbat/coveragepy/issues/1010 |
|
48 .. _pull request 1066: https://github.com/nedbat/coveragepy/pull/1066 |
|
49 |
|
50 .. _changes_53: |
|
51 |
|
52 Version 5.3 --- 2020-09-13 |
|
53 -------------------------- |
|
54 |
|
55 - The ``source`` setting has always been interpreted as either a file path or a |
|
56 module, depending on which existed. If both interpretations were valid, it |
|
57 was assumed to be a file path. The new ``source_pkgs`` setting can be used |
|
58 to name a package to disambiguate this case. Thanks, Thomas Grainger. Fixes |
|
59 `issue 268`_. |
|
60 |
|
61 - If a plugin was disabled due to an exception, we used to still try to record |
|
62 its information, causing an exception, as reported in `issue 1011`_. This is |
|
63 now fixed. |
|
64 |
|
65 .. _issue 268: https://github.com/nedbat/coveragepy/issues/268 |
|
66 .. _issue 1011: https://github.com/nedbat/coveragepy/issues/1011 |
|
67 |
|
68 |
|
69 .. _changes_521: |
|
70 |
|
71 Version 5.2.1 --- 2020-07-23 |
|
72 ---------------------------- |
|
73 |
|
74 - The dark mode HTML report still used light colors for the context listing, |
|
75 making them unreadable (`issue 1009`_). This is now fixed. |
|
76 |
|
77 - The time stamp on the HTML report now includes the time zone. Thanks, Xie |
|
78 Yanbo (`pull request 960`_). |
|
79 |
|
80 .. _pull request 960: https://github.com/nedbat/coveragepy/pull/960 |
|
81 .. _issue 1009: https://github.com/nedbat/coveragepy/issues/1009 |
|
82 |
|
83 |
|
84 .. _changes_52: |
|
85 |
|
86 Version 5.2 --- 2020-07-05 |
|
87 -------------------------- |
|
88 |
|
89 - The HTML report has been redesigned by Vince Salvino. There is now a dark |
|
90 mode, the code text is larger, and system sans serif fonts are used, in |
|
91 addition to other small changes (`issue 858`_ and `pull request 931`_). |
|
92 |
|
93 - The ``coverage report`` and ``coverage html`` commands now accept a |
|
94 ``--precision`` option to control the number of decimal points displayed. |
|
95 Thanks, Teake Nutma (`pull request 982`_). |
|
96 |
|
97 - The ``coverage report`` and ``coverage html`` commands now accept a |
|
98 ``--no-skip-covered`` option to negate ``--skip-covered``. Thanks, Anthony |
|
99 Sottile (`issue 779`_ and `pull request 932`_). |
|
100 |
|
101 - The ``--skip-empty`` option is now available for the XML report, closing |
|
102 `issue 976`_. |
|
103 |
|
104 - The ``coverage report`` command now accepts a ``--sort`` option to specify |
|
105 how to sort the results. Thanks, Jerin Peter George (`pull request 1005`_). |
|
106 |
|
107 - If coverage fails due to the coverage total not reaching the ``--fail-under`` |
|
108 value, it will now print a message making the condition clear. Thanks, |
|
109 Naveen Yadav (`pull request 977`_). |
|
110 |
|
111 - TOML configuration files with non-ASCII characters would cause errors on |
|
112 Windows (`issue 990`_). This is now fixed. |
|
113 |
|
114 - The output of ``--debug=trace`` now includes information about how the |
|
115 ``--source`` option is being interpreted, and the module names being |
|
116 considered. |
|
117 |
|
118 .. _pull request 931: https://github.com/nedbat/coveragepy/pull/931 |
|
119 .. _pull request 932: https://github.com/nedbat/coveragepy/pull/932 |
|
120 .. _pull request 977: https://github.com/nedbat/coveragepy/pull/977 |
|
121 .. _pull request 982: https://github.com/nedbat/coveragepy/pull/982 |
|
122 .. _pull request 1005: https://github.com/nedbat/coveragepy/pull/1005 |
|
123 .. _issue 779: https://github.com/nedbat/coveragepy/issues/779 |
|
124 .. _issue 858: https://github.com/nedbat/coveragepy/issues/858 |
|
125 .. _issue 976: https://github.com/nedbat/coveragepy/issues/976 |
|
126 .. _issue 990: https://github.com/nedbat/coveragepy/issues/990 |
|
127 |
|
128 |
|
129 .. _changes_51: |
|
130 |
|
131 Version 5.1 --- 2020-04-12 |
|
132 -------------------------- |
|
133 |
|
134 - The JSON report now includes counts of covered and missing branches. Thanks, |
|
135 Salvatore Zagaria. |
|
136 |
|
137 - On Python 3.8, try-finally-return reported wrong branch coverage with |
|
138 decorated async functions (`issue 964`_). This is now fixed. Thanks, Kjell |
|
139 Braden. |
|
140 |
|
141 - The :meth:`~coverage.Coverage.get_option` and |
|
142 :meth:`~coverage.Coverage.set_option` methods can now manipulate the |
|
143 ``[paths]`` configuration setting. Thanks to Bernát Gábor for the fix for |
|
144 `issue 967`_. |
|
145 |
|
146 .. _issue 964: https://github.com/nedbat/coveragepy/issues/964 |
|
147 .. _issue 967: https://github.com/nedbat/coveragepy/issues/967 |
|
148 |
|
149 |
|
150 .. _changes_504: |
|
151 |
|
152 Version 5.0.4 --- 2020-03-16 |
|
153 ---------------------------- |
|
154 |
|
155 - If using the ``[run] relative_files`` setting, the XML report will use |
|
156 relative files in the ``<source>`` elements indicating the location of source |
|
157 code. Closes `issue 948`_. |
|
158 |
|
159 - The textual summary report could report missing lines with negative line |
|
160 numbers on PyPy3 7.1 (`issue 943`_). This is now fixed. |
|
161 |
|
162 - Windows wheels for Python 3.8 were incorrectly built, but are now fixed. |
|
163 (`issue 949`_) |
|
164 |
|
165 - Updated Python 3.9 support to 3.9a4. |
|
166 |
|
167 - HTML reports couldn't be sorted if localStorage wasn't available. This is now |
|
168 fixed: sorting works even though the sorting setting isn't retained. (`issue |
|
169 944`_ and `pull request 945`_). Thanks, Abdeali Kothari. |
|
170 |
|
171 .. _issue 943: https://github.com/nedbat/coveragepy/issues/943 |
|
172 .. _issue 944: https://github.com/nedbat/coveragepy/issues/944 |
|
173 .. _pull request 945: https://github.com/nedbat/coveragepy/pull/945 |
|
174 .. _issue 948: https://github.com/nedbat/coveragepy/issues/948 |
|
175 .. _issue 949: https://github.com/nedbat/coveragepy/issues/949 |
|
176 |
|
177 |
|
178 .. _changes_503: |
|
179 |
|
180 Version 5.0.3 --- 2020-01-12 |
|
181 ---------------------------- |
|
182 |
|
183 - A performance improvement in 5.0.2 didn't work for test suites that changed |
|
184 directory before combining data, causing "Couldn't use data file: no such |
|
185 table: meta" errors (`issue 916`_). This is now fixed. |
|
186 |
|
187 - Coverage could fail to run your program with some form of "ModuleNotFound" or |
|
188 "ImportError" trying to import from the current directory. This would happen |
|
189 if coverage had been packaged into a zip file (for example, on Windows), or |
|
190 was found indirectly (for example, by pyenv-virtualenv). A number of |
|
191 different scenarios were described in `issue 862`_ which is now fixed. Huge |
|
192 thanks to Agbonze O. Jeremiah for reporting it, and Alexander Waters and |
|
193 George-Cristian Bîrzan for protracted debugging sessions. |
|
194 |
|
195 - Added the "premain" debug option. |
|
196 |
|
197 - Added SQLite compile-time options to the "debug sys" output. |
|
198 |
|
199 .. _issue 862: https://github.com/nedbat/coveragepy/issues/862 |
|
200 .. _issue 916: https://github.com/nedbat/coveragepy/issues/916 |
|
201 |
|
202 |
|
203 .. _changes_502: |
|
204 |
|
205 Version 5.0.2 --- 2020-01-05 |
|
206 ---------------------------- |
|
207 |
|
208 - Programs that used multiprocessing and changed directories would fail under |
|
209 coverage. This is now fixed (`issue 890`_). A side effect is that debug |
|
210 information about the config files read now shows absolute paths to the |
|
211 files. |
|
212 |
|
213 - When running programs as modules (``coverage run -m``) with ``--source``, |
|
214 some measured modules were imported before coverage starts. This resulted in |
|
215 unwanted warnings ("Already imported a file that will be measured") and a |
|
216 reduction in coverage totals (`issue 909`_). This is now fixed. |
|
217 |
|
218 - If no data was collected, an exception about "No data to report" could happen |
|
219 instead of a 0% report being created (`issue 884`_). This is now fixed. |
|
220 |
|
221 - The handling of source files with non-encodable file names has changed. |
|
222 Previously, if a file name could not be encoded as UTF-8, an error occurred, |
|
223 as described in `issue 891`_. Now, those files will not be measured, since |
|
224 their data would not be recordable. |
|
225 |
|
226 - A new warning ("dynamic-conflict") is issued if two mechanisms are trying to |
|
227 change the dynamic context. Closes `issue 901`_. |
|
228 |
|
229 - ``coverage run --debug=sys`` would fail with an AttributeError. This is now |
|
230 fixed (`issue 907`_). |
|
231 |
|
232 .. _issue 884: https://github.com/nedbat/coveragepy/issues/884 |
|
233 .. _issue 890: https://github.com/nedbat/coveragepy/issues/890 |
|
234 .. _issue 891: https://github.com/nedbat/coveragepy/issues/891 |
|
235 .. _issue 901: https://github.com/nedbat/coveragepy/issues/901 |
|
236 .. _issue 907: https://github.com/nedbat/coveragepy/issues/907 |
|
237 .. _issue 909: https://github.com/nedbat/coveragepy/issues/909 |
|
238 |
|
239 |
|
240 .. _changes_501: |
|
241 |
|
242 Version 5.0.1 --- 2019-12-22 |
|
243 ---------------------------- |
|
244 |
|
245 - If a 4.x data file is the cause of a "file is not a database" error, then use |
|
246 a more specific error message, "Looks like a coverage 4.x data file, are you |
|
247 mixing versions of coverage?" Helps diagnose the problems described in |
|
248 `issue 886`_. |
|
249 |
|
250 - Measurement contexts and relative file names didn't work together, as |
|
251 reported in `issue 899`_ and `issue 900`_. This is now fixed, thanks to |
|
252 David Szotten. |
|
253 |
|
254 - When using ``coverage run --concurrency=multiprocessing``, all data files |
|
255 should be named with parallel-ready suffixes. 5.0 mistakenly named the main |
|
256 process' file with no suffix when using ``--append``. This is now fixed, |
|
257 closing `issue 880`_. |
|
258 |
|
259 - Fixed a problem on Windows when the current directory is changed to a |
|
260 different drive (`issue 895`_). Thanks, Olivier Grisel. |
|
261 |
|
262 - Updated Python 3.9 support to 3.9a2. |
|
263 |
|
264 .. _issue 880: https://github.com/nedbat/coveragepy/issues/880 |
|
265 .. _issue 886: https://github.com/nedbat/coveragepy/issues/886 |
|
266 .. _issue 895: https://github.com/nedbat/coveragepy/issues/895 |
|
267 .. _issue 899: https://github.com/nedbat/coveragepy/issues/899 |
|
268 .. _issue 900: https://github.com/nedbat/coveragepy/issues/900 |
|
269 |
|
270 |
|
271 .. _changes_50: |
|
272 |
|
273 Version 5.0 --- 2019-12-14 |
|
274 -------------------------- |
|
275 |
|
276 Nothing new beyond 5.0b2. |
|
277 |
|
278 |
|
279 .. _changes_50b2: |
|
280 |
|
281 Version 5.0b2 --- 2019-12-08 |
|
282 ---------------------------- |
|
283 |
|
284 - An experimental ``[run] relative_files`` setting tells coverage to store |
|
285 relative file names in the data file. This makes it easier to run tests in |
|
286 one (or many) environments, and then report in another. It has not had much |
|
287 real-world testing, so it may change in incompatible ways in the future. |
|
288 |
|
289 - When constructing a :class:`coverage.Coverage` object, `data_file` can be |
|
290 specified as None to prevent writing any data file at all. In previous |
|
291 versions, an explicit `data_file=None` argument would use the default of |
|
292 ".coverage". Fixes `issue 871`_. |
|
293 |
|
294 - Python files run with ``-m`` now have ``__spec__`` defined properly. This |
|
295 fixes `issue 745`_ (about not being able to run unittest tests that spawn |
|
296 subprocesses), and `issue 838`_, which described the problem directly. |
|
297 |
|
298 - The ``[paths]`` configuration section is now ordered. If you specify more |
|
299 than one list of patterns, the first one that matches will be used. Fixes |
|
300 `issue 649`_. |
|
301 |
|
302 - The :func:`.coverage.numbits.register_sqlite_functions` function now also |
|
303 registers `numbits_to_nums` for use in SQLite queries. Thanks, Simon |
|
304 Willison. |
|
305 |
|
306 - Python 3.9a1 is supported. |
|
307 |
|
308 - Coverage.py has a mascot: :ref:`Sleepy Snake <sleepy>`. |
|
309 |
|
310 .. _issue 649: https://github.com/nedbat/coveragepy/issues/649 |
|
311 .. _issue 745: https://github.com/nedbat/coveragepy/issues/745 |
|
312 .. _issue 838: https://github.com/nedbat/coveragepy/issues/838 |
|
313 .. _issue 871: https://github.com/nedbat/coveragepy/issues/871 |
|
314 |
|
315 |
|
316 .. _changes_50b1: |
|
317 |
|
318 Version 5.0b1 --- 2019-11-11 |
|
319 ---------------------------- |
|
320 |
|
321 - The HTML and textual reports now have a ``--skip-empty`` option that skips |
|
322 files with no statements, notably ``__init__.py`` files. Thanks, Reya B. |
|
323 |
|
324 - Configuration can now be read from `TOML`_ files. This requires installing |
|
325 coverage.py with the ``[toml]`` extra. The standard "pyproject.toml" file |
|
326 will be read automatically if no other configuration file is found, with |
|
327 settings in the ``[tool.coverage.]`` namespace. Thanks to Frazer McLean for |
|
328 implementation and persistence. Finishes `issue 664`_. |
|
329 |
|
330 - The ``[run] note`` setting has been deprecated. Using it will result in a |
|
331 warning, and the note will not be written to the data file. The |
|
332 corresponding :class:`.CoverageData` methods have been removed. |
|
333 |
|
334 - The HTML report has been reimplemented (no more table around the source |
|
335 code). This allowed for a better presentation of the context information, |
|
336 hopefully resolving `issue 855`_. |
|
337 |
|
338 - Added sqlite3 module version information to ``coverage debug sys`` output. |
|
339 |
|
340 - Asking the HTML report to show contexts (``[html] show_contexts=True`` or |
|
341 ``coverage html --show-contexts``) will issue a warning if there were no |
|
342 contexts measured (`issue 851`_). |
|
343 |
|
344 .. _TOML: https://github.com/toml-lang/toml#readme |
|
345 .. _issue 664: https://github.com/nedbat/coveragepy/issues/664 |
|
346 .. _issue 851: https://github.com/nedbat/coveragepy/issues/851 |
|
347 .. _issue 855: https://github.com/nedbat/coveragepy/issues/855 |
|
348 |
|
349 |
|
350 .. _changes_50a8: |
|
351 |
|
352 Version 5.0a8 --- 2019-10-02 |
|
353 ---------------------------- |
|
354 |
|
355 - The :class:`.CoverageData` API has changed how queries are limited to |
|
356 specific contexts. Now you use :meth:`.CoverageData.set_query_context` to |
|
357 set a single exact-match string, or :meth:`.CoverageData.set_query_contexts` |
|
358 to set a list of regular expressions to match contexts. This changes the |
|
359 command-line ``--contexts`` option to use regular expressions instead of |
|
360 filename-style wildcards. |
|
361 |
|
362 |
|
363 .. _changes_50a7: |
|
364 |
|
365 Version 5.0a7 --- 2019-09-21 |
|
366 ---------------------------- |
|
367 |
|
368 - Data can now be "reported" in JSON format, for programmatic use, as requested |
|
369 in `issue 720`_. The new ``coverage json`` command writes raw and summarized |
|
370 data to a JSON file. Thanks, Matt Bachmann. |
|
371 |
|
372 - Dynamic contexts are now supported in the Python tracer, which is important |
|
373 for PyPy users. Closes `issue 846`_. |
|
374 |
|
375 - The compact line number representation introduced in 5.0a6 is called a |
|
376 "numbits." The :mod:`coverage.numbits` module provides functions for working |
|
377 with them. |
|
378 |
|
379 - The reporting methods used to permanently apply their arguments to the |
|
380 configuration of the Coverage object. Now they no longer do. The arguments |
|
381 affect the operation of the method, but do not persist. |
|
382 |
|
383 - A class named "test_something" no longer confuses the ``test_function`` |
|
384 dynamic context setting. Fixes `issue 829`_. |
|
385 |
|
386 - Fixed an unusual tokenizing issue with backslashes in comments. Fixes |
|
387 `issue 822`_. |
|
388 |
|
389 - ``debug=plugin`` didn't properly support configuration or dynamic context |
|
390 plugins, but now it does, closing `issue 834`_. |
|
391 |
|
392 .. _issue 720: https://github.com/nedbat/coveragepy/issues/720 |
|
393 .. _issue 822: https://github.com/nedbat/coveragepy/issues/822 |
|
394 .. _issue 834: https://github.com/nedbat/coveragepy/issues/834 |
|
395 .. _issue 829: https://github.com/nedbat/coveragepy/issues/829 |
|
396 .. _issue 846: https://github.com/nedbat/coveragepy/issues/846 |
|
397 |
|
398 |
|
399 .. _changes_50a6: |
|
400 |
|
401 Version 5.0a6 --- 2019-07-16 |
|
402 ---------------------------- |
|
403 |
|
404 - Reporting on contexts. Big thanks to Stephan Richter and Albertas Agejevas |
|
405 for the contribution. |
|
406 |
|
407 - The ``--contexts`` option is available on the ``report`` and ``html`` |
|
408 commands. It's a comma-separated list of shell-style wildcards, selecting |
|
409 the contexts to report on. Only contexts matching one of the wildcards |
|
410 will be included in the report. |
|
411 |
|
412 - The ``--show-contexts`` option for the ``html`` command adds context |
|
413 information to each covered line. Hovering over the "ctx" marker at the |
|
414 end of the line reveals a list of the contexts that covered the line. |
|
415 |
|
416 - Database changes: |
|
417 |
|
418 - Line numbers are now stored in a much more compact way. For each file and |
|
419 context, a single binary string is stored with a bit per line number. This |
|
420 greatly improves memory use, but makes ad-hoc use difficult. |
|
421 |
|
422 - Dynamic contexts with no data are no longer written to the database. |
|
423 |
|
424 - SQLite data storage is now faster. There's no longer a reason to keep the |
|
425 JSON data file code, so it has been removed. |
|
426 |
|
427 - Changes to the :class:`.CoverageData` interface: |
|
428 |
|
429 - The new :meth:`.CoverageData.dumps` method serializes the data to a string, |
|
430 and a corresponding :meth:`.CoverageData.loads` method reconstitutes this |
|
431 data. The format of the data string is subject to change at any time, and |
|
432 so should only be used between two installations of the same version of |
|
433 coverage.py. |
|
434 |
|
435 - The :meth:`CoverageData constructor<.CoverageData.__init__>` has a new |
|
436 argument, `no_disk` (default: False). Setting it to True prevents writing |
|
437 any data to the disk. This is useful for transient data objects. |
|
438 |
|
439 - Added the classmethod :meth:`.Coverage.current` to get the latest started |
|
440 Coverage instance. |
|
441 |
|
442 - Multiprocessing support in Python 3.8 was broken, but is now fixed. Closes |
|
443 `issue 828`_. |
|
444 |
|
445 - Error handling during reporting has changed slightly. All reporting methods |
|
446 now behave the same. The ``--ignore-errors`` option keeps errors from |
|
447 stopping the reporting, but files that couldn't parse as Python will always |
|
448 be reported as warnings. As with other warnings, you can suppress them with |
|
449 the ``[run] disable_warnings`` configuration setting. |
|
450 |
|
451 - Coverage.py no longer fails if the user program deletes its current |
|
452 directory. Fixes `issue 806`_. Thanks, Dan Hemberger. |
|
453 |
|
454 - The scrollbar markers in the HTML report now accurately show the highlighted |
|
455 lines, regardless of what categories of line are highlighted. |
|
456 |
|
457 - The hack to accommodate ShiningPanda_ looking for an obsolete internal data |
|
458 file has been removed, since ShiningPanda 0.22 fixed it four years ago. |
|
459 |
|
460 - The deprecated `Reporter.file_reporters` property has been removed. |
|
461 |
|
462 .. _ShiningPanda: https://wiki.jenkins.io/display/JENKINS/ShiningPanda+Plugin |
|
463 .. _issue 806: https://github.com/nedbat/coveragepy/pull/806 |
|
464 .. _issue 828: https://github.com/nedbat/coveragepy/issues/828 |
|
465 |
|
466 |
|
467 .. _changes_50a5: |
|
468 |
|
469 Version 5.0a5 --- 2019-05-07 |
|
470 ---------------------------- |
|
471 |
|
472 - Drop support for Python 3.4 |
|
473 |
|
474 - Dynamic contexts can now be set two new ways, both thanks to Justas |
|
475 Sadzevičius. |
|
476 |
|
477 - A plugin can implement a ``dynamic_context`` method to check frames for |
|
478 whether a new context should be started. See |
|
479 :ref:`dynamic_context_plugins` for more details. |
|
480 |
|
481 - Another tool (such as a test runner) can use the new |
|
482 :meth:`.Coverage.switch_context` method to explicitly change the context. |
|
483 |
|
484 - The ``dynamic_context = test_function`` setting now works with Python 2 |
|
485 old-style classes, though it only reports the method name, not the class it |
|
486 was defined on. Closes `issue 797`_. |
|
487 |
|
488 - ``fail_under`` values more than 100 are reported as errors. Thanks to Mike |
|
489 Fiedler for closing `issue 746`_. |
|
490 |
|
491 - The "missing" values in the text output are now sorted by line number, so |
|
492 that missing branches are reported near the other lines they affect. The |
|
493 values used to show all missing lines, and then all missing branches. |
|
494 |
|
495 - Access to the SQLite database used for data storage is now thread-safe. |
|
496 Thanks, Stephan Richter. This closes `issue 702`_. |
|
497 |
|
498 - Combining data stored in SQLite is now about twice as fast, fixing `issue |
|
499 761`_. Thanks, Stephan Richter. |
|
500 |
|
501 - The ``filename`` attribute on :class:`.CoverageData` objects has been made |
|
502 private. You can use the ``data_filename`` method to get the actual file |
|
503 name being used to store data, and the ``base_filename`` method to get the |
|
504 original filename before parallelizing suffixes were added. This is part of |
|
505 fixing `issue 708`_. |
|
506 |
|
507 - Line numbers in the HTML report now align properly with source lines, even |
|
508 when Chrome's minimum font size is set, fixing `issue 748`_. Thanks Wen Ye. |
|
509 |
|
510 .. _issue 702: https://github.com/nedbat/coveragepy/issues/702 |
|
511 .. _issue 708: https://github.com/nedbat/coveragepy/issues/708 |
|
512 .. _issue 746: https://github.com/nedbat/coveragepy/issues/746 |
|
513 .. _issue 748: https://github.com/nedbat/coveragepy/issues/748 |
|
514 .. _issue 761: https://github.com/nedbat/coveragepy/issues/761 |
|
515 .. _issue 797: https://github.com/nedbat/coveragepy/issues/797 |
|
516 |
|
517 |
|
518 .. _changes_50a4: |
|
519 |
|
520 Version 5.0a4 --- 2018-11-25 |
|
521 ---------------------------- |
|
522 |
|
523 - You can specify the command line to run your program with the ``[run] |
|
524 command_line`` configuration setting, as requested in `issue 695`_. |
|
525 |
|
526 - Coverage will create directories as needed for the data file if they don't |
|
527 exist, closing `issue 721`_. |
|
528 |
|
529 - The ``coverage run`` command has always adjusted the first entry in sys.path, |
|
530 to properly emulate how Python runs your program. Now this adjustment is |
|
531 skipped if sys.path[0] is already different than Python's default. This |
|
532 fixes `issue 715`_. |
|
533 |
|
534 - Improvements to context support: |
|
535 |
|
536 - The "no such table: meta" error is fixed.: `issue 716`_. |
|
537 |
|
538 - Combining data files is now much faster. |
|
539 |
|
540 - Python 3.8 (as of today!) passes all tests. |
|
541 |
|
542 .. _issue 695: https://github.com/nedbat/coveragepy/issues/695 |
|
543 .. _issue 715: https://github.com/nedbat/coveragepy/issues/715 |
|
544 .. _issue 716: https://github.com/nedbat/coveragepy/issues/716 |
|
545 .. _issue 721: https://github.com/nedbat/coveragepy/issues/721 |
|
546 |
|
547 |
|
548 .. _changes_50a3: |
|
549 |
|
550 Version 5.0a3 --- 2018-10-06 |
|
551 ---------------------------- |
|
552 |
|
553 - Context support: static contexts let you specify a label for a coverage run, |
|
554 which is recorded in the data, and retained when you combine files. See |
|
555 :ref:`contexts` for more information. |
|
556 |
|
557 - Dynamic contexts: specifying ``[run] dynamic_context = test_function`` in the |
|
558 config file will record the test function name as a dynamic context during |
|
559 execution. This is the core of "Who Tests What" (`issue 170`_). Things to |
|
560 note: |
|
561 |
|
562 - There is no reporting support yet. Use SQLite to query the .coverage file |
|
563 for information. Ideas are welcome about how reporting could be extended |
|
564 to use this data. |
|
565 |
|
566 - There's a noticeable slow-down before any test is run. |
|
567 |
|
568 - Data files will now be roughly N times larger, where N is the number of |
|
569 tests you have. Combining data files is therefore also N times slower. |
|
570 |
|
571 - No other values for ``dynamic_context`` are recognized yet. Let me know |
|
572 what else would be useful. I'd like to use a pytest plugin to get better |
|
573 information directly from pytest, for example. |
|
574 |
|
575 .. _issue 170: https://github.com/nedbat/coveragepy/issues/170 |
|
576 |
|
577 - Environment variable substitution in configuration files now supports two |
|
578 syntaxes for controlling the behavior of undefined variables: if ``VARNAME`` |
|
579 is not defined, ``${VARNAME?}`` will raise an error, and ``${VARNAME-default |
|
580 value}`` will use "default value". |
|
581 |
|
582 - Partial support for Python 3.8, which has not yet released an alpha. Fixes |
|
583 `issue 707`_ and `issue 714`_. |
|
584 |
|
585 .. _issue 707: https://github.com/nedbat/coveragepy/issues/707 |
|
586 .. _issue 714: https://github.com/nedbat/coveragepy/issues/714 |
|
587 |
|
588 |
|
589 .. _changes_50a2: |
|
590 |
|
591 Version 5.0a2 --- 2018-09-03 |
|
592 ---------------------------- |
|
593 |
|
594 - Coverage's data storage has changed. In version 4.x, .coverage files were |
|
595 basically JSON. Now, they are SQLite databases. This means the data file |
|
596 can be created earlier than it used to. A large amount of code was |
|
597 refactored to support this change. |
|
598 |
|
599 - Because the data file is created differently than previous releases, you |
|
600 may need ``parallel=true`` where you didn't before. |
|
601 |
|
602 - The old data format is still available (for now) by setting the environment |
|
603 variable COVERAGE_STORAGE=json. Please tell me if you think you need to |
|
604 keep the JSON format. |
|
605 |
|
606 - The database schema is guaranteed to change in the future, to support new |
|
607 features. I'm looking for opinions about making the schema part of the |
|
608 public API to coverage.py or not. |
|
609 |
|
610 - Development moved from `Bitbucket`_ to `GitHub`_. |
|
611 |
|
612 - HTML files no longer have trailing and extra whitespace. |
|
613 |
|
614 - The sort order in the HTML report is stored in local storage rather than |
|
615 cookies, closing `issue 611`_. Thanks, Federico Bond. |
|
616 |
|
617 - pickle2json, for converting v3 data files to v4 data files, has been removed. |
|
618 |
|
619 .. _Bitbucket: https://bitbucket.org |
|
620 .. _GitHub: https://github.com/nedbat/coveragepy |
|
621 |
|
622 .. _issue 611: https://github.com/nedbat/coveragepy/issues/611 |
|
623 |
|
624 |
|
625 .. _changes_50a1: |
|
626 |
|
627 Version 5.0a1 --- 2018-06-05 |
|
628 ---------------------------- |
|
629 |
|
630 - Coverage.py no longer supports Python 2.6 or 3.3. |
|
631 |
|
632 - The location of the configuration file can now be specified with a |
|
633 ``COVERAGE_RCFILE`` environment variable, as requested in `issue 650`_. |
|
634 |
|
635 - Namespace packages are supported on Python 3.7, where they used to cause |
|
636 TypeErrors about path being None. Fixes `issue 700`_. |
|
637 |
|
638 - A new warning (``already-imported``) is issued if measurable files have |
|
639 already been imported before coverage.py started measurement. See |
|
640 :ref:`cmd_warnings` for more information. |
|
641 |
|
642 - Running coverage many times for small runs in a single process should be |
|
643 faster, closing `issue 625`_. Thanks, David MacIver. |
|
644 |
|
645 - Large HTML report pages load faster. Thanks, Pankaj Pandey. |
|
646 |
|
647 .. _issue 625: https://github.com/nedbat/coveragepy/issues/625 |
|
648 .. _issue 650: https://github.com/nedbat/coveragepy/issues/650 |
|
649 .. _issue 700: https://github.com/nedbat/coveragepy/issues/700 |
|
650 |
|
651 |
|
652 .. _changes_454: |
|
653 |
|
654 Version 4.5.4 --- 2019-07-29 |
|
655 ---------------------------- |
|
656 |
|
657 - Multiprocessing support in Python 3.8 was broken, but is now fixed. Closes |
|
658 `issue 828`_. |
|
659 |
|
660 .. _issue 828: https://github.com/nedbat/coveragepy/issues/828 |
|
661 |
|
662 |
|
663 .. _changes_453: |
|
664 |
|
665 Version 4.5.3 --- 2019-03-09 |
|
666 ---------------------------- |
|
667 |
|
668 - Only packaging metadata changes. |
|
669 |
|
670 |
|
671 .. _changes_452: |
|
672 |
|
673 Version 4.5.2 --- 2018-11-12 |
|
674 ---------------------------- |
|
675 |
|
676 - Namespace packages are supported on Python 3.7, where they used to cause |
|
677 TypeErrors about path being None. Fixes `issue 700`_. |
|
678 |
|
679 - Python 3.8 (as of today!) passes all tests. Fixes `issue 707`_ and |
|
680 `issue 714`_. |
|
681 |
|
682 - Development moved from `Bitbucket`_ to `GitHub`_. |
|
683 |
|
684 .. _issue 700: https://github.com/nedbat/coveragepy/issues/700 |
|
685 .. _issue 707: https://github.com/nedbat/coveragepy/issues/707 |
|
686 .. _issue 714: https://github.com/nedbat/coveragepy/issues/714 |
|
687 |
|
688 .. _Bitbucket: https://bitbucket.org |
|
689 .. _GitHub: https://github.com/nedbat/coveragepy |
|
690 |
|
691 |
|
692 .. _changes_451: |
|
693 |
|
694 Version 4.5.1 --- 2018-02-10 |
|
695 ---------------------------- |
|
696 |
|
697 - Now that 4.5 properly separated the ``[run] omit`` and ``[report] omit`` |
|
698 settings, an old bug has become apparent. If you specified a package name |
|
699 for ``[run] source``, then omit patterns weren't matched inside that package. |
|
700 This bug (`issue 638`_) is now fixed. |
|
701 |
|
702 - On Python 3.7, reporting about a decorated function with no body other than a |
|
703 docstring would crash coverage.py with an IndexError (`issue 640`_). This is |
|
704 now fixed. |
|
705 |
|
706 - Configurer plugins are now reported in the output of ``--debug=sys``. |
|
707 |
|
708 .. _issue 638: https://github.com/nedbat/coveragepy/issues/638 |
|
709 .. _issue 640: https://github.com/nedbat/coveragepy/issues/640 |
|
710 |
|
711 |
|
712 .. _changes_45: |
|
713 |
|
714 Version 4.5 --- 2018-02-03 |
|
715 -------------------------- |
|
716 |
|
717 - A new kind of plugin is supported: configurers are invoked at start-up to |
|
718 allow more complex configuration than the .coveragerc file can easily do. |
|
719 See :ref:`api_plugin` for details. This solves the complex configuration |
|
720 problem described in `issue 563`_. |
|
721 |
|
722 - The ``fail_under`` option can now be a float. Note that you must specify the |
|
723 ``[report] precision`` configuration option for the fractional part to be |
|
724 used. Thanks to Lars Hupfeldt Nielsen for help with the implementation. |
|
725 Fixes `issue 631`_. |
|
726 |
|
727 - The ``include`` and ``omit`` options can be specified for both the ``[run]`` |
|
728 and ``[report]`` phases of execution. 4.4.2 introduced some incorrect |
|
729 interactions between those phases, where the options for one were confused |
|
730 for the other. This is now corrected, fixing `issue 621`_ and `issue 622`_. |
|
731 Thanks to Daniel Hahler for seeing more clearly than I could. |
|
732 |
|
733 - The ``coverage combine`` command used to always overwrite the data file, even |
|
734 when no data had been read from apparently combinable files. Now, an error |
|
735 is raised if we thought there were files to combine, but in fact none of them |
|
736 could be used. Fixes `issue 629`_. |
|
737 |
|
738 - The ``coverage combine`` command could get confused about path separators |
|
739 when combining data collected on Windows with data collected on Linux, as |
|
740 described in `issue 618`_. This is now fixed: the result path always uses |
|
741 the path separator specified in the ``[paths]`` result. |
|
742 |
|
743 - On Windows, the HTML report could fail when source trees are deeply nested, |
|
744 due to attempting to create HTML filenames longer than the 250-character |
|
745 maximum. Now filenames will never get much larger than 200 characters, |
|
746 fixing `issue 627`_. Thanks to Alex Sandro for helping with the fix. |
|
747 |
|
748 .. _issue 563: https://github.com/nedbat/coveragepy/issues/563 |
|
749 .. _issue 618: https://github.com/nedbat/coveragepy/issues/618 |
|
750 .. _issue 621: https://github.com/nedbat/coveragepy/issues/621 |
|
751 .. _issue 622: https://github.com/nedbat/coveragepy/issues/622 |
|
752 .. _issue 627: https://github.com/nedbat/coveragepy/issues/627 |
|
753 .. _issue 629: https://github.com/nedbat/coveragepy/issues/629 |
|
754 .. _issue 631: https://github.com/nedbat/coveragepy/issues/631 |
|
755 |
|
756 |
|
757 .. _changes_442: |
|
758 |
|
759 Version 4.4.2 --- 2017-11-05 |
|
760 ---------------------------- |
|
761 |
|
762 - Support for Python 3.7. In some cases, class and module docstrings are no |
|
763 longer counted in statement totals, which could slightly change your total |
|
764 results. |
|
765 |
|
766 - Specifying both ``--source`` and ``--include`` no longer silently ignores the |
|
767 include setting, instead it displays a warning. Thanks, Loïc Dachary. Closes |
|
768 `issue 265`_ and `issue 101`_. |
|
769 |
|
770 - Fixed a race condition when saving data and multiple threads are tracing |
|
771 (`issue 581`_). It could produce a "dictionary changed size during iteration" |
|
772 RuntimeError. I believe this mostly but not entirely fixes the race |
|
773 condition. A true fix would likely be too expensive. Thanks, Peter Baughman |
|
774 for the debugging, and Olivier Grisel for the fix with tests. |
|
775 |
|
776 - Configuration values which are file paths will now apply tilde-expansion, |
|
777 closing `issue 589`_. |
|
778 |
|
779 - Now secondary config files like tox.ini and setup.cfg can be specified |
|
780 explicitly, and prefixed sections like `[coverage:run]` will be read. Fixes |
|
781 `issue 588`_. |
|
782 |
|
783 - Be more flexible about the command name displayed by help, fixing |
|
784 `issue 600`_. Thanks, Ben Finney. |
|
785 |
|
786 .. _issue 101: https://github.com/nedbat/coveragepy/issues/101 |
|
787 .. _issue 581: https://github.com/nedbat/coveragepy/issues/581 |
|
788 .. _issue 588: https://github.com/nedbat/coveragepy/issues/588 |
|
789 .. _issue 589: https://github.com/nedbat/coveragepy/issues/589 |
|
790 .. _issue 600: https://github.com/nedbat/coveragepy/issues/600 |
|
791 |
|
792 |
|
793 .. _changes_441: |
|
794 |
|
795 Version 4.4.1 --- 2017-05-14 |
|
796 ---------------------------- |
|
797 |
|
798 - No code changes: just corrected packaging for Python 2.7 Linux wheels. |
|
799 |
|
800 |
|
801 .. _changes_44: |
|
802 |
|
803 Version 4.4 --- 2017-05-07 |
|
804 -------------------------- |
|
805 |
|
806 - Reports could produce the wrong file names for packages, reporting ``pkg.py`` |
|
807 instead of the correct ``pkg/__init__.py``. This is now fixed. Thanks, Dirk |
|
808 Thomas. |
|
809 |
|
810 - XML reports could produce ``<source>`` and ``<class>`` lines that together |
|
811 didn't specify a valid source file path. This is now fixed. (`issue 526`_) |
|
812 |
|
813 - Namespace packages are no longer warned as having no code. (`issue 572`_) |
|
814 |
|
815 - Code that uses ``sys.settrace(sys.gettrace())`` in a file that wasn't being |
|
816 coverage-measured would prevent correct coverage measurement in following |
|
817 code. An example of this was running doctests programmatically. This is now |
|
818 fixed. (`issue 575`_) |
|
819 |
|
820 - Errors printed by the ``coverage`` command now go to stderr instead of |
|
821 stdout. |
|
822 |
|
823 - Running ``coverage xml`` in a directory named with non-ASCII characters would |
|
824 fail under Python 2. This is now fixed. (`issue 573`_) |
|
825 |
|
826 .. _issue 526: https://github.com/nedbat/coveragepy/issues/526 |
|
827 .. _issue 572: https://github.com/nedbat/coveragepy/issues/572 |
|
828 .. _issue 573: https://github.com/nedbat/coveragepy/issues/573 |
|
829 .. _issue 575: https://github.com/nedbat/coveragepy/issues/575 |
|
830 |
|
831 |
|
832 Version 4.4b1 --- 2017-04-04 |
|
833 ---------------------------- |
|
834 |
|
835 - Some warnings can now be individually disabled. Warnings that can be |
|
836 disabled have a short name appended. The ``[run] disable_warnings`` setting |
|
837 takes a list of these warning names to disable. Closes both `issue 96`_ and |
|
838 `issue 355`_. |
|
839 |
|
840 - The XML report now includes attributes from version 4 of the Cobertura XML |
|
841 format, fixing `issue 570`_. |
|
842 |
|
843 - In previous versions, calling a method that used collected data would prevent |
|
844 further collection. For example, `save()`, `report()`, `html_report()`, and |
|
845 others would all stop collection. An explicit `start()` was needed to get it |
|
846 going again. This is no longer true. Now you can use the collected data and |
|
847 also continue measurement. Both `issue 79`_ and `issue 448`_ described this |
|
848 problem, and have been fixed. |
|
849 |
|
850 - Plugins can now find unexecuted files if they choose, by implementing the |
|
851 `find_executable_files` method. Thanks, Emil Madsen. |
|
852 |
|
853 - Minimal IronPython support. You should be able to run IronPython programs |
|
854 under ``coverage run``, though you will still have to do the reporting phase |
|
855 with CPython. |
|
856 |
|
857 - Coverage.py has long had a special hack to support CPython's need to measure |
|
858 the coverage of the standard library tests. This code was not installed by |
|
859 kitted versions of coverage.py. Now it is. |
|
860 |
|
861 .. _issue 79: https://github.com/nedbat/coveragepy/issues/79 |
|
862 .. _issue 96: https://github.com/nedbat/coveragepy/issues/96 |
|
863 .. _issue 355: https://github.com/nedbat/coveragepy/issues/355 |
|
864 .. _issue 448: https://github.com/nedbat/coveragepy/issues/448 |
|
865 .. _issue 570: https://github.com/nedbat/coveragepy/issues/570 |
|
866 |
|
867 |
|
868 .. _changes_434: |
|
869 |
|
870 Version 4.3.4 --- 2017-01-17 |
|
871 ---------------------------- |
|
872 |
|
873 - Fixing 2.6 in version 4.3.3 broke other things, because the too-tricky |
|
874 exception wasn't properly derived from Exception, described in `issue 556`_. |
|
875 A newb mistake; it hasn't been a good few days. |
|
876 |
|
877 .. _issue 556: https://github.com/nedbat/coveragepy/issues/556 |
|
878 |
|
879 |
|
880 .. _changes_433: |
|
881 |
|
882 Version 4.3.3 --- 2017-01-17 |
|
883 ---------------------------- |
|
884 |
|
885 - Python 2.6 support was broken due to a testing exception imported for the |
|
886 benefit of the coverage.py test suite. Properly conditionalizing it fixed |
|
887 `issue 554`_ so that Python 2.6 works again. |
|
888 |
|
889 .. _issue 554: https://github.com/nedbat/coveragepy/issues/554 |
|
890 |
|
891 |
|
892 .. _changes_432: |
|
893 |
|
894 Version 4.3.2 --- 2017-01-16 |
|
895 ---------------------------- |
|
896 |
|
897 - Using the ``--skip-covered`` option on an HTML report with 100% coverage |
|
898 would cause a "No data to report" error, as reported in `issue 549`_. This is |
|
899 now fixed; thanks, Loïc Dachary. |
|
900 |
|
901 - If-statements can be optimized away during compilation, for example, `if 0:` |
|
902 or `if __debug__:`. Coverage.py had problems properly understanding these |
|
903 statements which existed in the source, but not in the compiled bytecode. |
|
904 This problem, reported in `issue 522`_, is now fixed. |
|
905 |
|
906 - If you specified ``--source`` as a directory, then coverage.py would look for |
|
907 importable Python files in that directory, and could identify ones that had |
|
908 never been executed at all. But if you specified it as a package name, that |
|
909 detection wasn't performed. Now it is, closing `issue 426`_. Thanks to Loïc |
|
910 Dachary for the fix. |
|
911 |
|
912 - If you started and stopped coverage measurement thousands of times in your |
|
913 process, you could crash Python with a "Fatal Python error: deallocating |
|
914 None" error. This is now fixed. Thanks to Alex Groce for the bug report. |
|
915 |
|
916 - On PyPy, measuring coverage in subprocesses could produce a warning: "Trace |
|
917 function changed, measurement is likely wrong: None". This was spurious, and |
|
918 has been suppressed. |
|
919 |
|
920 - Previously, coverage.py couldn't start on Jython, due to that implementation |
|
921 missing the multiprocessing module (`issue 551`_). This problem has now been |
|
922 fixed. Also, `issue 322`_ about not being able to invoke coverage |
|
923 conveniently, seems much better: ``jython -m coverage run myprog.py`` works |
|
924 properly. |
|
925 |
|
926 - Let's say you ran the HTML report over and over again in the same output |
|
927 directory, with ``--skip-covered``. And imagine due to your heroic |
|
928 test-writing efforts, a file just achieved the goal of 100% coverage. With |
|
929 coverage.py 4.3, the old HTML file with the less-than-100% coverage would be |
|
930 left behind. This file is now properly deleted. |
|
931 |
|
932 .. _issue 322: https://github.com/nedbat/coveragepy/issues/322 |
|
933 .. _issue 426: https://github.com/nedbat/coveragepy/issues/426 |
|
934 .. _issue 522: https://github.com/nedbat/coveragepy/issues/522 |
|
935 .. _issue 549: https://github.com/nedbat/coveragepy/issues/549 |
|
936 .. _issue 551: https://github.com/nedbat/coveragepy/issues/551 |
|
937 |
|
938 |
|
939 .. _changes_431: |
|
940 |
|
941 Version 4.3.1 --- 2016-12-28 |
|
942 ---------------------------- |
|
943 |
|
944 - Some environments couldn't install 4.3, as described in `issue 540`_. This is |
|
945 now fixed. |
|
946 |
|
947 - The check for conflicting ``--source`` and ``--include`` was too simple in a |
|
948 few different ways, breaking a few perfectly reasonable use cases, described |
|
949 in `issue 541`_. The check has been reverted while we re-think the fix for |
|
950 `issue 265`_. |
|
951 |
|
952 .. _issue 540: https://github.com/nedbat/coveragepy/issues/540 |
|
953 .. _issue 541: https://github.com/nedbat/coveragepy/issues/541 |
|
954 |
|
955 |
|
956 .. _changes_43: |
|
957 |
|
958 Version 4.3 --- 2016-12-27 |
|
959 -------------------------- |
|
960 |
|
961 Special thanks to **Loïc Dachary**, who took an extraordinary interest in |
|
962 coverage.py and contributed a number of improvements in this release. |
|
963 |
|
964 - Subprocesses that are measured with `automatic subprocess measurement`_ used |
|
965 to read in any pre-existing data file. This meant data would be incorrectly |
|
966 carried forward from run to run. Now those files are not read, so each |
|
967 subprocess only writes its own data. Fixes `issue 510`_. |
|
968 |
|
969 - The ``coverage combine`` command will now fail if there are no data files to |
|
970 combine. The combine changes in 4.2 meant that multiple combines could lose |
|
971 data, leaving you with an empty .coverage data file. Fixes |
|
972 `issue 525`_, `issue 412`_, `issue 516`_, and probably `issue 511`_. |
|
973 |
|
974 - Coverage.py wouldn't execute `sys.excepthook`_ when an exception happened in |
|
975 your program. Now it does, thanks to Andrew Hoos. Closes `issue 535`_. |
|
976 |
|
977 - Branch coverage fixes: |
|
978 |
|
979 - Branch coverage could misunderstand a finally clause on a try block that |
|
980 never continued on to the following statement, as described in `issue |
|
981 493`_. This is now fixed. Thanks to Joe Doherty for the report and Loïc |
|
982 Dachary for the fix. |
|
983 |
|
984 - A while loop with a constant condition (while True) and a continue |
|
985 statement would be mis-analyzed, as described in `issue 496`_. This is now |
|
986 fixed, thanks to a bug report by Eli Skeggs and a fix by Loïc Dachary. |
|
987 |
|
988 - While loops with constant conditions that were never executed could result |
|
989 in a non-zero coverage report. Artem Dayneko reported this in `issue |
|
990 502`_, and Loïc Dachary provided the fix. |
|
991 |
|
992 - The HTML report now supports a ``--skip-covered`` option like the other |
|
993 reporting commands. Thanks, Loïc Dachary for the implementation, closing |
|
994 `issue 433`_. |
|
995 |
|
996 - Options can now be read from a tox.ini file, if any. Like setup.cfg, sections |
|
997 are prefixed with "coverage:", so ``[run]`` options will be read from the |
|
998 ``[coverage:run]`` section of tox.ini. Implements part of `issue 519`_. |
|
999 Thanks, Stephen Finucane. |
|
1000 |
|
1001 - Specifying both ``--source`` and ``--include`` no longer silently ignores the |
|
1002 include setting, instead it fails with a message. Thanks, Nathan Land and |
|
1003 Loïc Dachary. Closes `issue 265`_. |
|
1004 |
|
1005 - The ``Coverage.combine`` method has a new parameter, ``strict=False``, to |
|
1006 support failing if there are no data files to combine. |
|
1007 |
|
1008 - When forking subprocesses, the coverage data files would have the same random |
|
1009 number appended to the file name. This didn't cause problems, because the |
|
1010 file names had the process id also, making collisions (nearly) impossible. |
|
1011 But it was disconcerting. This is now fixed. |
|
1012 |
|
1013 - The text report now properly sizes headers when skipping some files, fixing |
|
1014 `issue 524`_. Thanks, Anthony Sottile and Loïc Dachary. |
|
1015 |
|
1016 - Coverage.py can now search .pex files for source, just as it can .zip and |
|
1017 .egg. Thanks, Peter Ebden. |
|
1018 |
|
1019 - Data files are now about 15% smaller. |
|
1020 |
|
1021 - Improvements in the ``[run] debug`` setting: |
|
1022 |
|
1023 - The "dataio" debug setting now also logs when data files are deleted during |
|
1024 combining or erasing. |
|
1025 |
|
1026 - A new debug option, "multiproc", for logging the behavior of |
|
1027 ``concurrency=multiprocessing``. |
|
1028 |
|
1029 - If you used the debug options "config" and "callers" together, you'd get a |
|
1030 call stack printed for every line in the multi-line config output. This is |
|
1031 now fixed. |
|
1032 |
|
1033 - Fixed an unusual bug involving multiple coding declarations affecting code |
|
1034 containing code in multi-line strings: `issue 529`_. |
|
1035 |
|
1036 - Coverage.py will no longer be misled into thinking that a plain file is a |
|
1037 package when interpreting ``--source`` options. Thanks, Cosimo Lupo. |
|
1038 |
|
1039 - If you try to run a non-Python file with coverage.py, you will now get a more |
|
1040 useful error message. `Issue 514`_. |
|
1041 |
|
1042 - The default pragma regex changed slightly, but this will only matter to you |
|
1043 if you are deranged and use mixed-case pragmas. |
|
1044 |
|
1045 - Deal properly with non-ASCII file names in an ASCII-only world, `issue 533`_. |
|
1046 |
|
1047 - Programs that set Unicode configuration values could cause UnicodeErrors when |
|
1048 generating HTML reports. Pytest-cov is one example. This is now fixed. |
|
1049 |
|
1050 - Prevented deprecation warnings from configparser that happened in some |
|
1051 circumstances, closing `issue 530`_. |
|
1052 |
|
1053 - Corrected the name of the jquery.ba-throttle-debounce.js library. Thanks, |
|
1054 Ben Finney. Closes `issue 505`_. |
|
1055 |
|
1056 - Testing against PyPy 5.6 and PyPy3 5.5. |
|
1057 |
|
1058 - Switched to pytest from nose for running the coverage.py tests. |
|
1059 |
|
1060 - Renamed AUTHORS.txt to CONTRIBUTORS.txt, since there are other ways to |
|
1061 contribute than by writing code. Also put the count of contributors into the |
|
1062 author string in setup.py, though this might be too cute. |
|
1063 |
|
1064 .. _sys.excepthook: https://docs.python.org/3/library/sys.html#sys.excepthook |
|
1065 .. _issue 265: https://github.com/nedbat/coveragepy/issues/265 |
|
1066 .. _issue 412: https://github.com/nedbat/coveragepy/issues/412 |
|
1067 .. _issue 433: https://github.com/nedbat/coveragepy/issues/433 |
|
1068 .. _issue 493: https://github.com/nedbat/coveragepy/issues/493 |
|
1069 .. _issue 496: https://github.com/nedbat/coveragepy/issues/496 |
|
1070 .. _issue 502: https://github.com/nedbat/coveragepy/issues/502 |
|
1071 .. _issue 505: https://github.com/nedbat/coveragepy/issues/505 |
|
1072 .. _issue 514: https://github.com/nedbat/coveragepy/issues/514 |
|
1073 .. _issue 510: https://github.com/nedbat/coveragepy/issues/510 |
|
1074 .. _issue 511: https://github.com/nedbat/coveragepy/issues/511 |
|
1075 .. _issue 516: https://github.com/nedbat/coveragepy/issues/516 |
|
1076 .. _issue 519: https://github.com/nedbat/coveragepy/issues/519 |
|
1077 .. _issue 524: https://github.com/nedbat/coveragepy/issues/524 |
|
1078 .. _issue 525: https://github.com/nedbat/coveragepy/issues/525 |
|
1079 .. _issue 529: https://github.com/nedbat/coveragepy/issues/529 |
|
1080 .. _issue 530: https://github.com/nedbat/coveragepy/issues/530 |
|
1081 .. _issue 533: https://github.com/nedbat/coveragepy/issues/533 |
|
1082 .. _issue 535: https://github.com/nedbat/coveragepy/issues/535 |
|
1083 |
|
1084 |
|
1085 .. _changes_42: |
|
1086 |
|
1087 Version 4.2 --- 2016-07-26 |
|
1088 -------------------------- |
|
1089 |
|
1090 - Since ``concurrency=multiprocessing`` uses subprocesses, options specified on |
|
1091 the coverage.py command line will not be communicated down to them. Only |
|
1092 options in the configuration file will apply to the subprocesses. |
|
1093 Previously, the options didn't apply to the subprocesses, but there was no |
|
1094 indication. Now it is an error to use ``--concurrency=multiprocessing`` and |
|
1095 other run-affecting options on the command line. This prevents |
|
1096 failures like those reported in `issue 495`_. |
|
1097 |
|
1098 - Filtering the HTML report is now faster, thanks to Ville Skyttä. |
|
1099 |
|
1100 .. _issue 495: https://github.com/nedbat/coveragepy/issues/495 |
|
1101 |
|
1102 |
|
1103 Version 4.2b1 --- 2016-07-04 |
|
1104 ---------------------------- |
|
1105 |
|
1106 Work from the PyCon 2016 Sprints! |
|
1107 |
|
1108 - BACKWARD INCOMPATIBILITY: the ``coverage combine`` command now ignores an |
|
1109 existing ``.coverage`` data file. It used to include that file in its |
|
1110 combining. This caused confusing results, and extra tox "clean" steps. If |
|
1111 you want the old behavior, use the new ``coverage combine --append`` option. |
|
1112 |
|
1113 - The ``concurrency`` option can now take multiple values, to support programs |
|
1114 using multiprocessing and another library such as eventlet. This is only |
|
1115 possible in the configuration file, not from the command line. The |
|
1116 configuration file is the only way for sub-processes to all run with the same |
|
1117 options. Fixes `issue 484`_. Thanks to Josh Williams for prototyping. |
|
1118 |
|
1119 - Using a ``concurrency`` setting of ``multiprocessing`` now implies |
|
1120 ``--parallel`` so that the main program is measured similarly to the |
|
1121 sub-processes. |
|
1122 |
|
1123 - When using `automatic subprocess measurement`_, running coverage commands |
|
1124 would create spurious data files. This is now fixed, thanks to diagnosis and |
|
1125 testing by Dan Riti. Closes `issue 492`_. |
|
1126 |
|
1127 - A new configuration option, ``report:sort``, controls what column of the |
|
1128 text report is used to sort the rows. Thanks to Dan Wandschneider, this |
|
1129 closes `issue 199`_. |
|
1130 |
|
1131 - The HTML report has a more-visible indicator for which column is being |
|
1132 sorted. Closes `issue 298`_, thanks to Josh Williams. |
|
1133 |
|
1134 - If the HTML report cannot find the source for a file, the message now |
|
1135 suggests using the ``-i`` flag to allow the report to continue. Closes |
|
1136 `issue 231`_, thanks, Nathan Land. |
|
1137 |
|
1138 - When reports are ignoring errors, there's now a warning if a file cannot be |
|
1139 parsed, rather than being silently ignored. Closes `issue 396`_. Thanks, |
|
1140 Matthew Boehm. |
|
1141 |
|
1142 - A new option for ``coverage debug`` is available: ``coverage debug config`` |
|
1143 shows the current configuration. Closes `issue 454`_, thanks to Matthew |
|
1144 Boehm. |
|
1145 |
|
1146 - Running coverage as a module (``python -m coverage``) no longer shows the |
|
1147 program name as ``__main__.py``. Fixes `issue 478`_. Thanks, Scott Belden. |
|
1148 |
|
1149 - The `test_helpers` module has been moved into a separate pip-installable |
|
1150 package: `unittest-mixins`_. |
|
1151 |
|
1152 .. _automatic subprocess measurement: https://coverage.readthedocs.io/en/latest/subprocess.html |
|
1153 .. _issue 199: https://github.com/nedbat/coveragepy/issues/199 |
|
1154 .. _issue 231: https://github.com/nedbat/coveragepy/issues/231 |
|
1155 .. _issue 298: https://github.com/nedbat/coveragepy/issues/298 |
|
1156 .. _issue 396: https://github.com/nedbat/coveragepy/issues/396 |
|
1157 .. _issue 454: https://github.com/nedbat/coveragepy/issues/454 |
|
1158 .. _issue 478: https://github.com/nedbat/coveragepy/issues/478 |
|
1159 .. _issue 484: https://github.com/nedbat/coveragepy/issues/484 |
|
1160 .. _issue 492: https://github.com/nedbat/coveragepy/issues/492 |
|
1161 .. _unittest-mixins: https://pypi.org/project/unittest-mixins/ |
|
1162 |
|
1163 |
|
1164 .. _changes_41: |
|
1165 |
|
1166 Version 4.1 --- 2016-05-21 |
|
1167 -------------------------- |
|
1168 |
|
1169 - The internal attribute `Reporter.file_reporters` was removed in 4.1b3. It |
|
1170 should have come has no surprise that there were third-party tools out there |
|
1171 using that attribute. It has been restored, but with a deprecation warning. |
|
1172 |
|
1173 |
|
1174 Version 4.1b3 --- 2016-05-10 |
|
1175 ---------------------------- |
|
1176 |
|
1177 - When running your program, execution can jump from an ``except X:`` line to |
|
1178 some other line when an exception other than ``X`` happens. This jump is no |
|
1179 longer considered a branch when measuring branch coverage. |
|
1180 |
|
1181 - When measuring branch coverage, ``yield`` statements that were never resumed |
|
1182 were incorrectly marked as missing, as reported in `issue 440`_. This is now |
|
1183 fixed. |
|
1184 |
|
1185 - During branch coverage of single-line callables like lambdas and generator |
|
1186 expressions, coverage.py can now distinguish between them never being called, |
|
1187 or being called but not completed. Fixes `issue 90`_, `issue 460`_ and |
|
1188 `issue 475`_. |
|
1189 |
|
1190 - The HTML report now has a map of the file along the rightmost edge of the |
|
1191 page, giving an overview of where the missed lines are. Thanks, Dmitry |
|
1192 Shishov. |
|
1193 |
|
1194 - The HTML report now uses different monospaced fonts, favoring Consolas over |
|
1195 Courier. Along the way, `issue 472`_ about not properly handling one-space |
|
1196 indents was fixed. The index page also has slightly different styling, to |
|
1197 try to make the clickable detail pages more apparent. |
|
1198 |
|
1199 - Missing branches reported with ``coverage report -m`` will now say ``->exit`` |
|
1200 for missed branches to the exit of a function, rather than a negative number. |
|
1201 Fixes `issue 469`_. |
|
1202 |
|
1203 - ``coverage --help`` and ``coverage --version`` now mention which tracer is |
|
1204 installed, to help diagnose problems. The docs mention which features need |
|
1205 the C extension. (`issue 479`_) |
|
1206 |
|
1207 - Officially support PyPy 5.1, which required no changes, just updates to the |
|
1208 docs. |
|
1209 |
|
1210 - The `Coverage.report` function had two parameters with non-None defaults, |
|
1211 which have been changed. `show_missing` used to default to True, but now |
|
1212 defaults to None. If you had been calling `Coverage.report` without |
|
1213 specifying `show_missing`, you'll need to explicitly set it to True to keep |
|
1214 the same behavior. `skip_covered` used to default to False. It is now None, |
|
1215 which doesn't change the behavior. This fixes `issue 485`_. |
|
1216 |
|
1217 - It's never been possible to pass a namespace module to one of the analysis |
|
1218 functions, but now at least we raise a more specific error message, rather |
|
1219 than getting confused. (`issue 456`_) |
|
1220 |
|
1221 - The `coverage.process_startup` function now returns the `Coverage` instance |
|
1222 it creates, as suggested in `issue 481`_. |
|
1223 |
|
1224 - Make a small tweak to how we compare threads, to avoid buggy custom |
|
1225 comparison code in thread classes. (`issue 245`_) |
|
1226 |
|
1227 .. _issue 90: https://github.com/nedbat/coveragepy/issues/90 |
|
1228 .. _issue 245: https://github.com/nedbat/coveragepy/issues/245 |
|
1229 .. _issue 440: https://github.com/nedbat/coveragepy/issues/440 |
|
1230 .. _issue 456: https://github.com/nedbat/coveragepy/issues/456 |
|
1231 .. _issue 460: https://github.com/nedbat/coveragepy/issues/460 |
|
1232 .. _issue 469: https://github.com/nedbat/coveragepy/issues/469 |
|
1233 .. _issue 472: https://github.com/nedbat/coveragepy/issues/472 |
|
1234 .. _issue 475: https://github.com/nedbat/coveragepy/issues/475 |
|
1235 .. _issue 479: https://github.com/nedbat/coveragepy/issues/479 |
|
1236 .. _issue 481: https://github.com/nedbat/coveragepy/issues/481 |
|
1237 .. _issue 485: https://github.com/nedbat/coveragepy/issues/485 |
|
1238 |
|
1239 |
|
1240 Version 4.1b2 --- 2016-01-23 |
|
1241 ---------------------------- |
|
1242 |
|
1243 - Problems with the new branch measurement in 4.1 beta 1 were fixed: |
|
1244 |
|
1245 - Class docstrings were considered executable. Now they no longer are. |
|
1246 |
|
1247 - ``yield from`` and ``await`` were considered returns from functions, since |
|
1248 they could transfer control to the caller. This produced unhelpful |
|
1249 "missing branch" reports in a number of circumstances. Now they no longer |
|
1250 are considered returns. |
|
1251 |
|
1252 - In unusual situations, a missing branch to a negative number was reported. |
|
1253 This has been fixed, closing `issue 466`_. |
|
1254 |
|
1255 - The XML report now produces correct package names for modules found in |
|
1256 directories specified with ``source=``. Fixes `issue 465`_. |
|
1257 |
|
1258 - ``coverage report`` won't produce trailing whitespace. |
|
1259 |
|
1260 .. _issue 465: https://github.com/nedbat/coveragepy/issues/465 |
|
1261 .. _issue 466: https://github.com/nedbat/coveragepy/issues/466 |
|
1262 |
|
1263 |
|
1264 Version 4.1b1 --- 2016-01-10 |
|
1265 ---------------------------- |
|
1266 |
|
1267 - Branch analysis has been rewritten: it used to be based on bytecode, but now |
|
1268 uses AST analysis. This has changed a number of things: |
|
1269 |
|
1270 - More code paths are now considered runnable, especially in |
|
1271 ``try``/``except`` structures. This may mean that coverage.py will |
|
1272 identify more code paths as uncovered. This could either raise or lower |
|
1273 your overall coverage number. |
|
1274 |
|
1275 - Python 3.5's ``async`` and ``await`` keywords are properly supported, |
|
1276 fixing `issue 434`_. |
|
1277 |
|
1278 - Some long-standing branch coverage bugs were fixed: |
|
1279 |
|
1280 - `issue 129`_: functions with only a docstring for a body would |
|
1281 incorrectly report a missing branch on the ``def`` line. |
|
1282 |
|
1283 - `issue 212`_: code in an ``except`` block could be incorrectly marked as |
|
1284 a missing branch. |
|
1285 |
|
1286 - `issue 146`_: context managers (``with`` statements) in a loop or ``try`` |
|
1287 block could confuse the branch measurement, reporting incorrect partial |
|
1288 branches. |
|
1289 |
|
1290 - `issue 422`_: in Python 3.5, an actual partial branch could be marked as |
|
1291 complete. |
|
1292 |
|
1293 - Pragmas to disable coverage measurement can now be used on decorator lines, |
|
1294 and they will apply to the entire function or class being decorated. This |
|
1295 implements the feature requested in `issue 131`_. |
|
1296 |
|
1297 - Multiprocessing support is now available on Windows. Thanks, Rodrigue |
|
1298 Cloutier. |
|
1299 |
|
1300 - Files with two encoding declarations are properly supported, fixing |
|
1301 `issue 453`_. Thanks, Max Linke. |
|
1302 |
|
1303 - Non-ascii characters in regexes in the configuration file worked in 3.7, but |
|
1304 stopped working in 4.0. Now they work again, closing `issue 455`_. |
|
1305 |
|
1306 - Form-feed characters would prevent accurate determination of the beginning of |
|
1307 statements in the rest of the file. This is now fixed, closing `issue 461`_. |
|
1308 |
|
1309 .. _issue 129: https://github.com/nedbat/coveragepy/issues/129 |
|
1310 .. _issue 131: https://github.com/nedbat/coveragepy/issues/131 |
|
1311 .. _issue 146: https://github.com/nedbat/coveragepy/issues/146 |
|
1312 .. _issue 212: https://github.com/nedbat/coveragepy/issues/212 |
|
1313 .. _issue 422: https://github.com/nedbat/coveragepy/issues/422 |
|
1314 .. _issue 434: https://github.com/nedbat/coveragepy/issues/434 |
|
1315 .. _issue 453: https://github.com/nedbat/coveragepy/issues/453 |
|
1316 .. _issue 455: https://github.com/nedbat/coveragepy/issues/455 |
|
1317 .. _issue 461: https://github.com/nedbat/coveragepy/issues/461 |
|
1318 |
|
1319 |
|
1320 .. _changes_403: |
|
1321 |
|
1322 Version 4.0.3 --- 2015-11-24 |
|
1323 ---------------------------- |
|
1324 |
|
1325 - Fixed a mysterious problem that manifested in different ways: sometimes |
|
1326 hanging the process (`issue 420`_), sometimes making database connections |
|
1327 fail (`issue 445`_). |
|
1328 |
|
1329 - The XML report now has correct ``<source>`` elements when using a |
|
1330 ``--source=`` option somewhere besides the current directory. This fixes |
|
1331 `issue 439`_. Thanks, Arcadiy Ivanov. |
|
1332 |
|
1333 - Fixed an unusual edge case of detecting source encodings, described in |
|
1334 `issue 443`_. |
|
1335 |
|
1336 - Help messages that mention the command to use now properly use the actual |
|
1337 command name, which might be different than "coverage". Thanks to Ben |
|
1338 Finney, this closes `issue 438`_. |
|
1339 |
|
1340 .. _issue 420: https://github.com/nedbat/coveragepy/issues/420 |
|
1341 .. _issue 438: https://github.com/nedbat/coveragepy/issues/438 |
|
1342 .. _issue 439: https://github.com/nedbat/coveragepy/issues/439 |
|
1343 .. _issue 443: https://github.com/nedbat/coveragepy/issues/443 |
|
1344 .. _issue 445: https://github.com/nedbat/coveragepy/issues/445 |
|
1345 |
|
1346 |
|
1347 .. _changes_402: |
|
1348 |
|
1349 Version 4.0.2 --- 2015-11-04 |
|
1350 ---------------------------- |
|
1351 |
|
1352 - More work on supporting unusually encoded source. Fixed `issue 431`_. |
|
1353 |
|
1354 - Files or directories with non-ASCII characters are now handled properly, |
|
1355 fixing `issue 432`_. |
|
1356 |
|
1357 - Setting a trace function with sys.settrace was broken by a change in 4.0.1, |
|
1358 as reported in `issue 436`_. This is now fixed. |
|
1359 |
|
1360 - Officially support PyPy 4.0, which required no changes, just updates to the |
|
1361 docs. |
|
1362 |
|
1363 .. _issue 431: https://github.com/nedbat/coveragepy/issues/431 |
|
1364 .. _issue 432: https://github.com/nedbat/coveragepy/issues/432 |
|
1365 .. _issue 436: https://github.com/nedbat/coveragepy/issues/436 |
|
1366 |
|
1367 |
|
1368 .. _changes_401: |
|
1369 |
|
1370 Version 4.0.1 --- 2015-10-13 |
|
1371 ---------------------------- |
|
1372 |
|
1373 - When combining data files, unreadable files will now generate a warning |
|
1374 instead of failing the command. This is more in line with the older |
|
1375 coverage.py v3.7.1 behavior, which silently ignored unreadable files. |
|
1376 Prompted by `issue 418`_. |
|
1377 |
|
1378 - The --skip-covered option would skip reporting on 100% covered files, but |
|
1379 also skipped them when calculating total coverage. This was wrong, it should |
|
1380 only remove lines from the report, not change the final answer. This is now |
|
1381 fixed, closing `issue 423`_. |
|
1382 |
|
1383 - In 4.0, the data file recorded a summary of the system on which it was run. |
|
1384 Combined data files would keep all of those summaries. This could lead to |
|
1385 enormous data files consisting of mostly repetitive useless information. That |
|
1386 summary is now gone, fixing `issue 415`_. If you want summary information, |
|
1387 get in touch, and we'll figure out a better way to do it. |
|
1388 |
|
1389 - Test suites that mocked os.path.exists would experience strange failures, due |
|
1390 to coverage.py using their mock inadvertently. This is now fixed, closing |
|
1391 `issue 416`_. |
|
1392 |
|
1393 - Importing a ``__init__`` module explicitly would lead to an error: |
|
1394 ``AttributeError: 'module' object has no attribute '__path__'``, as reported |
|
1395 in `issue 410`_. This is now fixed. |
|
1396 |
|
1397 - Code that uses ``sys.settrace(sys.gettrace())`` used to incur a more than 2x |
|
1398 speed penalty. Now there's no penalty at all. Fixes `issue 397`_. |
|
1399 |
|
1400 - Pyexpat C code will no longer be recorded as a source file, fixing |
|
1401 `issue 419`_. |
|
1402 |
|
1403 - The source kit now contains all of the files needed to have a complete source |
|
1404 tree, re-fixing `issue 137`_ and closing `issue 281`_. |
|
1405 |
|
1406 .. _issue 281: https://github.com/nedbat/coveragepy/issues/281 |
|
1407 .. _issue 397: https://github.com/nedbat/coveragepy/issues/397 |
|
1408 .. _issue 410: https://github.com/nedbat/coveragepy/issues/410 |
|
1409 .. _issue 415: https://github.com/nedbat/coveragepy/issues/415 |
|
1410 .. _issue 416: https://github.com/nedbat/coveragepy/issues/416 |
|
1411 .. _issue 418: https://github.com/nedbat/coveragepy/issues/418 |
|
1412 .. _issue 419: https://github.com/nedbat/coveragepy/issues/419 |
|
1413 .. _issue 423: https://github.com/nedbat/coveragepy/issues/423 |
|
1414 |
|
1415 |
|
1416 .. _changes_40: |
|
1417 |
|
1418 Version 4.0 --- 2015-09-20 |
|
1419 -------------------------- |
|
1420 |
|
1421 No changes from 4.0b3 |
|
1422 |
|
1423 |
|
1424 Version 4.0b3 --- 2015-09-07 |
|
1425 ---------------------------- |
|
1426 |
|
1427 - Reporting on an unmeasured file would fail with a traceback. This is now |
|
1428 fixed, closing `issue 403`_. |
|
1429 |
|
1430 - The Jenkins ShiningPanda_ plugin looks for an obsolete file name to find the |
|
1431 HTML reports to publish, so it was failing under coverage.py 4.0. Now we |
|
1432 create that file if we are running under Jenkins, to keep things working |
|
1433 smoothly. `issue 404`_. |
|
1434 |
|
1435 - Kits used to include tests and docs, but didn't install them anywhere, or |
|
1436 provide all of the supporting tools to make them useful. Kits no longer |
|
1437 include tests and docs. If you were using them from the older packages, get |
|
1438 in touch and help me understand how. |
|
1439 |
|
1440 .. _issue 403: https://github.com/nedbat/coveragepy/issues/403 |
|
1441 .. _issue 404: https://github.com/nedbat/coveragepy/issues/404 |
|
1442 |
|
1443 |
|
1444 Version 4.0b2 --- 2015-08-22 |
|
1445 ---------------------------- |
|
1446 |
|
1447 - 4.0b1 broke ``--append`` creating new data files. This is now fixed, closing |
|
1448 `issue 392`_. |
|
1449 |
|
1450 - ``py.test --cov`` can write empty data, then touch files due to ``--source``, |
|
1451 which made coverage.py mistakenly force the data file to record lines instead |
|
1452 of arcs. This would lead to a "Can't combine line data with arc data" error |
|
1453 message. This is now fixed, and changed some method names in the |
|
1454 CoverageData interface. Fixes `issue 399`_. |
|
1455 |
|
1456 - `CoverageData.read_fileobj` and `CoverageData.write_fileobj` replace the |
|
1457 `.read` and `.write` methods, and are now properly inverses of each other. |
|
1458 |
|
1459 - When using ``report --skip-covered``, a message will now be included in the |
|
1460 report output indicating how many files were skipped, and if all files are |
|
1461 skipped, coverage.py won't accidentally scold you for having no data to |
|
1462 report. Thanks, Krystian Kichewko. |
|
1463 |
|
1464 - A new conversion utility has been added: ``python -m coverage.pickle2json`` |
|
1465 will convert v3.x pickle data files to v4.x JSON data files. Thanks, |
|
1466 Alexander Todorov. Closes `issue 395`_. |
|
1467 |
|
1468 - A new version identifier is available, `coverage.version_info`, a plain tuple |
|
1469 of values similar to `sys.version_info`_. |
|
1470 |
|
1471 .. _issue 392: https://github.com/nedbat/coveragepy/issues/392 |
|
1472 .. _issue 395: https://github.com/nedbat/coveragepy/issues/395 |
|
1473 .. _issue 399: https://github.com/nedbat/coveragepy/issues/399 |
|
1474 .. _sys.version_info: https://docs.python.org/3/library/sys.html#sys.version_info |
|
1475 |
|
1476 |
|
1477 Version 4.0b1 --- 2015-08-02 |
|
1478 ---------------------------- |
|
1479 |
|
1480 - Coverage.py is now licensed under the Apache 2.0 license. See NOTICE.txt for |
|
1481 details. Closes `issue 313`_. |
|
1482 |
|
1483 - The data storage has been completely revamped. The data file is now |
|
1484 JSON-based instead of a pickle, closing `issue 236`_. The `CoverageData` |
|
1485 class is now a public supported documented API to the data file. |
|
1486 |
|
1487 - A new configuration option, ``[run] note``, lets you set a note that will be |
|
1488 stored in the `runs` section of the data file. You can use this to annotate |
|
1489 the data file with any information you like. |
|
1490 |
|
1491 - Unrecognized configuration options will now print an error message and stop |
|
1492 coverage.py. This should help prevent configuration mistakes from passing |
|
1493 silently. Finishes `issue 386`_. |
|
1494 |
|
1495 - In parallel mode, ``coverage erase`` will now delete all of the data files, |
|
1496 fixing `issue 262`_. |
|
1497 |
|
1498 - Coverage.py now accepts a directory name for ``coverage run`` and will run a |
|
1499 ``__main__.py`` found there, just like Python will. Fixes `issue 252`_. |
|
1500 Thanks, Dmitry Trofimov. |
|
1501 |
|
1502 - The XML report now includes a ``missing-branches`` attribute. Thanks, Steve |
|
1503 Peak. This is not a part of the Cobertura DTD, so the XML report no longer |
|
1504 references the DTD. |
|
1505 |
|
1506 - Missing branches in the HTML report now have a bit more information in the |
|
1507 right-hand annotations. Hopefully this will make their meaning clearer. |
|
1508 |
|
1509 - All the reporting functions now behave the same if no data had been |
|
1510 collected, exiting with a status code of 1. Fixed ``fail_under`` to be |
|
1511 applied even when the report is empty. Thanks, Ionel Cristian Mărieș. |
|
1512 |
|
1513 - Plugins are now initialized differently. Instead of looking for a class |
|
1514 called ``Plugin``, coverage.py looks for a function called ``coverage_init``. |
|
1515 |
|
1516 - A file-tracing plugin can now ask to have built-in Python reporting by |
|
1517 returning `"python"` from its `file_reporter()` method. |
|
1518 |
|
1519 - Code that was executed with `exec` would be mis-attributed to the file that |
|
1520 called it. This is now fixed, closing `issue 380`_. |
|
1521 |
|
1522 - The ability to use item access on `Coverage.config` (introduced in 4.0a2) has |
|
1523 been changed to a more explicit `Coverage.get_option` and |
|
1524 `Coverage.set_option` API. |
|
1525 |
|
1526 - The ``Coverage.use_cache`` method is no longer supported. |
|
1527 |
|
1528 - The private method ``Coverage._harvest_data`` is now called |
|
1529 ``Coverage.get_data``, and returns the ``CoverageData`` containing the |
|
1530 collected data. |
|
1531 |
|
1532 - The project is consistently referred to as "coverage.py" throughout the code |
|
1533 and the documentation, closing `issue 275`_. |
|
1534 |
|
1535 - Combining data files with an explicit configuration file was broken in 4.0a6, |
|
1536 but now works again, closing `issue 385`_. |
|
1537 |
|
1538 - ``coverage combine`` now accepts files as well as directories. |
|
1539 |
|
1540 - The speed is back to 3.7.1 levels, after having slowed down due to plugin |
|
1541 support, finishing up `issue 387`_. |
|
1542 |
|
1543 .. _issue 236: https://github.com/nedbat/coveragepy/issues/236 |
|
1544 .. _issue 252: https://github.com/nedbat/coveragepy/issues/252 |
|
1545 .. _issue 262: https://github.com/nedbat/coveragepy/issues/262 |
|
1546 .. _issue 275: https://github.com/nedbat/coveragepy/issues/275 |
|
1547 .. _issue 313: https://github.com/nedbat/coveragepy/issues/313 |
|
1548 .. _issue 380: https://github.com/nedbat/coveragepy/issues/380 |
|
1549 .. _issue 385: https://github.com/nedbat/coveragepy/issues/385 |
|
1550 .. _issue 386: https://github.com/nedbat/coveragepy/issues/386 |
|
1551 .. _issue 387: https://github.com/nedbat/coveragepy/issues/387 |
|
1552 |
|
1553 .. 40 issues closed in 4.0 below here |
|
1554 |
|
1555 |
|
1556 Version 4.0a6 --- 2015-06-21 |
|
1557 ---------------------------- |
|
1558 |
|
1559 - Python 3.5b2 and PyPy 2.6.0 are supported. |
|
1560 |
|
1561 - The original module-level function interface to coverage.py is no longer |
|
1562 supported. You must now create a ``coverage.Coverage`` object, and use |
|
1563 methods on it. |
|
1564 |
|
1565 - The ``coverage combine`` command now accepts any number of directories as |
|
1566 arguments, and will combine all the data files from those directories. This |
|
1567 means you don't have to copy the files to one directory before combining. |
|
1568 Thanks, Christine Lytwynec. Finishes `issue 354`_. |
|
1569 |
|
1570 - Branch coverage couldn't properly handle certain extremely long files. This |
|
1571 is now fixed (`issue 359`_). |
|
1572 |
|
1573 - Branch coverage didn't understand yield statements properly. Mickie Betz |
|
1574 persisted in pursuing this despite Ned's pessimism. Fixes `issue 308`_ and |
|
1575 `issue 324`_. |
|
1576 |
|
1577 - The COVERAGE_DEBUG environment variable can be used to set the |
|
1578 ``[run] debug`` configuration option to control what internal operations are |
|
1579 logged. |
|
1580 |
|
1581 - HTML reports were truncated at formfeed characters. This is now fixed |
|
1582 (`issue 360`_). It's always fun when the problem is due to a `bug in the |
|
1583 Python standard library <http://bugs.python.org/issue19035>`_. |
|
1584 |
|
1585 - Files with incorrect encoding declaration comments are no longer ignored by |
|
1586 the reporting commands, fixing `issue 351`_. |
|
1587 |
|
1588 - HTML reports now include a timestamp in the footer, closing `issue 299`_. |
|
1589 Thanks, Conrad Ho. |
|
1590 |
|
1591 - HTML reports now begrudgingly use double-quotes rather than single quotes, |
|
1592 because there are "software engineers" out there writing tools that read HTML |
|
1593 and somehow have no idea that single quotes exist. Capitulates to the absurd |
|
1594 `issue 361`_. Thanks, Jon Chappell. |
|
1595 |
|
1596 - The ``coverage annotate`` command now handles non-ASCII characters properly, |
|
1597 closing `issue 363`_. Thanks, Leonardo Pistone. |
|
1598 |
|
1599 - Drive letters on Windows were not normalized correctly, now they are. Thanks, |
|
1600 Ionel Cristian Mărieș. |
|
1601 |
|
1602 - Plugin support had some bugs fixed, closing `issue 374`_ and `issue 375`_. |
|
1603 Thanks, Stefan Behnel. |
|
1604 |
|
1605 .. _issue 299: https://github.com/nedbat/coveragepy/issues/299 |
|
1606 .. _issue 308: https://github.com/nedbat/coveragepy/issues/308 |
|
1607 .. _issue 324: https://github.com/nedbat/coveragepy/issues/324 |
|
1608 .. _issue 351: https://github.com/nedbat/coveragepy/issues/351 |
|
1609 .. _issue 354: https://github.com/nedbat/coveragepy/issues/354 |
|
1610 .. _issue 359: https://github.com/nedbat/coveragepy/issues/359 |
|
1611 .. _issue 360: https://github.com/nedbat/coveragepy/issues/360 |
|
1612 .. _issue 361: https://github.com/nedbat/coveragepy/issues/361 |
|
1613 .. _issue 363: https://github.com/nedbat/coveragepy/issues/363 |
|
1614 .. _issue 374: https://github.com/nedbat/coveragepy/issues/374 |
|
1615 .. _issue 375: https://github.com/nedbat/coveragepy/issues/375 |
|
1616 |
|
1617 |
|
1618 Version 4.0a5 --- 2015-02-16 |
|
1619 ---------------------------- |
|
1620 |
|
1621 - Plugin support is now implemented in the C tracer instead of the Python |
|
1622 tracer. This greatly improves the speed of tracing projects using plugins. |
|
1623 |
|
1624 - Coverage.py now always adds the current directory to sys.path, so that |
|
1625 plugins can import files in the current directory (`issue 358`_). |
|
1626 |
|
1627 - If the `config_file` argument to the Coverage constructor is specified as |
|
1628 ".coveragerc", it is treated as if it were True. This means setup.cfg is |
|
1629 also examined, and a missing file is not considered an error (`issue 357`_). |
|
1630 |
|
1631 - Wildly experimental: support for measuring processes started by the |
|
1632 multiprocessing module. To use, set ``--concurrency=multiprocessing``, |
|
1633 either on the command line or in the .coveragerc file (`issue 117`_). Thanks, |
|
1634 Eduardo Schettino. Currently, this does not work on Windows. |
|
1635 |
|
1636 - A new warning is possible, if a desired file isn't measured because it was |
|
1637 imported before coverage.py was started (`issue 353`_). |
|
1638 |
|
1639 - The `coverage.process_startup` function now will start coverage measurement |
|
1640 only once, no matter how many times it is called. This fixes problems due |
|
1641 to unusual virtualenv configurations (`issue 340`_). |
|
1642 |
|
1643 - Added 3.5.0a1 to the list of supported CPython versions. |
|
1644 |
|
1645 .. _issue 117: https://github.com/nedbat/coveragepy/issues/117 |
|
1646 .. _issue 340: https://github.com/nedbat/coveragepy/issues/340 |
|
1647 .. _issue 353: https://github.com/nedbat/coveragepy/issues/353 |
|
1648 .. _issue 357: https://github.com/nedbat/coveragepy/issues/357 |
|
1649 .. _issue 358: https://github.com/nedbat/coveragepy/issues/358 |
|
1650 |
|
1651 |
|
1652 Version 4.0a4 --- 2015-01-25 |
|
1653 ---------------------------- |
|
1654 |
|
1655 - Plugins can now provide sys_info for debugging output. |
|
1656 |
|
1657 - Started plugins documentation. |
|
1658 |
|
1659 - Prepared to move the docs to readthedocs.org. |
|
1660 |
|
1661 |
|
1662 Version 4.0a3 --- 2015-01-20 |
|
1663 ---------------------------- |
|
1664 |
|
1665 - Reports now use file names with extensions. Previously, a report would |
|
1666 describe a/b/c.py as "a/b/c". Now it is shown as "a/b/c.py". This allows |
|
1667 for better support of non-Python files, and also fixed `issue 69`_. |
|
1668 |
|
1669 - The XML report now reports each directory as a package again. This was a bad |
|
1670 regression, I apologize. This was reported in `issue 235`_, which is now |
|
1671 fixed. |
|
1672 |
|
1673 - A new configuration option for the XML report: ``[xml] package_depth`` |
|
1674 controls which directories are identified as packages in the report. |
|
1675 Directories deeper than this depth are not reported as packages. |
|
1676 The default is that all directories are reported as packages. |
|
1677 Thanks, Lex Berezhny. |
|
1678 |
|
1679 - When looking for the source for a frame, check if the file exists. On |
|
1680 Windows, .pyw files are no longer recorded as .py files. Along the way, this |
|
1681 fixed `issue 290`_. |
|
1682 |
|
1683 - Empty files are now reported as 100% covered in the XML report, not 0% |
|
1684 covered (`issue 345`_). |
|
1685 |
|
1686 - Regexes in the configuration file are now compiled as soon as they are read, |
|
1687 to provide error messages earlier (`issue 349`_). |
|
1688 |
|
1689 .. _issue 69: https://github.com/nedbat/coveragepy/issues/69 |
|
1690 .. _issue 235: https://github.com/nedbat/coveragepy/issues/235 |
|
1691 .. _issue 290: https://github.com/nedbat/coveragepy/issues/290 |
|
1692 .. _issue 345: https://github.com/nedbat/coveragepy/issues/345 |
|
1693 .. _issue 349: https://github.com/nedbat/coveragepy/issues/349 |
|
1694 |
|
1695 |
|
1696 Version 4.0a2 --- 2015-01-14 |
|
1697 ---------------------------- |
|
1698 |
|
1699 - Officially support PyPy 2.4, and PyPy3 2.4. Drop support for |
|
1700 CPython 3.2 and older versions of PyPy. The code won't work on CPython 3.2. |
|
1701 It will probably still work on older versions of PyPy, but I'm not testing |
|
1702 against them. |
|
1703 |
|
1704 - Plugins! |
|
1705 |
|
1706 - The original command line switches (`-x` to run a program, etc) are no |
|
1707 longer supported. |
|
1708 |
|
1709 - A new option: `coverage report --skip-covered` will reduce the number of |
|
1710 files reported by skipping files with 100% coverage. Thanks, Krystian |
|
1711 Kichewko. This means that empty `__init__.py` files will be skipped, since |
|
1712 they are 100% covered, closing `issue 315`_. |
|
1713 |
|
1714 - You can now specify the ``--fail-under`` option in the ``.coveragerc`` file |
|
1715 as the ``[report] fail_under`` option. This closes `issue 314`_. |
|
1716 |
|
1717 - The ``COVERAGE_OPTIONS`` environment variable is no longer supported. It was |
|
1718 a hack for ``--timid`` before configuration files were available. |
|
1719 |
|
1720 - The HTML report now has filtering. Type text into the Filter box on the |
|
1721 index page, and only modules with that text in the name will be shown. |
|
1722 Thanks, Danny Allen. |
|
1723 |
|
1724 - The textual report and the HTML report used to report partial branches |
|
1725 differently for no good reason. Now the text report's "missing branches" |
|
1726 column is a "partial branches" column so that both reports show the same |
|
1727 numbers. This closes `issue 342`_. |
|
1728 |
|
1729 - If you specify a ``--rcfile`` that cannot be read, you will get an error |
|
1730 message. Fixes `issue 343`_. |
|
1731 |
|
1732 - The ``--debug`` switch can now be used on any command. |
|
1733 |
|
1734 - You can now programmatically adjust the configuration of coverage.py by |
|
1735 setting items on `Coverage.config` after construction. |
|
1736 |
|
1737 - A module run with ``-m`` can be used as the argument to ``--source``, fixing |
|
1738 `issue 328`_. Thanks, Buck Evan. |
|
1739 |
|
1740 - The regex for matching exclusion pragmas has been fixed to allow more kinds |
|
1741 of whitespace, fixing `issue 334`_. |
|
1742 |
|
1743 - Made some PyPy-specific tweaks to improve speed under PyPy. Thanks, Alex |
|
1744 Gaynor. |
|
1745 |
|
1746 - In some cases, with a source file missing a final newline, coverage.py would |
|
1747 count statements incorrectly. This is now fixed, closing `issue 293`_. |
|
1748 |
|
1749 - The status.dat file that HTML reports use to avoid re-creating files that |
|
1750 haven't changed is now a JSON file instead of a pickle file. This obviates |
|
1751 `issue 287`_ and `issue 237`_. |
|
1752 |
|
1753 .. _issue 237: https://github.com/nedbat/coveragepy/issues/237 |
|
1754 .. _issue 287: https://github.com/nedbat/coveragepy/issues/287 |
|
1755 .. _issue 293: https://github.com/nedbat/coveragepy/issues/293 |
|
1756 .. _issue 314: https://github.com/nedbat/coveragepy/issues/314 |
|
1757 .. _issue 315: https://github.com/nedbat/coveragepy/issues/315 |
|
1758 .. _issue 328: https://github.com/nedbat/coveragepy/issues/328 |
|
1759 .. _issue 334: https://github.com/nedbat/coveragepy/issues/334 |
|
1760 .. _issue 342: https://github.com/nedbat/coveragepy/issues/342 |
|
1761 .. _issue 343: https://github.com/nedbat/coveragepy/issues/343 |
|
1762 |
|
1763 |
|
1764 Version 4.0a1 --- 2014-09-27 |
|
1765 ---------------------------- |
|
1766 |
|
1767 - Python versions supported are now CPython 2.6, 2.7, 3.2, 3.3, and 3.4, and |
|
1768 PyPy 2.2. |
|
1769 |
|
1770 - Gevent, eventlet, and greenlet are now supported, closing `issue 149`_. |
|
1771 The ``concurrency`` setting specifies the concurrency library in use. Huge |
|
1772 thanks to Peter Portante for initial implementation, and to Joe Jevnik for |
|
1773 the final insight that completed the work. |
|
1774 |
|
1775 - Options are now also read from a setup.cfg file, if any. Sections are |
|
1776 prefixed with "coverage:", so the ``[run]`` options will be read from the |
|
1777 ``[coverage:run]`` section of setup.cfg. Finishes `issue 304`_. |
|
1778 |
|
1779 - The ``report -m`` command can now show missing branches when reporting on |
|
1780 branch coverage. Thanks, Steve Leonard. Closes `issue 230`_. |
|
1781 |
|
1782 - The XML report now contains a <source> element, fixing `issue 94`_. Thanks |
|
1783 Stan Hu. |
|
1784 |
|
1785 - The class defined in the coverage module is now called ``Coverage`` instead |
|
1786 of ``coverage``, though the old name still works, for backward compatibility. |
|
1787 |
|
1788 - The ``fail-under`` value is now rounded the same as reported results, |
|
1789 preventing paradoxical results, fixing `issue 284`_. |
|
1790 |
|
1791 - The XML report will now create the output directory if need be, fixing |
|
1792 `issue 285`_. Thanks, Chris Rose. |
|
1793 |
|
1794 - HTML reports no longer raise UnicodeDecodeError if a Python file has |
|
1795 undecodable characters, fixing `issue 303`_ and `issue 331`_. |
|
1796 |
|
1797 - The annotate command will now annotate all files, not just ones relative to |
|
1798 the current directory, fixing `issue 57`_. |
|
1799 |
|
1800 - The coverage module no longer causes deprecation warnings on Python 3.4 by |
|
1801 importing the imp module, fixing `issue 305`_. |
|
1802 |
|
1803 - Encoding declarations in source files are only considered if they are truly |
|
1804 comments. Thanks, Anthony Sottile. |
|
1805 |
|
1806 .. _issue 57: https://github.com/nedbat/coveragepy/issues/57 |
|
1807 .. _issue 94: https://github.com/nedbat/coveragepy/issues/94 |
|
1808 .. _issue 149: https://github.com/nedbat/coveragepy/issues/149 |
|
1809 .. _issue 230: https://github.com/nedbat/coveragepy/issues/230 |
|
1810 .. _issue 284: https://github.com/nedbat/coveragepy/issues/284 |
|
1811 .. _issue 285: https://github.com/nedbat/coveragepy/issues/285 |
|
1812 .. _issue 303: https://github.com/nedbat/coveragepy/issues/303 |
|
1813 .. _issue 304: https://github.com/nedbat/coveragepy/issues/304 |
|
1814 .. _issue 305: https://github.com/nedbat/coveragepy/issues/305 |
|
1815 .. _issue 331: https://github.com/nedbat/coveragepy/issues/331 |
|
1816 |
|
1817 |
|
1818 .. _changes_371: |
|
1819 |
|
1820 Version 3.7.1 --- 2013-12-13 |
|
1821 ---------------------------- |
|
1822 |
|
1823 - Improved the speed of HTML report generation by about 20%. |
|
1824 |
|
1825 - Fixed the mechanism for finding OS-installed static files for the HTML report |
|
1826 so that it will actually find OS-installed static files. |
|
1827 |
|
1828 |
|
1829 .. _changes_37: |
|
1830 |
|
1831 Version 3.7 --- 2013-10-06 |
|
1832 -------------------------- |
|
1833 |
|
1834 - Added the ``--debug`` switch to ``coverage run``. It accepts a list of |
|
1835 options indicating the type of internal activity to log to stderr. |
|
1836 |
|
1837 - Improved the branch coverage facility, fixing `issue 92`_ and `issue 175`_. |
|
1838 |
|
1839 - Running code with ``coverage run -m`` now behaves more like Python does, |
|
1840 setting sys.path properly, which fixes `issue 207`_ and `issue 242`_. |
|
1841 |
|
1842 - Coverage.py can now run .pyc files directly, closing `issue 264`_. |
|
1843 |
|
1844 - Coverage.py properly supports .pyw files, fixing `issue 261`_. |
|
1845 |
|
1846 - Omitting files within a tree specified with the ``source`` option would |
|
1847 cause them to be incorrectly marked as unexecuted, as described in |
|
1848 `issue 218`_. This is now fixed. |
|
1849 |
|
1850 - When specifying paths to alias together during data combining, you can now |
|
1851 specify relative paths, fixing `issue 267`_. |
|
1852 |
|
1853 - Most file paths can now be specified with username expansion (``~/src``, or |
|
1854 ``~build/src``, for example), and with environment variable expansion |
|
1855 (``build/$BUILDNUM/src``). |
|
1856 |
|
1857 - Trying to create an XML report with no files to report on, would cause a |
|
1858 ZeroDivideError, but no longer does, fixing `issue 250`_. |
|
1859 |
|
1860 - When running a threaded program under the Python tracer, coverage.py no |
|
1861 longer issues a spurious warning about the trace function changing: "Trace |
|
1862 function changed, measurement is likely wrong: None." This fixes `issue |
|
1863 164`_. |
|
1864 |
|
1865 - Static files necessary for HTML reports are found in system-installed places, |
|
1866 to ease OS-level packaging of coverage.py. Closes `issue 259`_. |
|
1867 |
|
1868 - Source files with encoding declarations, but a blank first line, were not |
|
1869 decoded properly. Now they are. Thanks, Roger Hu. |
|
1870 |
|
1871 - The source kit now includes the ``__main__.py`` file in the root coverage |
|
1872 directory, fixing `issue 255`_. |
|
1873 |
|
1874 .. _issue 92: https://github.com/nedbat/coveragepy/issues/92 |
|
1875 .. _issue 164: https://github.com/nedbat/coveragepy/issues/164 |
|
1876 .. _issue 175: https://github.com/nedbat/coveragepy/issues/175 |
|
1877 .. _issue 207: https://github.com/nedbat/coveragepy/issues/207 |
|
1878 .. _issue 242: https://github.com/nedbat/coveragepy/issues/242 |
|
1879 .. _issue 218: https://github.com/nedbat/coveragepy/issues/218 |
|
1880 .. _issue 250: https://github.com/nedbat/coveragepy/issues/250 |
|
1881 .. _issue 255: https://github.com/nedbat/coveragepy/issues/255 |
|
1882 .. _issue 259: https://github.com/nedbat/coveragepy/issues/259 |
|
1883 .. _issue 261: https://github.com/nedbat/coveragepy/issues/261 |
|
1884 .. _issue 264: https://github.com/nedbat/coveragepy/issues/264 |
|
1885 .. _issue 267: https://github.com/nedbat/coveragepy/issues/267 |
|
1886 |
|
1887 |
|
1888 .. _changes_36: |
|
1889 |
|
1890 Version 3.6 --- 2013-01-05 |
|
1891 -------------------------- |
|
1892 |
|
1893 - Added a page to the docs about troublesome situations, closing `issue 226`_, |
|
1894 and added some info to the TODO file, closing `issue 227`_. |
|
1895 |
|
1896 .. _issue 226: https://github.com/nedbat/coveragepy/issues/226 |
|
1897 .. _issue 227: https://github.com/nedbat/coveragepy/issues/227 |
|
1898 |
|
1899 |
|
1900 Version 3.6b3 --- 2012-12-29 |
|
1901 ---------------------------- |
|
1902 |
|
1903 - Beta 2 broke the nose plugin. It's fixed again, closing `issue 224`_. |
|
1904 |
|
1905 .. _issue 224: https://github.com/nedbat/coveragepy/issues/224 |
|
1906 |
|
1907 |
|
1908 Version 3.6b2 --- 2012-12-23 |
|
1909 ---------------------------- |
|
1910 |
|
1911 - Coverage.py runs on Python 2.3 and 2.4 again. It was broken in 3.6b1. |
|
1912 |
|
1913 - The C extension is optionally compiled using a different more widely-used |
|
1914 technique, taking another stab at fixing `issue 80`_ once and for all. |
|
1915 |
|
1916 - Combining data files would create entries for phantom files if used with |
|
1917 ``source`` and path aliases. It no longer does. |
|
1918 |
|
1919 - ``debug sys`` now shows the configuration file path that was read. |
|
1920 |
|
1921 - If an oddly-behaved package claims that code came from an empty-string |
|
1922 file name, coverage.py no longer associates it with the directory name, |
|
1923 fixing `issue 221`_. |
|
1924 |
|
1925 .. _issue 221: https://github.com/nedbat/coveragepy/issues/221 |
|
1926 |
|
1927 |
|
1928 Version 3.6b1 --- 2012-11-28 |
|
1929 ---------------------------- |
|
1930 |
|
1931 - Wildcards in ``include=`` and ``omit=`` arguments were not handled properly |
|
1932 in reporting functions, though they were when running. Now they are handled |
|
1933 uniformly, closing `issue 143`_ and `issue 163`_. **NOTE**: it is possible |
|
1934 that your configurations may now be incorrect. If you use ``include`` or |
|
1935 ``omit`` during reporting, whether on the command line, through the API, or |
|
1936 in a configuration file, please check carefully that you were not relying on |
|
1937 the old broken behavior. |
|
1938 |
|
1939 - The **report**, **html**, and **xml** commands now accept a ``--fail-under`` |
|
1940 switch that indicates in the exit status whether the coverage percentage was |
|
1941 less than a particular value. Closes `issue 139`_. |
|
1942 |
|
1943 - The reporting functions coverage.report(), coverage.html_report(), and |
|
1944 coverage.xml_report() now all return a float, the total percentage covered |
|
1945 measurement. |
|
1946 |
|
1947 - The HTML report's title can now be set in the configuration file, with the |
|
1948 ``--title`` switch on the command line, or via the API. |
|
1949 |
|
1950 - Configuration files now support substitution of environment variables, using |
|
1951 syntax like ``${WORD}``. Closes `issue 97`_. |
|
1952 |
|
1953 - Embarrassingly, the ``[xml] output=`` setting in the .coveragerc file simply |
|
1954 didn't work. Now it does. |
|
1955 |
|
1956 - The XML report now consistently uses file names for the file name attribute, |
|
1957 rather than sometimes using module names. Fixes `issue 67`_. |
|
1958 Thanks, Marcus Cobden. |
|
1959 |
|
1960 - Coverage percentage metrics are now computed slightly differently under |
|
1961 branch coverage. This means that completely unexecuted files will now |
|
1962 correctly have 0% coverage, fixing `issue 156`_. This also means that your |
|
1963 total coverage numbers will generally now be lower if you are measuring |
|
1964 branch coverage. |
|
1965 |
|
1966 - When installing, now in addition to creating a "coverage" command, two new |
|
1967 aliases are also installed. A "coverage2" or "coverage3" command will be |
|
1968 created, depending on whether you are installing in Python 2.x or 3.x. |
|
1969 A "coverage-X.Y" command will also be created corresponding to your specific |
|
1970 version of Python. Closes `issue 111`_. |
|
1971 |
|
1972 - The coverage.py installer no longer tries to bootstrap setuptools or |
|
1973 Distribute. You must have one of them installed first, as `issue 202`_ |
|
1974 recommended. |
|
1975 |
|
1976 - The coverage.py kit now includes docs (closing `issue 137`_) and tests. |
|
1977 |
|
1978 - On Windows, files are now reported in their correct case, fixing `issue 89`_ |
|
1979 and `issue 203`_. |
|
1980 |
|
1981 - If a file is missing during reporting, the path shown in the error message |
|
1982 is now correct, rather than an incorrect path in the current directory. |
|
1983 Fixes `issue 60`_. |
|
1984 |
|
1985 - Running an HTML report in Python 3 in the same directory as an old Python 2 |
|
1986 HTML report would fail with a UnicodeDecodeError. This issue (`issue 193`_) |
|
1987 is now fixed. |
|
1988 |
|
1989 - Fixed yet another error trying to parse non-Python files as Python, this |
|
1990 time an IndentationError, closing `issue 82`_ for the fourth time... |
|
1991 |
|
1992 - If `coverage xml` fails because there is no data to report, it used to |
|
1993 create a zero-length XML file. Now it doesn't, fixing `issue 210`_. |
|
1994 |
|
1995 - Jython files now work with the ``--source`` option, fixing `issue 100`_. |
|
1996 |
|
1997 - Running coverage.py under a debugger is unlikely to work, but it shouldn't |
|
1998 fail with "TypeError: 'NoneType' object is not iterable". Fixes `issue |
|
1999 201`_. |
|
2000 |
|
2001 - On some Linux distributions, when installed with the OS package manager, |
|
2002 coverage.py would report its own code as part of the results. Now it won't, |
|
2003 fixing `issue 214`_, though this will take some time to be repackaged by the |
|
2004 operating systems. |
|
2005 |
|
2006 - Docstrings for the legacy singleton methods are more helpful. Thanks Marius |
|
2007 Gedminas. Closes `issue 205`_. |
|
2008 |
|
2009 - The pydoc tool can now show documentation for the class `coverage.coverage`. |
|
2010 Closes `issue 206`_. |
|
2011 |
|
2012 - Added a page to the docs about contributing to coverage.py, closing |
|
2013 `issue 171`_. |
|
2014 |
|
2015 - When coverage.py ended unsuccessfully, it may have reported odd errors like |
|
2016 ``'NoneType' object has no attribute 'isabs'``. It no longer does, |
|
2017 so kiss `issue 153`_ goodbye. |
|
2018 |
|
2019 .. _issue 60: https://github.com/nedbat/coveragepy/issues/60 |
|
2020 .. _issue 67: https://github.com/nedbat/coveragepy/issues/67 |
|
2021 .. _issue 89: https://github.com/nedbat/coveragepy/issues/89 |
|
2022 .. _issue 97: https://github.com/nedbat/coveragepy/issues/97 |
|
2023 .. _issue 100: https://github.com/nedbat/coveragepy/issues/100 |
|
2024 .. _issue 111: https://github.com/nedbat/coveragepy/issues/111 |
|
2025 .. _issue 137: https://github.com/nedbat/coveragepy/issues/137 |
|
2026 .. _issue 139: https://github.com/nedbat/coveragepy/issues/139 |
|
2027 .. _issue 143: https://github.com/nedbat/coveragepy/issues/143 |
|
2028 .. _issue 153: https://github.com/nedbat/coveragepy/issues/153 |
|
2029 .. _issue 156: https://github.com/nedbat/coveragepy/issues/156 |
|
2030 .. _issue 163: https://github.com/nedbat/coveragepy/issues/163 |
|
2031 .. _issue 171: https://github.com/nedbat/coveragepy/issues/171 |
|
2032 .. _issue 193: https://github.com/nedbat/coveragepy/issues/193 |
|
2033 .. _issue 201: https://github.com/nedbat/coveragepy/issues/201 |
|
2034 .. _issue 202: https://github.com/nedbat/coveragepy/issues/202 |
|
2035 .. _issue 203: https://github.com/nedbat/coveragepy/issues/203 |
|
2036 .. _issue 205: https://github.com/nedbat/coveragepy/issues/205 |
|
2037 .. _issue 206: https://github.com/nedbat/coveragepy/issues/206 |
|
2038 .. _issue 210: https://github.com/nedbat/coveragepy/issues/210 |
|
2039 .. _issue 214: https://github.com/nedbat/coveragepy/issues/214 |
|
2040 |
|
2041 |
|
2042 .. _changes_353: |
|
2043 |
|
2044 Version 3.5.3 --- 2012-09-29 |
|
2045 ---------------------------- |
|
2046 |
|
2047 - Line numbers in the HTML report line up better with the source lines, fixing |
|
2048 `issue 197`_, thanks Marius Gedminas. |
|
2049 |
|
2050 - When specifying a directory as the source= option, the directory itself no |
|
2051 longer needs to have a ``__init__.py`` file, though its sub-directories do, |
|
2052 to be considered as source files. |
|
2053 |
|
2054 - Files encoded as UTF-8 with a BOM are now properly handled, fixing |
|
2055 `issue 179`_. Thanks, Pablo Carballo. |
|
2056 |
|
2057 - Fixed more cases of non-Python files being reported as Python source, and |
|
2058 then not being able to parse them as Python. Closes `issue 82`_ (again). |
|
2059 Thanks, Julian Berman. |
|
2060 |
|
2061 - Fixed memory leaks under Python 3, thanks, Brett Cannon. Closes `issue 147`_. |
|
2062 |
|
2063 - Optimized .pyo files may not have been handled correctly, `issue 195`_. |
|
2064 Thanks, Marius Gedminas. |
|
2065 |
|
2066 - Certain unusually named file paths could have been mangled during reporting, |
|
2067 `issue 194`_. Thanks, Marius Gedminas. |
|
2068 |
|
2069 - Try to do a better job of the impossible task of detecting when we can't |
|
2070 build the C extension, fixing `issue 183`_. |
|
2071 |
|
2072 - Testing is now done with `tox`_, thanks, Marc Abramowitz. |
|
2073 |
|
2074 .. _issue 147: https://github.com/nedbat/coveragepy/issues/147 |
|
2075 .. _issue 179: https://github.com/nedbat/coveragepy/issues/179 |
|
2076 .. _issue 183: https://github.com/nedbat/coveragepy/issues/183 |
|
2077 .. _issue 194: https://github.com/nedbat/coveragepy/issues/194 |
|
2078 .. _issue 195: https://github.com/nedbat/coveragepy/issues/195 |
|
2079 .. _issue 197: https://github.com/nedbat/coveragepy/issues/197 |
|
2080 .. _tox: https://tox.readthedocs.io/ |
|
2081 |
|
2082 |
|
2083 .. _changes_352: |
|
2084 |
|
2085 Version 3.5.2 --- 2012-05-04 |
|
2086 ---------------------------- |
|
2087 |
|
2088 No changes since 3.5.2.b1 |
|
2089 |
|
2090 |
|
2091 Version 3.5.2b1 --- 2012-04-29 |
|
2092 ------------------------------ |
|
2093 |
|
2094 - The HTML report has slightly tweaked controls: the buttons at the top of |
|
2095 the page are color-coded to the source lines they affect. |
|
2096 |
|
2097 - Custom CSS can be applied to the HTML report by specifying a CSS file as |
|
2098 the ``extra_css`` configuration value in the ``[html]`` section. |
|
2099 |
|
2100 - Source files with custom encodings declared in a comment at the top are now |
|
2101 properly handled during reporting on Python 2. Python 3 always handled them |
|
2102 properly. This fixes `issue 157`_. |
|
2103 |
|
2104 - Backup files left behind by editors are no longer collected by the source= |
|
2105 option, fixing `issue 168`_. |
|
2106 |
|
2107 - If a file doesn't parse properly as Python, we don't report it as an error |
|
2108 if the file name seems like maybe it wasn't meant to be Python. This is a |
|
2109 pragmatic fix for `issue 82`_. |
|
2110 |
|
2111 - The ``-m`` switch on ``coverage report``, which includes missing line numbers |
|
2112 in the summary report, can now be specified as ``show_missing`` in the |
|
2113 config file. Closes `issue 173`_. |
|
2114 |
|
2115 - When running a module with ``coverage run -m <modulename>``, certain details |
|
2116 of the execution environment weren't the same as for |
|
2117 ``python -m <modulename>``. This had the unfortunate side-effect of making |
|
2118 ``coverage run -m unittest discover`` not work if you had tests in a |
|
2119 directory named "test". This fixes `issue 155`_ and `issue 142`_. |
|
2120 |
|
2121 - Now the exit status of your product code is properly used as the process |
|
2122 status when running ``python -m coverage run ...``. Thanks, JT Olds. |
|
2123 |
|
2124 - When installing into pypy, we no longer attempt (and fail) to compile |
|
2125 the C tracer function, closing `issue 166`_. |
|
2126 |
|
2127 .. _issue 142: https://github.com/nedbat/coveragepy/issues/142 |
|
2128 .. _issue 155: https://github.com/nedbat/coveragepy/issues/155 |
|
2129 .. _issue 157: https://github.com/nedbat/coveragepy/issues/157 |
|
2130 .. _issue 166: https://github.com/nedbat/coveragepy/issues/166 |
|
2131 .. _issue 168: https://github.com/nedbat/coveragepy/issues/168 |
|
2132 .. _issue 173: https://github.com/nedbat/coveragepy/issues/173 |
|
2133 |
|
2134 |
|
2135 .. _changes_351: |
|
2136 |
|
2137 Version 3.5.1 --- 2011-09-23 |
|
2138 ---------------------------- |
|
2139 |
|
2140 - The ``[paths]`` feature unfortunately didn't work in real world situations |
|
2141 where you wanted to, you know, report on the combined data. Now all paths |
|
2142 stored in the combined file are canonicalized properly. |
|
2143 |
|
2144 |
|
2145 Version 3.5.1b1 --- 2011-08-28 |
|
2146 ------------------------------ |
|
2147 |
|
2148 - When combining data files from parallel runs, you can now instruct |
|
2149 coverage.py about which directories are equivalent on different machines. A |
|
2150 ``[paths]`` section in the configuration file lists paths that are to be |
|
2151 considered equivalent. Finishes `issue 17`_. |
|
2152 |
|
2153 - for-else constructs are understood better, and don't cause erroneous partial |
|
2154 branch warnings. Fixes `issue 122`_. |
|
2155 |
|
2156 - Branch coverage for ``with`` statements is improved, fixing `issue 128`_. |
|
2157 |
|
2158 - The number of partial branches reported on the HTML summary page was |
|
2159 different than the number reported on the individual file pages. This is |
|
2160 now fixed. |
|
2161 |
|
2162 - An explicit include directive to measure files in the Python installation |
|
2163 wouldn't work because of the standard library exclusion. Now the include |
|
2164 directive takes precedence, and the files will be measured. Fixes |
|
2165 `issue 138`_. |
|
2166 |
|
2167 - The HTML report now handles Unicode characters in Python source files |
|
2168 properly. This fixes `issue 124`_ and `issue 144`_. Thanks, Devin |
|
2169 Jeanpierre. |
|
2170 |
|
2171 - In order to help the core developers measure the test coverage of the |
|
2172 standard library, Brandon Rhodes devised an aggressive hack to trick Python |
|
2173 into running some coverage.py code before anything else in the process. |
|
2174 See the coverage/fullcoverage directory if you are interested. |
|
2175 |
|
2176 .. _issue 17: https://github.com/nedbat/coveragepy/issues/17 |
|
2177 .. _issue 122: https://github.com/nedbat/coveragepy/issues/122 |
|
2178 .. _issue 124: https://github.com/nedbat/coveragepy/issues/124 |
|
2179 .. _issue 128: https://github.com/nedbat/coveragepy/issues/128 |
|
2180 .. _issue 138: https://github.com/nedbat/coveragepy/issues/138 |
|
2181 .. _issue 144: https://github.com/nedbat/coveragepy/issues/144 |
|
2182 |
|
2183 |
|
2184 .. _changes_35: |
|
2185 |
|
2186 Version 3.5 --- 2011-06-29 |
|
2187 -------------------------- |
|
2188 |
|
2189 - The HTML report hotkeys now behave slightly differently when the current |
|
2190 chunk isn't visible at all: a chunk on the screen will be selected, |
|
2191 instead of the old behavior of jumping to the literal next chunk. |
|
2192 The hotkeys now work in Google Chrome. Thanks, Guido van Rossum. |
|
2193 |
|
2194 |
|
2195 Version 3.5b1 --- 2011-06-05 |
|
2196 ---------------------------- |
|
2197 |
|
2198 - The HTML report now has hotkeys. Try ``n``, ``s``, ``m``, ``x``, ``b``, |
|
2199 ``p``, and ``c`` on the overview page to change the column sorting. |
|
2200 On a file page, ``r``, ``m``, ``x``, and ``p`` toggle the run, missing, |
|
2201 excluded, and partial line markings. You can navigate the highlighted |
|
2202 sections of code by using the ``j`` and ``k`` keys for next and previous. |
|
2203 The ``1`` (one) key jumps to the first highlighted section in the file, |
|
2204 and ``0`` (zero) scrolls to the top of the file. |
|
2205 |
|
2206 - The ``--omit`` and ``--include`` switches now interpret their values more |
|
2207 usefully. If the value starts with a wildcard character, it is used as-is. |
|
2208 If it does not, it is interpreted relative to the current directory. |
|
2209 Closes `issue 121`_. |
|
2210 |
|
2211 - Partial branch warnings can now be pragma'd away. The configuration option |
|
2212 ``partial_branches`` is a list of regular expressions. Lines matching any of |
|
2213 those expressions will never be marked as a partial branch. In addition, |
|
2214 there's a built-in list of regular expressions marking statements which |
|
2215 should never be marked as partial. This list includes ``while True:``, |
|
2216 ``while 1:``, ``if 1:``, and ``if 0:``. |
|
2217 |
|
2218 - The ``coverage()`` constructor accepts single strings for the ``omit=`` and |
|
2219 ``include=`` arguments, adapting to a common error in programmatic use. |
|
2220 |
|
2221 - Modules can now be run directly using ``coverage run -m modulename``, to |
|
2222 mirror Python's ``-m`` flag. Closes `issue 95`_, thanks, Brandon Rhodes. |
|
2223 |
|
2224 - ``coverage run`` didn't emulate Python accurately in one small detail: the |
|
2225 current directory inserted into ``sys.path`` was relative rather than |
|
2226 absolute. This is now fixed. |
|
2227 |
|
2228 - HTML reporting is now incremental: a record is kept of the data that |
|
2229 produced the HTML reports, and only files whose data has changed will |
|
2230 be generated. This should make most HTML reporting faster. |
|
2231 |
|
2232 - Pathological code execution could disable the trace function behind our |
|
2233 backs, leading to incorrect code measurement. Now if this happens, |
|
2234 coverage.py will issue a warning, at least alerting you to the problem. |
|
2235 Closes `issue 93`_. Thanks to Marius Gedminas for the idea. |
|
2236 |
|
2237 - The C-based trace function now behaves properly when saved and restored |
|
2238 with ``sys.gettrace()`` and ``sys.settrace()``. This fixes `issue 125`_ |
|
2239 and `issue 123`_. Thanks, Devin Jeanpierre. |
|
2240 |
|
2241 - Source files are now opened with Python 3.2's ``tokenize.open()`` where |
|
2242 possible, to get the best handling of Python source files with encodings. |
|
2243 Closes `issue 107`_, thanks, Brett Cannon. |
|
2244 |
|
2245 - Syntax errors in supposed Python files can now be ignored during reporting |
|
2246 with the ``-i`` switch just like other source errors. Closes `issue 115`_. |
|
2247 |
|
2248 - Installation from source now succeeds on machines without a C compiler, |
|
2249 closing `issue 80`_. |
|
2250 |
|
2251 - Coverage.py can now be run directly from a working tree by specifying |
|
2252 the directory name to python: ``python coverage_py_working_dir run ...``. |
|
2253 Thanks, Brett Cannon. |
|
2254 |
|
2255 - A little bit of Jython support: `coverage run` can now measure Jython |
|
2256 execution by adapting when $py.class files are traced. Thanks, Adi Roiban. |
|
2257 Jython still doesn't provide the Python libraries needed to make |
|
2258 coverage reporting work, unfortunately. |
|
2259 |
|
2260 - Internally, files are now closed explicitly, fixing `issue 104`_. Thanks, |
|
2261 Brett Cannon. |
|
2262 |
|
2263 .. _issue 80: https://github.com/nedbat/coveragepy/issues/80 |
|
2264 .. _issue 93: https://github.com/nedbat/coveragepy/issues/93 |
|
2265 .. _issue 95: https://github.com/nedbat/coveragepy/issues/95 |
|
2266 .. _issue 104: https://github.com/nedbat/coveragepy/issues/104 |
|
2267 .. _issue 107: https://github.com/nedbat/coveragepy/issues/107 |
|
2268 .. _issue 115: https://github.com/nedbat/coveragepy/issues/115 |
|
2269 .. _issue 121: https://github.com/nedbat/coveragepy/issues/121 |
|
2270 .. _issue 123: https://github.com/nedbat/coveragepy/issues/123 |
|
2271 .. _issue 125: https://github.com/nedbat/coveragepy/issues/125 |
|
2272 |
|
2273 |
|
2274 .. _changes_34: |
|
2275 |
|
2276 Version 3.4 --- 2010-09-19 |
|
2277 -------------------------- |
|
2278 |
|
2279 - The XML report is now sorted by package name, fixing `issue 88`_. |
|
2280 |
|
2281 - Programs that exited with ``sys.exit()`` with no argument weren't handled |
|
2282 properly, producing a coverage.py stack trace. That is now fixed. |
|
2283 |
|
2284 .. _issue 88: https://github.com/nedbat/coveragepy/issues/88 |
|
2285 |
|
2286 |
|
2287 Version 3.4b2 --- 2010-09-06 |
|
2288 ---------------------------- |
|
2289 |
|
2290 - Completely unexecuted files can now be included in coverage results, reported |
|
2291 as 0% covered. This only happens if the --source option is specified, since |
|
2292 coverage.py needs guidance about where to look for source files. |
|
2293 |
|
2294 - The XML report output now properly includes a percentage for branch coverage, |
|
2295 fixing `issue 65`_ and `issue 81`_. |
|
2296 |
|
2297 - Coverage percentages are now displayed uniformly across reporting methods. |
|
2298 Previously, different reports could round percentages differently. Also, |
|
2299 percentages are only reported as 0% or 100% if they are truly 0 or 100, and |
|
2300 are rounded otherwise. Fixes `issue 41`_ and `issue 70`_. |
|
2301 |
|
2302 - The precision of reported coverage percentages can be set with the |
|
2303 ``[report] precision`` config file setting. Completes `issue 16`_. |
|
2304 |
|
2305 - Threads derived from ``threading.Thread`` with an overridden `run` method |
|
2306 would report no coverage for the `run` method. This is now fixed, closing |
|
2307 `issue 85`_. |
|
2308 |
|
2309 .. _issue 16: https://github.com/nedbat/coveragepy/issues/16 |
|
2310 .. _issue 41: https://github.com/nedbat/coveragepy/issues/41 |
|
2311 .. _issue 65: https://github.com/nedbat/coveragepy/issues/65 |
|
2312 .. _issue 70: https://github.com/nedbat/coveragepy/issues/70 |
|
2313 .. _issue 81: https://github.com/nedbat/coveragepy/issues/81 |
|
2314 .. _issue 85: https://github.com/nedbat/coveragepy/issues/85 |
|
2315 |
|
2316 |
|
2317 Version 3.4b1 --- 2010-08-21 |
|
2318 ---------------------------- |
|
2319 |
|
2320 - BACKWARD INCOMPATIBILITY: the ``--omit`` and ``--include`` switches now take |
|
2321 file patterns rather than file prefixes, closing `issue 34`_ and `issue 36`_. |
|
2322 |
|
2323 - BACKWARD INCOMPATIBILITY: the `omit_prefixes` argument is gone throughout |
|
2324 coverage.py, replaced with `omit`, a list of file name patterns suitable for |
|
2325 `fnmatch`. A parallel argument `include` controls what files are included. |
|
2326 |
|
2327 - The run command now has a ``--source`` switch, a list of directories or |
|
2328 module names. If provided, coverage.py will only measure execution in those |
|
2329 source files. |
|
2330 |
|
2331 - Various warnings are printed to stderr for problems encountered during data |
|
2332 measurement: if a ``--source`` module has no Python source to measure, or is |
|
2333 never encountered at all, or if no data is collected. |
|
2334 |
|
2335 - The reporting commands (report, annotate, html, and xml) now have an |
|
2336 ``--include`` switch to restrict reporting to modules matching those file |
|
2337 patterns, similar to the existing ``--omit`` switch. Thanks, Zooko. |
|
2338 |
|
2339 - The run command now supports ``--include`` and ``--omit`` to control what |
|
2340 modules it measures. This can speed execution and reduce the amount of data |
|
2341 during reporting. Thanks Zooko. |
|
2342 |
|
2343 - Since coverage.py 3.1, using the Python trace function has been slower than |
|
2344 it needs to be. A cache of tracing decisions was broken, but has now been |
|
2345 fixed. |
|
2346 |
|
2347 - Python 2.7 and 3.2 have introduced new opcodes that are now supported. |
|
2348 |
|
2349 - Python files with no statements, for example, empty ``__init__.py`` files, |
|
2350 are now reported as having zero statements instead of one. Fixes `issue 1`_. |
|
2351 |
|
2352 - Reports now have a column of missed line counts rather than executed line |
|
2353 counts, since developers should focus on reducing the missed lines to zero, |
|
2354 rather than increasing the executed lines to varying targets. Once |
|
2355 suggested, this seemed blindingly obvious. |
|
2356 |
|
2357 - Line numbers in HTML source pages are clickable, linking directly to that |
|
2358 line, which is highlighted on arrival. Added a link back to the index page |
|
2359 at the bottom of each HTML page. |
|
2360 |
|
2361 - Programs that call ``os.fork`` will properly collect data from both the child |
|
2362 and parent processes. Use ``coverage run -p`` to get two data files that can |
|
2363 be combined with ``coverage combine``. Fixes `issue 56`_. |
|
2364 |
|
2365 - Coverage.py is now runnable as a module: ``python -m coverage``. Thanks, |
|
2366 Brett Cannon. |
|
2367 |
|
2368 - When measuring code running in a virtualenv, most of the system library was |
|
2369 being measured when it shouldn't have been. This is now fixed. |
|
2370 |
|
2371 - Doctest text files are no longer recorded in the coverage data, since they |
|
2372 can't be reported anyway. Fixes `issue 52`_ and `issue 61`_. |
|
2373 |
|
2374 - Jinja HTML templates compile into Python code using the HTML file name, |
|
2375 which confused coverage.py. Now these files are no longer traced, fixing |
|
2376 `issue 82`_. |
|
2377 |
|
2378 - Source files can have more than one dot in them (foo.test.py), and will be |
|
2379 treated properly while reporting. Fixes `issue 46`_. |
|
2380 |
|
2381 - Source files with DOS line endings are now properly tokenized for syntax |
|
2382 coloring on non-DOS machines. Fixes `issue 53`_. |
|
2383 |
|
2384 - Unusual code structure that confused exits from methods with exits from |
|
2385 classes is now properly analyzed. See `issue 62`_. |
|
2386 |
|
2387 - Asking for an HTML report with no files now shows a nice error message rather |
|
2388 than a cryptic failure ('int' object is unsubscriptable). Fixes `issue 59`_. |
|
2389 |
|
2390 .. _issue 1: https://github.com/nedbat/coveragepy/issues/1 |
|
2391 .. _issue 34: https://github.com/nedbat/coveragepy/issues/34 |
|
2392 .. _issue 36: https://github.com/nedbat/coveragepy/issues/36 |
|
2393 .. _issue 46: https://github.com/nedbat/coveragepy/issues/46 |
|
2394 .. _issue 53: https://github.com/nedbat/coveragepy/issues/53 |
|
2395 .. _issue 52: https://github.com/nedbat/coveragepy/issues/52 |
|
2396 .. _issue 56: https://github.com/nedbat/coveragepy/issues/56 |
|
2397 .. _issue 61: https://github.com/nedbat/coveragepy/issues/61 |
|
2398 .. _issue 62: https://github.com/nedbat/coveragepy/issues/62 |
|
2399 .. _issue 59: https://github.com/nedbat/coveragepy/issues/59 |
|
2400 .. _issue 82: https://github.com/nedbat/coveragepy/issues/82 |
|
2401 |
|
2402 |
|
2403 .. _changes_331: |
|
2404 |
|
2405 Version 3.3.1 --- 2010-03-06 |
|
2406 ---------------------------- |
|
2407 |
|
2408 - Using `parallel=True` in .coveragerc file prevented reporting, but now does |
|
2409 not, fixing `issue 49`_. |
|
2410 |
|
2411 - When running your code with "coverage run", if you call `sys.exit()`, |
|
2412 coverage.py will exit with that status code, fixing `issue 50`_. |
|
2413 |
|
2414 .. _issue 49: https://github.com/nedbat/coveragepy/issues/49 |
|
2415 .. _issue 50: https://github.com/nedbat/coveragepy/issues/50 |
|
2416 |
|
2417 |
|
2418 .. _changes_33: |
|
2419 |
|
2420 Version 3.3 --- 2010-02-24 |
|
2421 -------------------------- |
|
2422 |
|
2423 - Settings are now read from a .coveragerc file. A specific file can be |
|
2424 specified on the command line with --rcfile=FILE. The name of the file can |
|
2425 be programmatically set with the `config_file` argument to the coverage() |
|
2426 constructor, or reading a config file can be disabled with |
|
2427 `config_file=False`. |
|
2428 |
|
2429 - Fixed a problem with nested loops having their branch possibilities |
|
2430 mischaracterized: `issue 39`_. |
|
2431 |
|
2432 - Added coverage.process_start to enable coverage measurement when Python |
|
2433 starts. |
|
2434 |
|
2435 - Parallel data file names now have a random number appended to them in |
|
2436 addition to the machine name and process id. |
|
2437 |
|
2438 - Parallel data files combined with "coverage combine" are deleted after |
|
2439 they're combined, to clean up unneeded files. Fixes `issue 40`_. |
|
2440 |
|
2441 - Exceptions thrown from product code run with "coverage run" are now displayed |
|
2442 without internal coverage.py frames, so the output is the same as when the |
|
2443 code is run without coverage.py. |
|
2444 |
|
2445 - The `data_suffix` argument to the coverage constructor is now appended with |
|
2446 an added dot rather than simply appended, so that .coveragerc files will not |
|
2447 be confused for data files. |
|
2448 |
|
2449 - Python source files that don't end with a newline can now be executed, fixing |
|
2450 `issue 47`_. |
|
2451 |
|
2452 - Added an AUTHORS.txt file. |
|
2453 |
|
2454 .. _issue 39: https://github.com/nedbat/coveragepy/issues/39 |
|
2455 .. _issue 40: https://github.com/nedbat/coveragepy/issues/40 |
|
2456 .. _issue 47: https://github.com/nedbat/coveragepy/issues/47 |
|
2457 |
|
2458 |
|
2459 .. _changes_32: |
|
2460 |
|
2461 Version 3.2 --- 2009-12-05 |
|
2462 -------------------------- |
|
2463 |
|
2464 - Added a ``--version`` option on the command line. |
|
2465 |
|
2466 |
|
2467 Version 3.2b4 --- 2009-12-01 |
|
2468 ---------------------------- |
|
2469 |
|
2470 - Branch coverage improvements: |
|
2471 |
|
2472 - The XML report now includes branch information. |
|
2473 |
|
2474 - Click-to-sort HTML report columns are now persisted in a cookie. Viewing |
|
2475 a report will sort it first the way you last had a coverage report sorted. |
|
2476 Thanks, `Chris Adams`_. |
|
2477 |
|
2478 - On Python 3.x, setuptools has been replaced by `Distribute`_. |
|
2479 |
|
2480 .. _Distribute: https://pypi.org/project/distribute/ |
|
2481 |
|
2482 |
|
2483 Version 3.2b3 --- 2009-11-23 |
|
2484 ---------------------------- |
|
2485 |
|
2486 - Fixed a memory leak in the C tracer that was introduced in 3.2b1. |
|
2487 |
|
2488 - Branch coverage improvements: |
|
2489 |
|
2490 - Branches to excluded code are ignored. |
|
2491 |
|
2492 - The table of contents in the HTML report is now sortable: click the headers |
|
2493 on any column. Thanks, `Chris Adams`_. |
|
2494 |
|
2495 .. _Chris Adams: http://chris.improbable.org |
|
2496 |
|
2497 |
|
2498 Version 3.2b2 --- 2009-11-19 |
|
2499 ---------------------------- |
|
2500 |
|
2501 - Branch coverage improvements: |
|
2502 |
|
2503 - Classes are no longer incorrectly marked as branches: `issue 32`_. |
|
2504 |
|
2505 - "except" clauses with types are no longer incorrectly marked as branches: |
|
2506 `issue 35`_. |
|
2507 |
|
2508 - Fixed some problems syntax coloring sources with line continuations and |
|
2509 source with tabs: `issue 30`_ and `issue 31`_. |
|
2510 |
|
2511 - The --omit option now works much better than before, fixing `issue 14`_ and |
|
2512 `issue 33`_. Thanks, Danek Duvall. |
|
2513 |
|
2514 .. _issue 14: https://github.com/nedbat/coveragepy/issues/14 |
|
2515 .. _issue 30: https://github.com/nedbat/coveragepy/issues/30 |
|
2516 .. _issue 31: https://github.com/nedbat/coveragepy/issues/31 |
|
2517 .. _issue 32: https://github.com/nedbat/coveragepy/issues/32 |
|
2518 .. _issue 33: https://github.com/nedbat/coveragepy/issues/33 |
|
2519 .. _issue 35: https://github.com/nedbat/coveragepy/issues/35 |
|
2520 |
|
2521 |
|
2522 Version 3.2b1 --- 2009-11-10 |
|
2523 ---------------------------- |
|
2524 |
|
2525 - Branch coverage! |
|
2526 |
|
2527 - XML reporting has file paths that let Cobertura find the source code. |
|
2528 |
|
2529 - The tracer code has changed, it's a few percent faster. |
|
2530 |
|
2531 - Some exceptions reported by the command line interface have been cleaned up |
|
2532 so that tracebacks inside coverage.py aren't shown. Fixes `issue 23`_. |
|
2533 |
|
2534 .. _issue 23: https://github.com/nedbat/coveragepy/issues/23 |
|
2535 |
|
2536 |
|
2537 .. _changes_31: |
|
2538 |
|
2539 Version 3.1 --- 2009-10-04 |
|
2540 -------------------------- |
|
2541 |
|
2542 - Source code can now be read from eggs. Thanks, Ross Lawley. Fixes |
|
2543 `issue 25`_. |
|
2544 |
|
2545 .. _issue 25: https://github.com/nedbat/coveragepy/issues/25 |
|
2546 |
|
2547 |
|
2548 Version 3.1b1 --- 2009-09-27 |
|
2549 ---------------------------- |
|
2550 |
|
2551 - Python 3.1 is now supported. |
|
2552 |
|
2553 - Coverage.py has a new command line syntax with sub-commands. This expands |
|
2554 the possibilities for adding features and options in the future. The old |
|
2555 syntax is still supported. Try "coverage help" to see the new commands. |
|
2556 Thanks to Ben Finney for early help. |
|
2557 |
|
2558 - Added an experimental "coverage xml" command for producing coverage reports |
|
2559 in a Cobertura-compatible XML format. Thanks, Bill Hart. |
|
2560 |
|
2561 - Added the --timid option to enable a simpler slower trace function that works |
|
2562 for DecoratorTools projects, including TurboGears. Fixed `issue 12`_ and |
|
2563 `issue 13`_. |
|
2564 |
|
2565 - HTML reports show modules from other directories. Fixed `issue 11`_. |
|
2566 |
|
2567 - HTML reports now display syntax-colored Python source. |
|
2568 |
|
2569 - Programs that change directory will still write .coverage files in the |
|
2570 directory where execution started. Fixed `issue 24`_. |
|
2571 |
|
2572 - Added a "coverage debug" command for getting diagnostic information about the |
|
2573 coverage.py installation. |
|
2574 |
|
2575 .. _issue 11: https://github.com/nedbat/coveragepy/issues/11 |
|
2576 .. _issue 12: https://github.com/nedbat/coveragepy/issues/12 |
|
2577 .. _issue 13: https://github.com/nedbat/coveragepy/issues/13 |
|
2578 .. _issue 24: https://github.com/nedbat/coveragepy/issues/24 |
|
2579 |
|
2580 |
|
2581 .. _changes_301: |
|
2582 |
|
2583 Version 3.0.1 --- 2009-07-07 |
|
2584 ---------------------------- |
|
2585 |
|
2586 - Removed the recursion limit in the tracer function. Previously, code that |
|
2587 ran more than 500 frames deep would crash. Fixed `issue 9`_. |
|
2588 |
|
2589 - Fixed a bizarre problem involving pyexpat, whereby lines following XML parser |
|
2590 invocations could be overlooked. Fixed `issue 10`_. |
|
2591 |
|
2592 - On Python 2.3, coverage.py could mis-measure code with exceptions being |
|
2593 raised. This is now fixed. |
|
2594 |
|
2595 - The coverage.py code itself will now not be measured by coverage.py, and no |
|
2596 coverage.py modules will be mentioned in the nose --with-cover plug-in. |
|
2597 Fixed `issue 8`_. |
|
2598 |
|
2599 - When running source files, coverage.py now opens them in universal newline |
|
2600 mode just like Python does. This lets it run Windows files on Mac, for |
|
2601 example. |
|
2602 |
|
2603 .. _issue 9: https://github.com/nedbat/coveragepy/issues/9 |
|
2604 .. _issue 10: https://github.com/nedbat/coveragepy/issues/10 |
|
2605 .. _issue 8: https://github.com/nedbat/coveragepy/issues/8 |
|
2606 |
|
2607 |
|
2608 .. _changes_30: |
|
2609 |
|
2610 Version 3.0 --- 2009-06-13 |
|
2611 -------------------------- |
|
2612 |
|
2613 - Fixed the way the Python library was ignored. Too much code was being |
|
2614 excluded the old way. |
|
2615 |
|
2616 - Tabs are now properly converted in HTML reports. Previously indentation was |
|
2617 lost. Fixed `issue 6`_. |
|
2618 |
|
2619 - Nested modules now get a proper flat_rootname. Thanks, Christian Heimes. |
|
2620 |
|
2621 .. _issue 6: https://github.com/nedbat/coveragepy/issues/6 |
|
2622 |
|
2623 |
|
2624 Version 3.0b3 --- 2009-05-16 |
|
2625 ---------------------------- |
|
2626 |
|
2627 - Added parameters to coverage.__init__ for options that had been set on the |
|
2628 coverage object itself. |
|
2629 |
|
2630 - Added clear_exclude() and get_exclude_list() methods for programmatic |
|
2631 manipulation of the exclude regexes. |
|
2632 |
|
2633 - Added coverage.load() to read previously-saved data from the data file. |
|
2634 |
|
2635 - Improved the finding of code files. For example, .pyc files that have been |
|
2636 installed after compiling are now located correctly. Thanks, Detlev |
|
2637 Offenbach. |
|
2638 |
|
2639 - When using the object API (that is, constructing a coverage() object), data |
|
2640 is no longer saved automatically on process exit. You can re-enable it with |
|
2641 the auto_data=True parameter on the coverage() constructor. The module-level |
|
2642 interface still uses automatic saving. |
|
2643 |
|
2644 |
|
2645 Version 3.0b --- 2009-04-30 |
|
2646 --------------------------- |
|
2647 |
|
2648 HTML reporting, and continued refactoring. |
|
2649 |
|
2650 - HTML reports and annotation of source files: use the new -b (browser) switch. |
|
2651 Thanks to George Song for code, inspiration and guidance. |
|
2652 |
|
2653 - Code in the Python standard library is not measured by default. If you need |
|
2654 to measure standard library code, use the -L command-line switch during |
|
2655 execution, or the cover_pylib=True argument to the coverage() constructor. |
|
2656 |
|
2657 - Source annotation into a directory (-a -d) behaves differently. The |
|
2658 annotated files are named with their hierarchy flattened so that same-named |
|
2659 files from different directories no longer collide. Also, only files in the |
|
2660 current tree are included. |
|
2661 |
|
2662 - coverage.annotate_file is no longer available. |
|
2663 |
|
2664 - Programs executed with -x now behave more as they should, for example, |
|
2665 __file__ has the correct value. |
|
2666 |
|
2667 - .coverage data files have a new pickle-based format designed for better |
|
2668 extensibility. |
|
2669 |
|
2670 - Removed the undocumented cache_file argument to coverage.usecache(). |
|
2671 |
|
2672 |
|
2673 Version 3.0b1 --- 2009-03-07 |
|
2674 ---------------------------- |
|
2675 |
|
2676 Major overhaul. |
|
2677 |
|
2678 - Coverage.py is now a package rather than a module. Functionality has been |
|
2679 split into classes. |
|
2680 |
|
2681 - The trace function is implemented in C for speed. Coverage.py runs are now |
|
2682 much faster. Thanks to David Christian for productive micro-sprints and |
|
2683 other encouragement. |
|
2684 |
|
2685 - Executable lines are identified by reading the line number tables in the |
|
2686 compiled code, removing a great deal of complicated analysis code. |
|
2687 |
|
2688 - Precisely which lines are considered executable has changed in some cases. |
|
2689 Therefore, your coverage stats may also change slightly. |
|
2690 |
|
2691 - The singleton coverage object is only created if the module-level functions |
|
2692 are used. This maintains the old interface while allowing better |
|
2693 programmatic use of coverage.py. |
|
2694 |
|
2695 - The minimum supported Python version is 2.3. |
|
2696 |
|
2697 |
|
2698 Version 2.85 --- 2008-09-14 |
|
2699 --------------------------- |
|
2700 |
|
2701 - Add support for finding source files in eggs. Don't check for |
|
2702 morf's being instances of ModuleType, instead use duck typing so that |
|
2703 pseudo-modules can participate. Thanks, Imri Goldberg. |
|
2704 |
|
2705 - Use os.realpath as part of the fixing of file names so that symlinks won't |
|
2706 confuse things. Thanks, Patrick Mezard. |
|
2707 |
|
2708 |
|
2709 Version 2.80 --- 2008-05-25 |
|
2710 --------------------------- |
|
2711 |
|
2712 - Open files in rU mode to avoid line ending craziness. Thanks, Edward Loper. |
|
2713 |
|
2714 |
|
2715 Version 2.78 --- 2007-09-30 |
|
2716 --------------------------- |
|
2717 |
|
2718 - Don't try to predict whether a file is Python source based on the extension. |
|
2719 Extension-less files are often Pythons scripts. Instead, simply parse the |
|
2720 file and catch the syntax errors. Hat tip to Ben Finney. |
|
2721 |
|
2722 |
|
2723 Version 2.77 --- 2007-07-29 |
|
2724 --------------------------- |
|
2725 |
|
2726 - Better packaging. |
|
2727 |
|
2728 |
|
2729 Version 2.76 --- 2007-07-23 |
|
2730 --------------------------- |
|
2731 |
|
2732 - Now Python 2.5 is *really* fully supported: the body of the new with |
|
2733 statement is counted as executable. |
|
2734 |
|
2735 |
|
2736 Version 2.75 --- 2007-07-22 |
|
2737 --------------------------- |
|
2738 |
|
2739 - Python 2.5 now fully supported. The method of dealing with multi-line |
|
2740 statements is now less sensitive to the exact line that Python reports during |
|
2741 execution. Pass statements are handled specially so that their disappearance |
|
2742 during execution won't throw off the measurement. |
|
2743 |
|
2744 |
|
2745 Version 2.7 --- 2007-07-21 |
|
2746 -------------------------- |
|
2747 |
|
2748 - "#pragma: nocover" is excluded by default. |
|
2749 |
|
2750 - Properly ignore docstrings and other constant expressions that appear in the |
|
2751 middle of a function, a problem reported by Tim Leslie. |
|
2752 |
|
2753 - coverage.erase() shouldn't clobber the exclude regex. Change how parallel |
|
2754 mode is invoked, and fix erase() so that it erases the cache when called |
|
2755 programmatically. |
|
2756 |
|
2757 - In reports, ignore code executed from strings, since we can't do anything |
|
2758 useful with it anyway. |
|
2759 |
|
2760 - Better file handling on Linux, thanks Guillaume Chazarain. |
|
2761 |
|
2762 - Better shell support on Windows, thanks Noel O'Boyle. |
|
2763 |
|
2764 - Python 2.2 support maintained, thanks Catherine Proulx. |
|
2765 |
|
2766 - Minor changes to avoid lint warnings. |
|
2767 |
|
2768 |
|
2769 Version 2.6 --- 2006-08-23 |
|
2770 -------------------------- |
|
2771 |
|
2772 - Applied Joseph Tate's patch for function decorators. |
|
2773 |
|
2774 - Applied Sigve Tjora and Mark van der Wal's fixes for argument handling. |
|
2775 |
|
2776 - Applied Geoff Bache's parallel mode patch. |
|
2777 |
|
2778 - Refactorings to improve testability. Fixes to command-line logic for parallel |
|
2779 mode and collect. |
|
2780 |
|
2781 |
|
2782 Version 2.5 --- 2005-12-04 |
|
2783 -------------------------- |
|
2784 |
|
2785 - Call threading.settrace so that all threads are measured. Thanks Martin |
|
2786 Fuzzey. |
|
2787 |
|
2788 - Add a file argument to report so that reports can be captured to a different |
|
2789 destination. |
|
2790 |
|
2791 - Coverage.py can now measure itself. |
|
2792 |
|
2793 - Adapted Greg Rogers' patch for using relative file names, and sorting and |
|
2794 omitting files to report on. |
|
2795 |
|
2796 |
|
2797 Version 2.2 --- 2004-12-31 |
|
2798 -------------------------- |
|
2799 |
|
2800 - Allow for keyword arguments in the module global functions. Thanks, Allen. |
|
2801 |
|
2802 |
|
2803 Version 2.1 --- 2004-12-14 |
|
2804 -------------------------- |
|
2805 |
|
2806 - Return 'analysis' to its original behavior and add 'analysis2'. Add a global |
|
2807 for 'annotate', and factor it, adding 'annotate_file'. |
|
2808 |
|
2809 |
|
2810 Version 2.0 --- 2004-12-12 |
|
2811 -------------------------- |
|
2812 |
|
2813 Significant code changes. |
|
2814 |
|
2815 - Finding executable statements has been rewritten so that docstrings and |
|
2816 other quirks of Python execution aren't mistakenly identified as missing |
|
2817 lines. |
|
2818 |
|
2819 - Lines can be excluded from consideration, even entire suites of lines. |
|
2820 |
|
2821 - The file system cache of covered lines can be disabled programmatically. |
|
2822 |
|
2823 - Modernized the code. |
|
2824 |
|
2825 |
|
2826 Earlier History |
|
2827 --------------- |
|
2828 |
|
2829 2001-12-04 GDR Created. |
|
2830 |
|
2831 2001-12-06 GDR Added command-line interface and source code annotation. |
|
2832 |
|
2833 2001-12-09 GDR Moved design and interface to separate documents. |
|
2834 |
|
2835 2001-12-10 GDR Open cache file as binary on Windows. Allow simultaneous -e and |
|
2836 -x, or -a and -r. |
|
2837 |
|
2838 2001-12-12 GDR Added command-line help. Cache analysis so that it only needs to |
|
2839 be done once when you specify -a and -r. |
|
2840 |
|
2841 2001-12-13 GDR Improved speed while recording. Portable between Python 1.5.2 |
|
2842 and 2.1.1. |
|
2843 |
|
2844 2002-01-03 GDR Module-level functions work correctly. |
|
2845 |
|
2846 2002-01-07 GDR Update sys.path when running a file with the -x option, so that |
|
2847 it matches the value the program would get if it were run on its own. |