Python package maintainers who ship requires-python, Trove classifiers, tox envlists, and GitHub Actions matrices often drift those declarations apart — PyPI says 3.10–3.12 while CI still runs 3.13, or tox drops a minor the classifier still advertises. python-support-window is a small deterministic CLI that expands requires-python, compares it to Programming Language :: Python :: 3.x classifiers (and optionally tox / Actions), and exits 1 on mismatch. Nearest tools (manual checklist reviews, or ad-hoc check-python-versions scripts) do not give you a single path-safe gate for all three surfaces.
# from the repository root
python -m pip install -e ".[dev]"
python-support-window --help
python-support-window fixtures/aligned
python-support-window fixtures/mismatch-classifiers; echo "exit=$?"
python -m pytest -q# from the repository root
python -m pip install -e ".[dev]"
python-support-window --help
python-support-window fixtures\aligned
python-support-window fixtures\mismatch-classifiers; Write-Host "exit=$LASTEXITCODE"
python -m pytest -qAligned fixtures exit 0. Mismatch fixtures exit 1 and print a markdown report of missing/extra minors.
- Parse
pyproject.toml→project.requires-python(Poetrytool.poetry.dependencies.pythonas fallback). - Expand the specifier against known CPython minors
3.8–3.14. - Compare
Programming Language :: Python :: 3.xclassifiers to that window. - Optionally compare
tox.inienvlist/env_list(py310, brace factors,py310-django42). - Optionally compare
.github/workflows/*.{yml,yaml}strategy.matrix.python-version(and concreteactions/setup-pythonpython-versionvalues;${{ }}expressions are ignored).
Tox and CI are skipped when absent unless you pass --require-tox / --require-ci.
python-support-window [root] [--root DIR] [--report FILE] [--quiet]
[--require-tox] [--require-ci] [--help] [--version]
| Exit | Meaning |
|---|---|
| 0 | Windows agree |
| 1 | Mismatch or missing required contract |
| 2 | Runtime / I/O error |
| Fixture | Expected |
|---|---|
fixtures/aligned |
exit 0 — classifiers, tox, and CI match >=3.10,<3.13 |
fixtures/mismatch-classifiers |
exit 1 — classifier missing 3.12 |
fixtures/mismatch-tox |
exit 1 — tox missing 3.12 |
fixtures/mismatch-ci |
exit 1 — CI has 3.13 instead of 3.12 |
- run: python -m pip install python-support-window
- run: python-support-window .Or use this repository’s workflow at .github/workflows/ci.yml as a template.
- Candidate pool is fixed at
3.8–3.14; newer minors need a release bump. - Does not resolve
python-version-file(.python-version/.tool-versions) yet. - Tox brace expansion is intentionally naive (one-level
{a,b}); complex generative envlists may need hand-tuning. - Does not read Nox, Hatch env matrices, or Azure Pipelines.
- Poetry-only projects without PEP 621 classifiers still need classifiers in
[project](or migrate metadata) for the classifier check.
MIT