Skip to content

test: pin that mypy's python_version matches requires-python, so the floor and the checker cannot drift #316

Description

@eaitbrahim

Since #301, the Python floor lives in two places that can drift apart: requires-python = ">=3.11" in six pyproject.tomls, and [tool.mypy] python_version = "3.11" in the root. Nothing fails a build where they disagree — mypy would happily check against 3.14 semantics while the floor claims 3.11, or vice versa, and the first victim is a contributor on the floor version.

File to touch: tests/test_python_floor.py.

Done looks like: a test that parses the root pyproject.toml, derives the minor version from requires-python (e.g. >=3.113.11), and asserts [tool.mypy].python_version equals it — with a docstring, in that file's established style, saying why they must agree (mypy must check what the floor promises).

How to verify: write the test first and watch it pass; then temporarily change python_version to "3.14" and watch it fail with a message that says what drifted and how to fix it. Restore.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions