summaryrefslogtreecommitdiff
path: root/coverage/tomlconfig.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-10-11 15:22:18 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-10-11 16:15:40 -0400
commit260359756694728cd13f8c8715dddf7c6e2f371d (patch)
tree4ed1f110286dd34c53b9d1169d1d94c83bc89ac3 /coverage/tomlconfig.py
parentfdaa8224ccfa16233fda0c84860ef95ca073ee95 (diff)
downloadpython-coveragepy-git-260359756694728cd13f8c8715dddf7c6e2f371d.tar.gz
fix: source modules need to be re-imported. #1232
Diffstat (limited to 'coverage/tomlconfig.py')
-rw-r--r--coverage/tomlconfig.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/coverage/tomlconfig.py b/coverage/tomlconfig.py
index 3301acc8..4a1e322c 100644
--- a/coverage/tomlconfig.py
+++ b/coverage/tomlconfig.py
@@ -10,7 +10,11 @@ import re
from coverage.exceptions import CoverageException
from coverage.misc import import_third_party, substitute_variables
-# TOML support is an install-time extra option.
+# TOML support is an install-time extra option. (Import typing is here because
+# import_third_party will unload any module that wasn't already imported.
+# tomli imports typing, and if we unload it, later it's imported again, and on
+# Python 3.6, this causes infinite recursion.)
+import typing # pylint: disable=unused-import, wrong-import-order
tomli = import_third_party("tomli")