Skip to content

Commit

Permalink
Merge branch 'fix-tox-415'
Browse files Browse the repository at this point in the history
  • Loading branch information
ziima committed May 13, 2024
2 parents 1116153 + 6e2ace4 commit 91f6639
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
17 changes: 9 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ isolated_build = true
envlist =
clear-coverage
quality
py37-tox{3,4}
py38-tox{3,4}
py39-tox{3,4}
py310-tox{3,4}
py37-tox{3,414,4}
py38-tox{3,414,4}
py39-tox{3,414,4}
py310-tox{3,414,4}
compute-coverage
skip_missing_interpreters = true

Expand All @@ -17,6 +17,7 @@ setenv =
deps =
coverage
tox3: tox == 3.*
tox414: tox == 4.*,<4.15
tox4: tox == 4.*
commands =
coverage run --parallel-mode --include=tox_ipdb.py,tests.py --branch -m unittest {posargs:discover}
Expand All @@ -30,10 +31,10 @@ commands =

[testenv:compute-coverage]
depends =
py37-tox{3,4}
py38-tox{3,4}
py39-tox{3,4}
py310-tox{3,4}
py37-tox{3,414,4}
py38-tox{3,414,4}
py39-tox{3,414,4}
py310-tox{3,414,4}
# Use single virtualenv for both coverage envs.
envdir = {toxworkdir}/coverage
parallel_show_output = true
Expand Down
6 changes: 5 additions & 1 deletion tox_ipdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ def tox_add_env_config(env_conf: EnvConfigSet, state: State) -> None:
_LOGGER.debug("tox-ipdb-plugin[%s]: New deps: %s", env_conf.name, new_deps)

override = Override('{}.deps={}'.format(env_conf.name, '\n'.join(new_deps)))
env_conf.loaders[0].overrides[override.key] = override
# API changed in tox 4.15.0
if LooseVersion(tox.__version__) < LooseVersion('4.15.0'):
env_conf.loaders[0].overrides[override.key] = override # type: ignore[assignment]
else:
env_conf.loaders[0].overrides.setdefault(override.key, []).append(override)

# Clear cache
env_conf._defined['deps']._cache = _PLACE_HOLDER # type: ignore[attr-defined] # _cache is not public API

0 comments on commit 91f6639

Please sign in to comment.