tox-min-req
Table of Contents
tox-min-req is a tox plugin that simplifies
minimum requirements (min-req) testing.
Minimum requirements testing is important to validate whether the minimum requirements are satisfied.
After installing, to use this plugin you need to use MIN_REQ environment variable either in the call
(e.g. MIN_REQ=1 tox -e py38-linux-pyqt5) or in setenv section of your tox configuration.
Why use this instead of deps attribute of the tox env section?
One alternative solution is to use the deps section in tox configuration to install min-req dependecies.
However, packages from deps and the actual package to be tested are installed in two independent steps. This means that
some of the min-req dependencies could be upgraded or downgraded when installing the actual package.
The PIP_CONSTRAINT and UV_CONSTRAINT variables are used to pin the dependencies; it will apply to the call of pip install
during dependency resolving.
uv ignores the UV_CONSTRAINT variable when constraints are also passed with -c, which tox does for -c lines in deps,
for constrain_package_deps = true and for the constraints setting. With the uv-venv-runner (tox-uv) the plugin then adds
the generated file to the constraints setting. tox then no longer applies the constrain_package_deps constraints,
so the package dependencies are pinned by the generated file only. This requires tox 4.58.0 or newer; with an older tox such an environment fails
instead of silently installing newer versions.
Installation
pip install tox-min-req
License
tox-min-req is distributed under the terms of the MIT license.
Usage
The basic usage is to set the MIN_REQ environment variable to 1
$ MIN_REQ=1 tox -e py310
Configuration options
The tox-min-req plugin allows one to provide the following environment configuration options:
min_req- set to1to enable the minimum requirements testing; can be used instead of setting the environment variable.min_req_constraints- list of additional constraints that will be used to generate the constraints file. This is useful in following scenarios:- Some of dependencies of an old version are incompatible with dependencies in latest version (see Known issues, below).
- Maintainers would like to also test some problematic dependencies an old version, but not the oldest supported version.
[tox]
envlist = py310
[testenv]
extras = test
recreate = True
commands = pytest test_file.py
min_req = 1
min_req_constraints=
coverage==6.5.0
babel==2.6.0
six==1.14.0
-r {project_dir}/constraints.txt
Please note that -r {project_dir}/constraints.txt will be put in the generated constraints file—it will not be parsed.
Known issues
Pinning only direct dependencies
Because this plugin only parses setup.cfg or pyproject.toml files, it is not possible to pin any indirect dependencies.
To pin indirect dependencies, the min_req_constraints environment configuration option should be used.
Spaces in the constraints file path
pip uses spaces as file path separators in the PIP_CONSTRAINT variable.
This plugin stores the generated constraints file in a .tox temporary directory.
As a result, if the path to the temporary directory contains spaces, then pip will not be able to find the constraints file.
In such a scenatio, one needs to set the TOX_MIN_REQ_CONSTRAINTS environment variable
to the path where constraints file can be written.
$ TOX_MIN_REQ_CONSTRAINTS=/tmp MIN_REQ=1 tox -e py310
It is also possible to use the --min-req-constraints-path command line option to set the path to the constraints file.
$ tox --min-req-constraints-path=/tmp -e py310
On Windows, tox cannot pass a path with spaces through the constraints setting either,
so the uv-venv-runner environments described above fail if the constraints file path contains spaces.
Metadata
Release files for tox-min-req 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tox_min_req-0.1.1.tar.gz | 22.9 kB | With provenance | Details for tox_min_req-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tox_min_req-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for tox_min_req-0.1.1-py3-none-any.whl |
Total release size: 33.4 kB
Release files / tox_min_req-0.1.1.tar.gz
| Download URL | tox_min_req-0.1.1.tar.gz |
|---|---|
| Size | 22.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
97f27d8a7c9aa11361d134bd9421740bdab7f2725e0473e2c1b2b199f9a9571e
|
|
BLAKE2b-256 checksum How to use checksums |
f7c69fdcc7ca26a4ec63aed0268806573a624d38917a3e0ec445dbfbc2f740bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logRelease files / tox_min_req-0.1.1-py3-none-any.whl
| Download URL | tox_min_req-0.1.1-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5590e6576e2e91e5645f1c6ecbd1a27c067157bd0d38b9b2d25bc3a15f3b043e
|
|
BLAKE2b-256 checksum How to use checksums |
b9388ab4cf5826d884b45f9dfbda360891496254466ea41de17df26f16a15c94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logSecurity for tox-min-req 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for tox_min_req-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.