Skip to content

Commit

Permalink
simplify tomli dependency (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximlt authored May 12, 2022
1 parent 182c2ac commit 1ad27d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions pyctdev/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down

0 comments on commit 1ad27d9

Please sign in to comment.