Backend: track the runtime with mypy's python_version (3.14) #89
No reviewers
Labels
No labels
area/ai
area/backend
area/frontend
area/infra
area/scheduler
area/wled
good-first-issue
priority/high
priority/low
priority/medium
type/bug
type/chore
type/ci-cd
type/docs
type/feature
type/qa
v1.0.0
v1.1.0
v1.2.0
v2.0.0
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/Iris-WLED!89
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/mypy-target-tracks-runtime"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #37, which moved the runtime to Python 3.14.
The drift
#37 bumped both Dockerfile stages and all four
setup-pythonreferences (three inci.yml, one inaudit.yml) from 3.12 to 3.14. Butbackend/pyproject.tomlstill had:Renovate does not manage that field, so it drifts silently. mypy was applying 3.12 semantics to code that only ever runs on 3.14 — it would not flag anything the older interpreter couldn't do, and nothing would ever have told us.
Verification
All run locally before pushing:
I also checked the target before changing the config, via
mypy --python-version 3.14, so the bump was known-clean rather than hopeful.What I deliberately did not change
requires-pythonstill reads">=3.12", while CI and the published image only ever exercise 3.14.Now that mypy targets 3.14, it will not catch code that breaks on 3.12 — a latent trap if anyone actually runs 3.12. The two honest resolutions are:
requires-pythonto">=3.14", matching what we actually test and ship; orEither is a scope decision beyond aligning the type-check target, so it is flagged here rather than taken unilaterally. Worth settling before v1.0.0, since
requires-pythonis a published claim about what the package supports.On making this track automatically
The underlying problem is that three places encode the runtime and Renovate only manages two of them. A Renovate
customManagersregex rule could keeppython_versionin step, which would make it track for good rather than needing this PR again at 3.15. I have not added one because a malformedrenovate.jsonbreaks dependency management repo-wide, and I would be guessing at the current schema (fileMatchvsmanagerFilePatternsmoved between Renovate versions). Happy to add it if you want, verified against your Renovate version first.