Part of the repository modernization effort.
Background
requirements_test.txt pins test dependencies with dead environment markers:
flake8~=4.0; python_version > '2.7'
flake8~=3.9; python_version < '3.0'
mock~=4.0; python_version > '2.7'
mock~=3.0; python_version < '3.0'
pytest-cov~=3.0; python_version > '2.7'
pytest-cov~=2.0; python_version < '3.0'
pytest~=6.2; python_version > '2.7'
pytest~=4.0; python_version < '3.0'
trustme~=0.9.0
The project supports Python 3 only. Every python_version marker is dead.
mock is the PyPI backport. The standard library holds unittest.mock. The six removal issue converts the test imports.
References to the file: tox.ini:4, .ci-before-script.sh:5, AGENTS.md:16, and .travis.yml:14. .travis.yml is dead.
Proposed dependency group
Add to pyproject.toml:
[dependency-groups]
test = [
"pytest>=7.4",
"pytest-cov>=4.1",
"trustme>=0.9",
]
flake8 moves out. The ruff issue owns the lint tool. mock moves out. The standard library covers it.
Warning: check the tox version
tox supports the dependency_groups directive from version 4.22. Check the installed version first.
If the installed tox is older, use one of these two options:
- Pin a newer
tox in flake.nix and use dependency_groups = test.
- Keep
deps = in tox.ini and list the three packages inline.
Pick option 1.
Acceptance criteria
Files to change
pyproject.toml, requirements_test.txt (delete), tox.ini, .ci-before-script.sh, AGENTS.md.
Order
Do the PEP 621 issue first. Do the six removal issue first. That issue removes the mock imports.
This issue and the ruff issue both change tox.ini. Merge them in sequence.
Part of the repository modernization effort.
Background
requirements_test.txtpins test dependencies with dead environment markers:The project supports Python 3 only. Every
python_versionmarker is dead.mockis the PyPI backport. The standard library holdsunittest.mock. Thesixremoval issue converts the test imports.References to the file:
tox.ini:4,.ci-before-script.sh:5,AGENTS.md:16, and.travis.yml:14..travis.ymlis dead.Proposed dependency group
Add to
pyproject.toml:flake8moves out. The ruff issue owns the lint tool.mockmoves out. The standard library covers it.Warning: check the tox version
toxsupports thedependency_groupsdirective from version 4.22. Check the installed version first.If the installed
toxis older, use one of these two options:toxinflake.nixand usedependency_groups = test.deps =intox.iniand list the three packages inline.Pick option 1.
Acceptance criteria
pyproject.tomlholds the[dependency-groups]table above.requirements_test.txtis deleted.tox.ini:4usesdependency_groups = test. It no longer readsdeps = -rrequirements_test.txt..ci-before-script.sh:5installs thetestgroup, or the file is deleted by the CI workflow issue.AGENTS.md:16states the new install command.pytest -spasses locally.toxpasses.Files to change
pyproject.toml,requirements_test.txt(delete),tox.ini,.ci-before-script.sh,AGENTS.md.Order
Do the PEP 621 issue first. Do the
sixremoval issue first. That issue removes themockimports.This issue and the ruff issue both change
tox.ini. Merge them in sequence.