Skip to content

Commit a309f08

Browse files
committed
fix: make exceptions importable from coverage.misc again. #1226
1 parent f33b733 commit a309f08

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

CHANGES.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,22 @@ This list is detailed and covers changes in each pre-release version.
2222
Unreleased
2323
----------
2424

25+
- In 6.0, the coverage.py exceptions moved from coverage.misc to
26+
coverage.exceptions. These exceptions are not part of the public supported
27+
API, CoverageException is. But a number of other third-party packages were
28+
importing the exceptions from coverage.misc, so they are now available from
29+
there again (`issue 1226`_).
30+
2531
- Changed an internal detail of how tomli is imported, so that tomli can use
2632
coverage.py for their own test suite (`issue 1228`_).
2733

2834
- Defend against an obscure possibility under code obfuscation, where a
2935
function can have an argument called "self", but no local named "self"
3036
(`pull request 1210`_). Thanks, Ben Carlsson.
3137

32-
.. _issue 1228: https://github.com/nedbat/coveragepy/issues/1228
3338
.. _pull request 1210: https://github.com/nedbat/coveragepy/pull/1210
39+
.. _issue 1226: https://github.com/nedbat/coveragepy/issues/1226
40+
.. _issue 1228: https://github.com/nedbat/coveragepy/issues/1228
3441

3542

3643
.. _changes_60:

coverage/misc.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
from coverage import env
2121
from coverage.exceptions import CoverageException
2222

23+
# In 6.0, the exceptions moved from misc.py to exceptions.py. But a number of
24+
# other packages were importing the exceptions from misc, so import them here.
25+
# pylint: disable=unused-wildcard-import
26+
from coverage.exceptions import * # pylint: disable=wildcard-import
27+
2328
ISOLATED_MODULES = {}
2429

2530

0 commit comments

Comments
 (0)