Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.

Update coverage to 5.0a6 - #43

Open
pyup-bot wants to merge 1 commit into
masterfrom
pyup-update-coverage-5.0a5-to-5.0a6
Open

Update coverage to 5.0a6#43
pyup-bot wants to merge 1 commit into
masterfrom
pyup-update-coverage-5.0a5-to-5.0a6

Conversation

@pyup-bot

Copy link
Copy Markdown
Contributor

This PR updates coverage from 5.0a5 to 5.0a6.

Changelog

5.0a6

----------------------------

- Reporting on contexts. Big thanks to Stephan Richter and Albertas Agejevas
for the contribution.

- The ``--contexts`` option is available on the ``report`` and ``html``
 commands.  It's a comma-separated list of shell-style wildcards, selecting
 the contexts to report on.  Only contexts matching one of the wildcards
 will be included in the report.

- The ``--show-contexts`` option for the ``html`` command adds context
 information to each covered line.  Hovering over the "ctx" marker at the
 end of the line reveals a list of the contexts that covered the line.

- Database changes:

- Line numbers are now stored in a much more compact way.  For each file and
 context, a single binary string is stored with a bit per line number.  This
 greatly improves memory use, but makes ad-hoc use difficult.

- Dynamic contexts with no data are no longer written to the database.

- SQLite data storage is now faster.  There's no longer a reason to keep the
 JSON data file code, so it has been removed.

- Changes to the :class:`CoverageData` interface:

- The new :meth:`CoverageData.dumps` method serializes the data to a string,
 and a corresponding :meth:`CoverageData.loads` method reconstitutes ths
 data.  The format of the data string is subject to change at any time, and
 so should only be used between two installations of the same version of
 coverage.py.

- The :meth:`CoverageData constructor<CoverageData.__init__>` has a new
 argument, `no_disk` (default: False).  Setting it to True prevents writing
 any data to the disk.  This is useful for transient data objects.

- Added the classmethod :meth:`Coverage.current` to get the latest started
Coverage instance.

- Error handling during reporting has changed slightly.  All reporting methods
now behave the same.  The ``--ignore-errors`` option keeps errors from
stopping the reporting, but files that couldn't parse as Python will always
be reported as warnings.  As with other warnings, you can suppress them with
the ``[run] disable_warnings`` configuration setting.

- Coverage.py no longer fails if the user program deletes its current
directory, closing `issue 806`_.  Thanks, Dan Hemberger.

- The scrollbar markers in the HTML report now accurately show the highlighted
lines, regardless of what categories of line are highlighted.

- The hack to accommodate ShiningPanda_ looking for an obsolete internal data
file has been removed, since ShiningPanda 0.22 fixed it four years ago.

- The deprecated `Reporter.file_reporters` property has been removed.

.. _ShiningPanda: https://wiki.jenkins.io/display/JENKINS/ShiningPanda+Plugin
.. _issue 806: https://github.com/nedbat/coveragepy/pull/806


.. _changes_50a5:
Links

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant