diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-10-06 20:31:19 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-10-06 20:31:19 -0400 |
commit | a309f08287e3bc3f50e2c97feaa44e6b2523d355 (patch) | |
tree | b75f5e46e09def6eeee238b131cc8170a883fda6 | |
parent | f33b733e92a2422d64cb7f4ba2a64898e1e4f336 (diff) | |
download | python-coveragepy-git-a309f08287e3bc3f50e2c97feaa44e6b2523d355.tar.gz |
fix: make exceptions importable from coverage.misc again. #1226
-rw-r--r-- | CHANGES.rst | 9 | ||||
-rw-r--r-- | coverage/misc.py | 5 |
2 files changed, 13 insertions, 1 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index 784fa5c2..3dea0df1 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -22,6 +22,12 @@ This list is detailed and covers changes in each pre-release version. Unreleased ---------- +- In 6.0, the coverage.py exceptions moved from coverage.misc to + coverage.exceptions. These exceptions are not part of the public supported + API, CoverageException is. But a number of other third-party packages were + importing the exceptions from coverage.misc, so they are now available from + there again (`issue 1226`_). + - Changed an internal detail of how tomli is imported, so that tomli can use coverage.py for their own test suite (`issue 1228`_). @@ -29,8 +35,9 @@ Unreleased function can have an argument called "self", but no local named "self" (`pull request 1210`_). Thanks, Ben Carlsson. -.. _issue 1228: https://github.com/nedbat/coveragepy/issues/1228 .. _pull request 1210: https://github.com/nedbat/coveragepy/pull/1210 +.. _issue 1226: https://github.com/nedbat/coveragepy/issues/1226 +.. _issue 1228: https://github.com/nedbat/coveragepy/issues/1228 .. _changes_60: diff --git a/coverage/misc.py b/coverage/misc.py index cd4a7740..0f985be0 100644 --- a/coverage/misc.py +++ b/coverage/misc.py @@ -20,6 +20,11 @@ import types from coverage import env from coverage.exceptions import CoverageException +# In 6.0, the exceptions moved from misc.py to exceptions.py. But a number of +# other packages were importing the exceptions from misc, so import them here. +# pylint: disable=unused-wildcard-import +from coverage.exceptions import * # pylint: disable=wildcard-import + ISOLATED_MODULES = {} |