summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.rst14
-rw-r--r--doc/conf.py5
-rw-r--r--doc/contexts.rst4
-rw-r--r--doc/howitworks.rst2
-rw-r--r--doc/index.rst3
-rw-r--r--doc/whatsnew5x.rst119
6 files changed, 138 insertions, 9 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index a02fe5b1..53677148 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -9,6 +9,10 @@ These changes are listed in decreasing version number order. Note this can be
different from a strict chronological order when there are two branches in
development at the same time, such as 4.5.x and 5.0.
+This list is detailed and covers changes in each pre-release version. If you
+want to know what's different in 5.0 since 4.5.x, see :ref:`whatsnew5x`.
+
+
.. When updating the "Unreleased" header to a specific version, use this
.. format. Don't forget the jump target:
..
@@ -21,7 +25,7 @@ Unreleased
----------
- The HTML and textual reports now have a ``--skip-empty`` option that skips
- files with no statements (notably, ``__init__.py`` files). Thanks, Reya B.
+ files with no statements, notably ``__init__.py`` files. Thanks, Reya B.
- Configuration can now be read from `TOML`_ files. This requires installing
coverage.py with the ``[toml]`` extra. The standard "pyproject.toml" file
@@ -39,7 +43,7 @@ Unreleased
``coverage html --show-contexts``) will issue a warning if there were no
contexts measured (`issue 851`_).
-.. _TOML: https://github.com/toml-lang/toml#toml
+.. _TOML: https://github.com/toml-lang/toml#readme
.. _issue 664: https://github.com/nedbat/coveragepy/issues/664
.. _issue 851: https://github.com/nedbat/coveragepy/issues/851
.. _issue 855: https://github.com/nedbat/coveragepy/issues/855
@@ -191,7 +195,7 @@ Version 5.0a5 --- 2019-05-07
- Access to the SQLite database used for data storage is now thread-safe.
Thanks, Stephan Richter. This closes `issue 702`_.
-- Combining data stored in SQLite now goes about twice as fast, fixing `issue
+- Combining data stored in SQLite is now about twice as fast, fixing `issue
761`_. Thanks, Stephan Richter.
- The ``filename`` attribute on :class:`.CoverageData` objects has been made
@@ -217,7 +221,7 @@ Version 5.0a4 --- 2018-11-25
----------------------------
- You can specify the command line to run your program with the ``[run]
- command_line`` configuration setting. `issue 695`_.
+ command_line`` configuration setting, as requested in `issue 695`_.
- Coverage will create directories as needed for the data file if they don't
exist, closing `issue 721`_.
@@ -231,7 +235,7 @@ Version 5.0a4 --- 2018-11-25
- The "no such table: meta" error is fixed.: `issue 716`_.
- - Combining data files now goes much faster.
+ - Combining data files is now much faster.
- Python 3.8 (as of today!) passes all tests.
diff --git a/doc/conf.py b/doc/conf.py
index daa8ab33..853394d3 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -36,6 +36,7 @@ extensions = [
'sphinxcontrib.spelling',
'sphinx.ext.intersphinx',
'sphinx_rst_builder',
+ 'sphinx.ext.extlinks',
]
# Add any paths that contain templates here, relative to this directory.
@@ -188,6 +189,10 @@ htmlhelp_basename = 'coveragepydoc'
spelling_word_list_filename = 'dict.txt'
spelling_show_suggestions = False
+extlinks = {
+ # :github:`123` becomes a link to the GitHub issue, with text "issue 123".
+ 'github': ('https://github.com/nedbat/coveragepy/issues/%s', 'issue '),
+}
# When auto-doc'ing a class, write the class' docstring and the __init__ docstring
# into the class docs.
diff --git a/doc/contexts.rst b/doc/contexts.rst
index f81d2a38..28a29f01 100644
--- a/doc/contexts.rst
+++ b/doc/contexts.rst
@@ -86,8 +86,8 @@ Context reporting
-----------------
The ``coverage report`` and ``coverage html`` commands both accept
-``--contexts`` option, a comma-separated list of shell-style wildcards. The
-report will be limited to the contexts that match one of those contexts.
+``--contexts`` option, a comma-separated list of regular expressions. The
+report will be limited to the contexts that match one of those patterns.
The ``coverage html`` command also has ``--show-contexts``. If set, the HTML
report will include an annotation on each covered line indicating the number of
diff --git a/doc/howitworks.rst b/doc/howitworks.rst
index 0e11c29e..0d391ca3 100644
--- a/doc/howitworks.rst
+++ b/doc/howitworks.rst
@@ -4,7 +4,7 @@
.. _howitworks:
=====================
-How Coverage.py works
+How coverage.py works
=====================
.. :history: 20150812T071000, new page.
diff --git a/doc/index.rst b/doc/index.rst
index fd201e0d..238d9953 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -173,7 +173,7 @@ More information
:maxdepth: 1
install
- For Enterprise <https://tidelift.com/subscription/pkg/pypi-coverage?utm_source=pypi-coverage&utm_medium=referral&utm_campaign=enterprise>
+ For enterprise <https://tidelift.com/subscription/pkg/pypi-coverage?utm_source=pypi-coverage&utm_medium=referral&utm_campaign=enterprise>
cmd
config
source
@@ -187,4 +187,5 @@ More information
contributing
trouble
faq
+ whatsnew5x
changes
diff --git a/doc/whatsnew5x.rst b/doc/whatsnew5x.rst
new file mode 100644
index 00000000..479895e2
--- /dev/null
+++ b/doc/whatsnew5x.rst
@@ -0,0 +1,119 @@
+.. Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
+.. For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
+
+.. _whatsnew5x:
+
+====================
+Major changes in 5.0
+====================
+
+This is an overview of the changes in 5.0 since the last version of 4.5.x. This
+is not a complete list of all changes. See the :ref:`complete change history
+<changes>` for all the details.
+
+
+Open Questions
+--------------
+
+- How to support SQL access to data? The database schema has to be convenient
+ and efficient for coverage.py's execution, which would naturally make it an
+ internal implementation detail. But the coverage data is now more complex,
+ and SQL access could be a powerful way to access it, pointing toward a public
+ guaranteed schema. What's the right balance?
+
+
+Backward Incompatibilities
+--------------------------
+
+- Python 2.6 and 3.3 are no longer supported.
+
+- The :class:`.CoverageData` interface is still public, but has changed.
+
+- The data file is now created earlier than it used to be. In some
+ circumstances, you may need to use ``parallel=true`` to avoid multiple
+ processes overwriting each others' data.
+
+- The deprecated `Reporter.file_reporters` property has been removed.
+
+- The reporting methods used to permanently apply their arguments to the
+ configuration of the Coverage object. Now they no longer do. The arguments
+ affect the operation of the method, but do not persist.
+
+
+New Features
+------------
+
+- Coverage.py can now record the context in which each line was executed. The
+ contexts are stored in the data file and can be used to drill down into why a
+ particular line was run. Static contexts let you specify a label for an
+ entire coverage run, for example to separate coverage for different operating
+ systems or versions of Python. Dynamic contexts can change during a single
+ measurement run. This can be used to record the names of the tests that
+ executed each line. See :ref:`contexts` for full information.
+
+- Coverage's data storage has changed. In version 4.x, .coverage files were
+ basically JSON. Now, they are SQLite databases. The database schema is
+ documented (:ref:`dbschema`), but might still be in flux.
+
+- Data can now be "reported" in JSON format, for programmatic use, as requested
+ in :github:`720`. The new ``coverage json`` command writes raw and
+ summarized data to a JSON file. Thanks, Matt Bachmann.
+
+- Configuration can now be read from `TOML`_ files. This requires installing
+ coverage.py with the ``[toml]`` extra. The standard "pyproject.toml" file
+ will be read automatically if no other configuration file is found, with
+ settings in the ``[tool.coverage.]`` namespace. Thanks to Frazer McLean for
+ implementation and persistence. Finishes :github:`664`.
+
+- The HTML and textual reports now have a ``--skip-empty`` option that skips
+ files with no statements, notably ``__init__.py`` files. Thanks, Reya B.
+
+- You can specify the command line to run your program with the ``[run]
+ command_line`` configuration setting, as requested in :github:`695`.
+
+- Environment variable substitution in configuration files now supports two
+ syntaxes for controlling the behavior of undefined variables: if ``VARNAME``
+ is not defined, ``${VARNAME?}`` will raise an error, and ``${VARNAME-default
+ value}`` will use "default value".
+
+- The location of the configuration file can now be specified with a
+ ``COVERAGE_RCFILE`` environment variable, as requested in `issue 650`_.
+
+- A new warning (``already-imported``) is issued if measurable files have
+ already been imported before coverage.py started measurement. See
+ :ref:`cmd_warnings` for more information.
+
+- 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.
+
+- Added the classmethod :meth:`.Coverage.current` to get the latest started
+ Coverage instance.
+
+
+.. _TOML: https://github.com/toml-lang/toml#readme
+.. _issue 650: https://bitbucket.org/ned/coveragepy/issues/650/allow-setting-configuration-file-location
+
+
+Bugs Fixed
+----------
+
+- The ``coverage run`` command has always adjusted the first entry in sys.path,
+ to properly emulate how Python runs your program. Now this adjustment is
+ skipped if sys.path[0] is already different than Python's default. This
+ fixes :github:`715`.
+
+- Coverage will create directories as needed for the data file if they don't
+ exist, closing :github:`721`.
+
+- ``fail_under`` values more than 100 are reported as errors. Thanks to Mike
+ Fiedler for closing :github:`746`.
+
+- The "missing" values in the text output are now sorted by line number, so
+ that missing branches are reported near the other lines they affect. The
+ values used to show all missing lines, and then all missing branches.
+
+- Coverage.py no longer fails if the user program deletes its current
+ directory. Fixes :github:`806`. Thanks, Dan Hemberger.