ADR 0010 Python 3 13 - lukislp/mowdeck GitHub Wiki
ADR 0010: Python 3.13 for all services and libraries
Status
Accepted (2026-10-08). Supersedes the "Python 3.12" constraint of the original plan.
Context
The plan fixed Python 3.12. The spike (docs/spikes/0001-ble-bridge-and-pymammotion.md) showed that PyMammotion, the only library that speaks the mower protocol, requires Python 3.13 or newer since release 0.7.117 (May 2026) and has not supported 3.12 since 0.7.83 (April 2026). The current release 0.10.9 is pinned for MowDeck. Home Assistant, the target of the HACS integration, also runs on Python 3.13 or newer. Every other dependency of the foundation libraries (FastAPI, Pydantic, SQLAlchemy, nats-py, structlog) supports 3.13.
Options considered:
- Move the whole workspace to Python 3.13.
- Stay on 3.12 and isolate the PyMammotion adapter and the Device-Gateway in a separate 3.13 image.
- Pin an old PyMammotion release (0.7.82) that still supports 3.12.
Decision
Option 1: the workspace, every library and every service require Python 3.13 (>=3.13,<3.14). Ruff targets py313, mypy checks against 3.13, .python-version is 3.13, and container images are built from the Python 3.13 base image. uv installs the interpreter on demand (uv python install 3.13).
Consequences
- One Python version across the repository, no split toolchain.
- Option 2 would have meant two interpreters, two lockfile resolutions and two sets of CI jobs for a single dependency.
- Option 3 would have frozen the mower protocol to a release that predates the owner's firmware and gets no fixes.
- Language features up to 3.13 may be used; 3.12-only syntax restrictions no longer apply.
- When PyMammotion raises its floor again, this ADR is revisited; the change is a one-line edit per
pyproject.tomlplus a re-lock.
Mirrored from docs/adr/0010-python-3-13.md at commit 6a87264c6123f07c8474e153053525dc1816feb7. Edit the file in the repository, not this wiki page.