Skip to content

Commit 6d4d45e

Browse files
authored
Bump deps and tools (#2545)
1 parent 41cec56 commit 6d4d45e

File tree

5 files changed

+40
-40
lines changed

5 files changed

+40
-40
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,21 @@ repos:
3232
hooks:
3333
- id: isort
3434
- repo: https://github.com/psf/black
35-
rev: 23.1.0
35+
rev: 23.3.0
3636
hooks:
3737
- id: black
3838
args: [--safe]
3939
- repo: https://github.com/asottile/blacken-docs
4040
rev: 1.13.0
4141
hooks:
4242
- id: blacken-docs
43-
additional_dependencies: [black==23.1]
43+
additional_dependencies: [black==23.3]
4444
- repo: https://github.com/pre-commit/pygrep-hooks
4545
rev: v1.10.0
4646
hooks:
4747
- id: rst-backticks
4848
- repo: https://github.com/tox-dev/tox-ini-fmt
49-
rev: "0.6.1"
49+
rev: "1.3.0"
5050
hooks:
5151
- id: tox-ini-fmt
5252
args: ["-p", "fix"]
@@ -55,14 +55,14 @@ repos:
5555
hooks:
5656
- id: flake8
5757
additional_dependencies:
58-
- flake8-bugbear==23.2.13
59-
- flake8-comprehensions==3.10.1
58+
- flake8-bugbear==23.3.23
59+
- flake8-comprehensions==3.12
6060
- flake8-pytest-style==1.7.2
6161
- flake8-spellcheck==0.28
6262
- flake8-unused-arguments==0.0.13
63-
- flake8-noqa==1.3
63+
- flake8-noqa==1.3.1
6464
- pep8-naming==0.13.3
65-
- flake8-pyproject==1.2.2
65+
- flake8-pyproject==1.2.3
6666
- repo: https://github.com/pre-commit/mirrors-prettier
6767
rev: "v2.7.1"
6868
hooks:

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
build-backend = "hatchling.build"
33
requires = [
44
"hatch-vcs>=0.3",
5-
"hatchling>=1.12.2",
5+
"hatchling>=1.14",
66
]
77

88
[project]
@@ -42,20 +42,20 @@ dependencies = [
4242
"platformdirs<4,>=2.4",
4343
]
4444
optional-dependencies.docs = [
45-
"furo>=2022.12.7",
45+
"furo>=2023.3.27",
4646
"proselint>=0.13",
4747
"sphinx>=6.1.3",
4848
"sphinx-argparse>=0.4",
4949
"sphinxcontrib-towncrier>=0.2.1a0",
5050
"towncrier>=22.12",
5151
]
5252
optional-dependencies.test = [
53-
"covdefaults>=2.2.2",
54-
"coverage>=7.1",
53+
"covdefaults>=2.3",
54+
"coverage>=7.2.3",
5555
"coverage-enable-subprocess>=1",
5656
"flaky>=3.7",
57-
"packaging>=23",
58-
"pytest>=7.2.1",
57+
"packaging>=23.1",
58+
"pytest>=7.3.1",
5959
"pytest-env>=0.8.1",
6060
"pytest-freezegun>=0.4.2",
6161
"pytest-mock>=3.10",

src/virtualenv/discovery/cached_py_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def _get_via_file_cache(cls, app_data, path, exe, env):
6464
data = py_info_store.read()
6565
of_path, of_st_mtime, of_content = data["path"], data["st_mtime"], data["content"]
6666
if of_path == path_text and of_st_mtime == path_modified:
67-
py_info = cls._from_dict({k: v for k, v in of_content.items()})
67+
py_info = cls._from_dict(of_content.copy())
6868
sys_exe = py_info.system_executable
6969
if sys_exe is not None and not os.path.exists(sys_exe):
7070
py_info_store.remove()

src/virtualenv/discovery/py_info.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def sysconfig_path(self, key, config_var=None, sep=os.sep):
222222
if config_var is None:
223223
config_var = self.sysconfig_vars
224224
else:
225-
base = {k: v for k, v in self.sysconfig_vars.items()}
225+
base = self.sysconfig_vars.copy()
226226
base.update(config_var)
227227
config_var = base
228228
return pattern.format(**config_var).replace("/", sep)
@@ -395,13 +395,13 @@ def from_exe(cls, exe, app_data=None, raise_on_error=True, ignore_cache=False, r
395395
def _from_json(cls, payload):
396396
# the dictionary unroll here is to protect against pypy bug of interpreter crashing
397397
raw = json.loads(payload)
398-
return cls._from_dict({k: v for k, v in raw.items()})
398+
return cls._from_dict(raw.copy())
399399

400400
@classmethod
401401
def _from_dict(cls, data):
402402
data["version_info"] = VersionInfo(**data["version_info"]) # restore this to a named tuple structure
403403
result = cls()
404-
result.__dict__ = {k: v for k, v in data.items()}
404+
result.__dict__ = data.copy()
405405
return result
406406

407407
@classmethod

tox.ini

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
[tox]
2-
envlist =
2+
requires =
3+
tox>=4.2
4+
env_list =
35
fix
46
py311
57
py310
@@ -10,38 +12,36 @@ envlist =
1012
coverage
1113
readme
1214
docs
13-
isolated_build = true
1415
skip_missing_interpreters = true
15-
requires = tox>=4
1616

1717
[testenv]
1818
description = run tests with {basepython}
19+
package = wheel
20+
wheel_build_env = .pkg
1921
extras =
2022
test
21-
commands =
22-
coverage erase
23-
coverage run -m pytest {posargs:--junitxml {toxworkdir}/junit.{envname}.xml tests --int}
24-
coverage combine
25-
coverage report --skip-covered --show-missing
26-
coverage xml -o {toxworkdir}/coverage.{envname}.xml
27-
coverage html -d {envtmpdir}/htmlcov --show-contexts --title virtualenv-{envname}-coverage
28-
package = wheel
2923
pass_env =
3024
CI_RUN
3125
PYTEST_*
3226
TERM
3327
set_env =
34-
_COVERAGE_SRC = {envsitepackagesdir}/virtualenv
3528
COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
3629
COVERAGE_PROCESS_START = {toxinidir}/pyproject.toml
3730
PYTHONWARNDEFAULTENCODING = 1
38-
wheel_build_env = .pkg
31+
_COVERAGE_SRC = {envsitepackagesdir}/virtualenv
32+
commands =
33+
coverage erase
34+
coverage run -m pytest {posargs:--junitxml {toxworkdir}/junit.{envname}.xml tests --int}
35+
coverage combine
36+
coverage report --skip-covered --show-missing
37+
coverage xml -o {toxworkdir}/coverage.{envname}.xml
38+
coverage html -d {envtmpdir}/htmlcov --show-contexts --title virtualenv-{envname}-coverage
3939

4040
[testenv:fix]
4141
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
4242
skip_install = true
4343
deps =
44-
pre-commit>=3.0.4
44+
pre-commit>=3.2.2
4545
commands =
4646
pre-commit run --all-files --show-diff-on-failure
4747

@@ -68,37 +68,37 @@ commands =
6868
description = upgrade pip/wheels/setuptools to latest
6969
skip_install = true
7070
deps =
71-
black>=23.1
72-
commands =
73-
python upgrade_wheels.py
74-
change_dir = {toxinidir}/tasks
71+
black>=23.3
7572
pass_env =
7673
UPGRADE_ADVISORY
74+
change_dir = {toxinidir}/tasks
75+
commands =
76+
python upgrade_wheels.py
7777

7878
[testenv:release]
7979
description = do a release, required posarg of the version number
8080
deps =
81-
gitpython>=3.1.30
82-
packaging>=23
81+
gitpython>=3.1.31
82+
packaging>=23.1
8383
towncrier>=22.12
84+
change_dir = {toxinidir}/tasks
8485
commands =
8586
python release.py --version {posargs}
86-
change_dir = {toxinidir}/tasks
8787

8888
[testenv:dev]
8989
description = generate a DEV environment
90+
package = editable
9091
extras =
9192
docs
9293
test
9394
commands =
9495
python -m pip list --format=columns
9596
python -c 'import sys; print(sys.executable)'
96-
package = editable
9797

9898
[testenv:zipapp]
9999
description = generate a zipapp
100100
skip_install = true
101101
deps =
102-
packaging>=23
102+
packaging>=23.1
103103
commands =
104104
python tasks/make_zipapp.py

0 commit comments

Comments
 (0)