fix(toolchain): raise requires-python floor to 3.13 so the resolver matches the runtime

RoboCo's code imports tomllib (3.11+) and the stack runs on 3.13, but requires-python declared >=3.10. The toolchain resolver picks the lowest satisfying version, so it provisioned agent workspaces of the self-hosted roboco-api project at Python 3.10 — an interpreter the suite cannot even be collected under, leaving the workspace .venv unusable and the gate running in an ad-hoc fallback env. Raising the floor to >=3.13 makes resolve_target_python return 3.13, matching the agent image. Re-locks to drop the now-unreachable 3.10-3.12 backports; a guard test pins the repo's own resolution to 3.13.
This commit is contained in:
Renn F
2026-06-22 13:02:59 +02:00
parent a9b28ad402
commit c49dcebae4
3 changed files with 42 additions and 1133 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ authors = [
]
readme = "README.md"
license = { text = "AGPL-3.0-or-later" }
requires-python = ">=3.10,<3.15"
requires-python = ">=3.13,<3.15"
dependencies = [
# Core
+19 -4
View File
@@ -10,13 +10,10 @@ can pass it to uv explicitly.
from __future__ import annotations
from typing import TYPE_CHECKING
from pathlib import Path
from roboco.services.toolchain import ResolvedPython, resolve_target_python, satisfies
if TYPE_CHECKING:
from pathlib import Path
def _write(root: Path, *, pyproject: str | None = None, pin: str | None = None) -> None:
if pyproject is not None:
@@ -101,3 +98,21 @@ def test_satisfies_helper() -> None:
assert satisfies("3.14", ">=3.14,<3.15") is True
assert satisfies("3.13", ">=3.14,<3.15") is False
assert satisfies("3.12", "") is True
def test_roboco_repo_floor_resolves_to_its_real_python() -> None:
"""RoboCo's own ``requires-python`` must resolve to 3.13, not lower.
Its code imports ``tomllib`` (3.11+) and the stack runs on 3.13; a
permissive floor like ``>=3.10`` made the resolver provision agent
workspaces at 3.10, where the suite cannot even be collected. This guards
the floor against silently regressing below the real requirement.
"""
root = Path(__file__).resolve()
while not (root / "pyproject.toml").is_file():
if root.parent == root:
raise AssertionError("repo root with pyproject.toml not found")
root = root.parent
resolved = resolve_target_python(root)
assert resolved is not None
assert resolved.version == "3.13"
Generated
+22 -1128
View File
File diff suppressed because it is too large Load Diff