Skip to content

Commit 3a23d8a

Browse files
committed
fix: use tomli for [toml] under more precise conditions. #1390
1 parent a8758a6 commit 3a23d8a

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGES.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ Unreleased
2525
1381`_ and `pull 1388`_). Slightly improved performance when using the C
2626
trace function, as most environments do.
2727

28+
- The conditions for using tomllib from the standard library have been made
29+
more precise, so that 3.11 alphas will continue to work. Closes `issue
30+
1390`_.
31+
2832
.. _pull 1381: https://github.com/nedbat/coveragepy/pull/1381
2933
.. _pull 1388: https://github.com/nedbat/coveragepy/pull/1388
34+
.. _issue 1390: https://github.com/nedbat/coveragepy/issues/1390
3035

3136

3237
.. _changes_64:

coverage/tomlconfig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from coverage.misc import import_third_party, substitute_variables
1313

1414

15-
if env.PYVERSION >= (3, 11):
15+
if env.PYVERSION >= (3, 11, 0, "alpha", 7):
1616
import tomllib # pylint: disable=import-error
1717
else:
1818
# TOML support on Python 3.10 and below is an install-time extra option.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def better_set_verbosity(v):
108108

109109
extras_require={
110110
# Enable pyproject.toml support.
111-
'toml': ['tomli; python_version < "3.11"'],
111+
'toml': ['tomli; python_full_version<="3.11.0a6"'],
112112
},
113113

114114
# We need to get HTML assets from our htmlfiles directory.

0 commit comments

Comments
 (0)