Skip to content

Commit 70b4e98

Browse files
pre-commit-ci[bot]gaborbernat
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci Signed-off-by: Bernát Gábor <gaborjbernat@gmail.com>
1 parent 0ed31db commit 70b4e98

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ install_requires =
4242
virtualenv!=20.0.0,!=20.0.1,!=20.0.2,!=20.0.3,!=20.0.4,!=20.0.5,!=20.0.6,!=20.0.7,>=16.0.0
4343
colorama>=0.4.1 ;platform_system=="Windows"
4444
importlib-metadata>=0.12;python_version<"3.8"
45-
toml;python_version<"3.11"
45+
tomli>=2.0.1;python_version<"3.11"
4646
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
4747

4848
[options.packages.find]

src/tox/config/__init__.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,9 @@
2222
import six
2323

2424
if sys.version_info >= (3, 11):
25-
import tomllib as toml_loader
26-
toml_mode = "rb"
27-
toml_encoding = None
25+
import tomllib as toml
2826
else:
29-
import toml as toml_loader
30-
toml_mode = "r"
31-
toml_encoding = "UTF-8"
27+
import tomli as toml
3228

3329
from packaging import requirements
3430
from packaging.utils import canonicalize_name
@@ -313,9 +309,9 @@ def parseconfig(args, plugins=()):
313309

314310

315311
def get_py_project_toml(path):
316-
with io.open(str(path), mode=toml_mode, encoding=toml_encoding) as file_handler:
317-
config_data = toml_loader.load(file_handler)
318-
return config_data
312+
with open(str(path), mode='rb') as file_handler:
313+
config_data = toml.load(file_handler)
314+
return config_data
319315

320316

321317
def propose_configs(cli_config_file):

tox.ini

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ passenv =
4848
basepython = python3.10
4949
skip_install = true
5050
deps =
51-
pre-commit>=2.16
51+
pre-commit>=2.20
5252
extras =
5353
lint
5454
commands =
@@ -65,8 +65,8 @@ setenv =
6565
COVERAGE_FILE = {toxworkdir}/.coverage
6666
skip_install = true
6767
deps =
68-
coverage>=6.2
69-
diff-cover>=6.4
68+
coverage>=6.4.4
69+
diff-cover>=6.5.1
7070
parallel_show_output = true
7171
commands =
7272
coverage combine
@@ -90,7 +90,7 @@ description = check that the long description is valid
9090
basepython = python3.9
9191
skip_install = true
9292
deps =
93-
twine>=3.7.1
93+
twine>=4.0.1
9494
extras =
9595
commands =
9696
pip wheel -w {envtmpdir}/build --no-deps .
@@ -114,9 +114,9 @@ passenv =
114114
*
115115
basepython = python3.10
116116
deps =
117-
gitpython>=3.1.24
117+
gitpython>=3.1.27
118118
packaging>=21.3
119-
towncrier>=21.3
119+
towncrier>=21.9
120120
commands =
121121
python {toxinidir}/tasks/release.py --version {posargs}
122122

0 commit comments

Comments
 (0)