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

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

eric ide

mercurial