Skip to content

Commit 1ad27d9

Browse files
authored
simplify tomli dependency (#94)
1 parent 182c2ac commit 1ad27d9

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

pyctdev/util.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import itertools
44
import configparser
55

6+
import tomli as toml
7+
68
# Fallbacks for conda, which can't install tox from defaults (at
79
# least, not as of June 2018). Allows to parse tox.ini (i.e. to use
810
# tox.ini as single place where all test cmds and envs are stored)
@@ -21,12 +23,6 @@
2123
except ImportError:
2224
setuptools_version = None
2325

24-
try:
25-
import tomli as toml
26-
except ImportError:
27-
# tomllib added to the stdlib in Python 3.11
28-
import tomllib as toml
29-
3026
toxconf = tox_config.parseconfig('tox')
3127
# we later filter out any _onlytox commands...
3228
toxconf_pre = configparser.ConfigParser()

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
# pinning to avoid https://github.com/pyviz/pyctdev/issues/12
4646
'pip >=19.1.1',
4747
# Added to no longer depend on tomli vendored by pip.
48-
'tomli>=2;python_version<"3.11"',
48+
'tomli',
4949
],
5050
extras_require={
5151
'tests': ['flake8'],

0 commit comments

Comments
 (0)