10 from coverage import env |
10 from coverage import env |
11 from coverage.exceptions import ConfigError |
11 from coverage.exceptions import ConfigError |
12 from coverage.misc import import_third_party, substitute_variables |
12 from coverage.misc import import_third_party, substitute_variables |
13 |
13 |
14 |
14 |
15 if env.PYVERSION >= (3, 11): |
15 if env.PYVERSION >= (3, 11, 0, "alpha", 7): |
16 import tomllib # pylint: disable=import-error |
16 import tomllib # pylint: disable=import-error |
17 else: |
17 else: |
18 # TOML support on Python 3.10 and below is an install-time extra option. |
18 # TOML support on Python 3.10 and below is an install-time extra option. |
19 # (Import typing is here because import_third_party will unload any module |
19 # (Import typing is here because import_third_party will unload any module |
20 # that wasn't already imported. tomli imports typing, and if we unload it, |
20 # that wasn't already imported. tomli imports typing, and if we unload it, |