diff --git a/changelog/13841.contrib.rst b/changelog/13841.contrib.rst new file mode 100644 index 00000000000..e5672634700 --- /dev/null +++ b/changelog/13841.contrib.rst @@ -0,0 +1 @@ +``tox>=4`` is now required when contributing to pytest. diff --git a/tox.ini b/tox.ini index fa86c9c4403..1203bfe2352 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,6 @@ [tox] -isolated_build = True -minversion = 3.20.0 -distshare = {homedir}/.tox/distshare +requires = + tox >= 4 envlist = linting py310 @@ -94,12 +93,14 @@ deps = xdist: pytest-xdist>=2.1.0 xdist: -e . {env:_PYTEST_TOX_EXTRA_DEP:} +# Can use the same wheel for all environments. +package = wheel +wheel_build_env = .pkg [testenv:linting] description = run pre-commit-defined linters under `{basepython}` skip_install = True -basepython = python3 deps = pre-commit>=2.9.3 commands = pre-commit run --all-files --show-diff-on-failure {posargs:} setenv = @@ -127,7 +128,6 @@ setenv = [testenv:docs-checklinks] description = check the links in the documentation with `{basepython}` -basepython = python3 usedevelop = True changedir = doc/en deps = -r{toxinidir}/doc/en/requirements.txt @@ -141,7 +141,6 @@ setenv = description = regenerate documentation examples under `{basepython}` changedir = doc/en -basepython = python3 passenv = SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST deps = @@ -194,7 +193,6 @@ commands = [testenv:release] description = do a release, required posarg of the version number -basepython = python3 usedevelop = True passenv = * deps = @@ -212,7 +210,6 @@ commands = python scripts/prepare-release-pr.py {posargs} [testenv:generate-gh-release-notes] description = generate release notes that can be published as GitHub Release -basepython = python3 usedevelop = True deps = pypandoc