Skip to content

Commit

Permalink
Merge branch 'master' into kevin-brown-nedbatGH-1541
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-brown committed Apr 25, 2023
2 parents 498a192 + d6e621a commit 66809a7
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 7 deletions.
5 changes: 4 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ development at the same time, such as 4.5.x and 5.0.
Unreleased
----------

Nothing yet.
- Docs: a new :ref:`Migrating page <migrating>` with details about how to
migrate between major versions of coverage.py. It currently covers the
wildcard changes in 7.x. Thanks, `Brian Grohe <pull 1610_>`_.

.. _pull 1610: https://github.com/nedbat/coveragepy/pull/1610

.. scriv-start-here
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Bill Hart
Bradley Burns
Brandon Rhodes
Brett Cannon
Brian Grohe
Bruno P. Kinoshita
Buck Evan
Calen Pennington
Expand Down
1 change: 1 addition & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -234,4 +234,5 @@ More information
trouble
faq
Change history <changes>
migrating
sleepy
29 changes: 29 additions & 0 deletions doc/migrating.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.. Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
.. For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
.. _migrating:

==========================
Migrating between versions
==========================

New major versions of coverage.py might require you to adjust your settings,
options, or other aspects of your use. This page details those changes.

.. _migrating_6x_7x:

Migrating from 6.x to 7.x
-------------------------

- The way that wildcards when specifying file paths work in certain cases has changed in 7.x:

- Previously, ``*`` would incorrectly match directory separators, making
precise matching difficult. Patterns such as ``*tests/*``
will need to be changed to ``*/tests/*``.

- ``**`` now matches any number of nested directories. If you wish to retain the behavior of
``**/tests/*`` in previous versions then ``*/**/tests/*`` can be used instead.

- When remapping file paths with ``[paths]``, a path will be remapped only if
the resulting path exists. Ensure that remapped ``[paths]`` exist when upgrading
as this is now being enforced.
8 changes: 2 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ skip_missing_interpreters = {env:COVERAGE_SKIP_MISSING_INTERPRETERS:True}
toxworkdir = {env:TOXWORKDIR:.tox}

[testenv]
usedevelop = True
extras =
toml
package = editable

# PYVERSIONS
deps =
Expand All @@ -30,15 +30,11 @@ setenv =
# so override any local setting.
PYTHONPYCACHEPREFIX=

# $set_env.py: COVERAGE_PIP_ARGS - Extra arguments for `pip install`
# `--no-build-isolation` will let tox work with no network.
commands =
# Create tests/zipmods.zip
python igor.py zip_mods

# Build the C extension and test with the CTracer
python setup.py --quiet build_ext --inplace
python -m pip install {env:COVERAGE_PIP_ARGS} -q -e .
# Test with the CTracer that normal installation gives us.
python igor.py test_with_tracer c {posargs}

# Remove the C extension so that we can test the PyTracer
Expand Down

0 comments on commit 66809a7

Please sign in to comment.