Skip to content

Commit

Permalink
Bump deps and tools (#2545)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbernat committed Apr 19, 2023
1 parent 41cec56 commit 6d4d45e
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 40 deletions.
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@ repos:
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.1.0
rev: 23.3.0
hooks:
- id: black
args: [--safe]
- repo: https://github.com/asottile/blacken-docs
rev: 1.13.0
hooks:
- id: blacken-docs
additional_dependencies: [black==23.1]
additional_dependencies: [black==23.3]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: rst-backticks
- repo: https://github.com/tox-dev/tox-ini-fmt
rev: "0.6.1"
rev: "1.3.0"
hooks:
- id: tox-ini-fmt
args: ["-p", "fix"]
Expand All @@ -55,14 +55,14 @@ repos:
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear==23.2.13
- flake8-comprehensions==3.10.1
- flake8-bugbear==23.3.23
- flake8-comprehensions==3.12
- flake8-pytest-style==1.7.2
- flake8-spellcheck==0.28
- flake8-unused-arguments==0.0.13
- flake8-noqa==1.3
- flake8-noqa==1.3.1
- pep8-naming==0.13.3
- flake8-pyproject==1.2.2
- flake8-pyproject==1.2.3
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v2.7.1"
hooks:
Expand Down
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
build-backend = "hatchling.build"
requires = [
"hatch-vcs>=0.3",
"hatchling>=1.12.2",
"hatchling>=1.14",
]

[project]
Expand Down Expand Up @@ -42,20 +42,20 @@ dependencies = [
"platformdirs<4,>=2.4",
]
optional-dependencies.docs = [
"furo>=2022.12.7",
"furo>=2023.3.27",
"proselint>=0.13",
"sphinx>=6.1.3",
"sphinx-argparse>=0.4",
"sphinxcontrib-towncrier>=0.2.1a0",
"towncrier>=22.12",
]
optional-dependencies.test = [
"covdefaults>=2.2.2",
"coverage>=7.1",
"covdefaults>=2.3",
"coverage>=7.2.3",
"coverage-enable-subprocess>=1",
"flaky>=3.7",
"packaging>=23",
"pytest>=7.2.1",
"packaging>=23.1",
"pytest>=7.3.1",
"pytest-env>=0.8.1",
"pytest-freezegun>=0.4.2",
"pytest-mock>=3.10",
Expand Down
2 changes: 1 addition & 1 deletion src/virtualenv/discovery/cached_py_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def _get_via_file_cache(cls, app_data, path, exe, env):
data = py_info_store.read()
of_path, of_st_mtime, of_content = data["path"], data["st_mtime"], data["content"]
if of_path == path_text and of_st_mtime == path_modified:
py_info = cls._from_dict({k: v for k, v in of_content.items()})
py_info = cls._from_dict(of_content.copy())
sys_exe = py_info.system_executable
if sys_exe is not None and not os.path.exists(sys_exe):
py_info_store.remove()
Expand Down
6 changes: 3 additions & 3 deletions src/virtualenv/discovery/py_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def sysconfig_path(self, key, config_var=None, sep=os.sep):
if config_var is None:
config_var = self.sysconfig_vars
else:
base = {k: v for k, v in self.sysconfig_vars.items()}
base = self.sysconfig_vars.copy()
base.update(config_var)
config_var = base
return pattern.format(**config_var).replace("/", sep)
Expand Down Expand Up @@ -395,13 +395,13 @@ def from_exe(cls, exe, app_data=None, raise_on_error=True, ignore_cache=False, r
def _from_json(cls, payload):
# the dictionary unroll here is to protect against pypy bug of interpreter crashing
raw = json.loads(payload)
return cls._from_dict({k: v for k, v in raw.items()})
return cls._from_dict(raw.copy())

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

@classmethod
Expand Down
46 changes: 23 additions & 23 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[tox]
envlist =
requires =
tox>=4.2
env_list =
fix
py311
py310
Expand All @@ -10,38 +12,36 @@ envlist =
coverage
readme
docs
isolated_build = true
skip_missing_interpreters = true
requires = tox>=4

[testenv]
description = run tests with {basepython}
package = wheel
wheel_build_env = .pkg
extras =
test
commands =
coverage erase
coverage run -m pytest {posargs:--junitxml {toxworkdir}/junit.{envname}.xml tests --int}
coverage combine
coverage report --skip-covered --show-missing
coverage xml -o {toxworkdir}/coverage.{envname}.xml
coverage html -d {envtmpdir}/htmlcov --show-contexts --title virtualenv-{envname}-coverage
package = wheel
pass_env =
CI_RUN
PYTEST_*
TERM
set_env =
_COVERAGE_SRC = {envsitepackagesdir}/virtualenv
COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
COVERAGE_PROCESS_START = {toxinidir}/pyproject.toml
PYTHONWARNDEFAULTENCODING = 1
wheel_build_env = .pkg
_COVERAGE_SRC = {envsitepackagesdir}/virtualenv
commands =
coverage erase
coverage run -m pytest {posargs:--junitxml {toxworkdir}/junit.{envname}.xml tests --int}
coverage combine
coverage report --skip-covered --show-missing
coverage xml -o {toxworkdir}/coverage.{envname}.xml
coverage html -d {envtmpdir}/htmlcov --show-contexts --title virtualenv-{envname}-coverage

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

Expand All @@ -68,37 +68,37 @@ commands =
description = upgrade pip/wheels/setuptools to latest
skip_install = true
deps =
black>=23.1
commands =
python upgrade_wheels.py
change_dir = {toxinidir}/tasks
black>=23.3
pass_env =
UPGRADE_ADVISORY
change_dir = {toxinidir}/tasks
commands =
python upgrade_wheels.py

[testenv:release]
description = do a release, required posarg of the version number
deps =
gitpython>=3.1.30
packaging>=23
gitpython>=3.1.31
packaging>=23.1
towncrier>=22.12
change_dir = {toxinidir}/tasks
commands =
python release.py --version {posargs}
change_dir = {toxinidir}/tasks

[testenv:dev]
description = generate a DEV environment
package = editable
extras =
docs
test
commands =
python -m pip list --format=columns
python -c 'import sys; print(sys.executable)'
package = editable

[testenv:zipapp]
description = generate a zipapp
skip_install = true
deps =
packaging>=23
packaging>=23.1
commands =
python tasks/make_zipapp.py

0 comments on commit 6d4d45e

Please sign in to comment.