diff --git a/pyctdev/util.py b/pyctdev/util.py index 68127cc..3421d25 100644 --- a/pyctdev/util.py +++ b/pyctdev/util.py @@ -3,6 +3,8 @@ import itertools import configparser +import tomli as toml + # Fallbacks for conda, which can't install tox from defaults (at # least, not as of June 2018). Allows to parse tox.ini (i.e. to use # tox.ini as single place where all test cmds and envs are stored) @@ -21,12 +23,6 @@ except ImportError: setuptools_version = None -try: - import tomli as toml -except ImportError: - # tomllib added to the stdlib in Python 3.11 - import tomllib as toml - toxconf = tox_config.parseconfig('tox') # we later filter out any _onlytox commands... toxconf_pre = configparser.ConfigParser() diff --git a/setup.py b/setup.py index 3189b88..85e8107 100755 --- a/setup.py +++ b/setup.py @@ -45,7 +45,7 @@ # pinning to avoid https://github.com/pyviz/pyctdev/issues/12 'pip >=19.1.1', # Added to no longer depend on tomli vendored by pip. - 'tomli>=2;python_version<"3.11"', + 'tomli', ], extras_require={ 'tests': ['flake8'],