Change is complete (19/19 tasks) and its delta spec has been synced into a new main spec openspec/specs/python-runtime-baseline/spec.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3.7 KiB
3.7 KiB
1. Update Python version pins
- 1.1 Update
requires-pythonin rootpyproject.tomlfrom>=3.14to>=3.13,<3.14 - 1.2 Update
requires-pythoninapps/device-host-agent/pyproject.tomlto>=3.13,<3.14 - 1.3 Update
requires-pythoninapps/cloud-api/pyproject.tomlto>=3.13,<3.14 - 1.4 Update
requires-pythoninpackages/cloud-platform/pyproject.tomlto>=3.13,<3.14
2. Update container/CI base images
- 2.1 Update
Dockerfile:26base image fromastral-sh/uv:python3.14-bookworm-slimtoastral-sh/uv:python3.13-bookworm-slim - 2.2 Update
Jenkinsfile:58image reference fromastral-sh/uv:python3.14-bookworm-slimtoastral-sh/uv:python3.13-bookworm-slim - 2.3 Grep the repo for any other
python3.14/3.14references tied to the toolchain (excluding this change's ownopenspec/changes/artifacts and historicalopenspec/changes/archive/records) and update or confirm each is out of scope
3. Regenerate the lockfile and provision the environment
- 3.1
uv python install 3.13 - 3.2
uv lockto regenerateuv.lockagainst Python 3.13; confirm the resolution completes without conflict errors - 3.3
uv sync --locked --all-packagesto provision a fresh.venv; confirm it uses the 3.13 interpreter (uv run --package device-agent-runtime python --version) - 3.4 Confirm
paddlepaddleis now installable against the regenerated lock/environment (uv pip install paddlepaddlesucceeds andpython -c "import paddle"works) — manual, not added topyproject.toml/uv.lock, per design.md Non-Goals
4. Verify no Python-3.14-only usage breaks under 3.13
- 4.1 Run the full non-integration suite against the 3.13 environment:
uv run --all-packages pytest -m "not integration"; fix any failures caused by the interpreter downgrade (none expected per design.md D4) — 543 passed. Note: collection was initially blocked by pre-existing Python-2-styleexcept X, Y:syntax errors (7 occurrences acrossruntime/task.py,packages/cloud-platform/cloud/sql_repository.py,packages/cloud-platform/cloud/internal_api/api.py), introduced by commit22d37ca9(2026-07-13) unrelated to this change's scope. Fixed as a drive-by (parenthesized the tuples) per user direction, since they blocked verification on any Python version. - 4.2 Run
uv run --all-packages python -m compileall .(or equivalent) across the workspace to catch any syntax-level incompatibility beyond what pytest collection would exercise — clean, no errors (scoped to project source dirs, excluding.venv) - 4.3 Ruff check/format on any files touched by this change —
uvx ruff checkall checks passed;uvx ruff format --check3 files already formatted (ruff isn't a project dependency, run ephemerally viauvx)
5. Update documentation
- 5.1 Update
docs/MACOS_IPHONE_SETUP.md§4.2 to reflect the Python 3.13 baseline and remove/replace the now-obsolete "do not downgrade to 3.13 ad hoc" warning (lines ~156-158) with guidance that 3.13 is now the supported version - 5.2 Sweep
docs/MACOS_IPHONE_SETUP.mdand any other docs for stray3.14references introduced when the project originally targeted 3.14, and correct them to3.13— only remaining3.14mentions are the intentional upper-bound pin and the paddlepaddle-wheel-availability explanation
6. Final validation
- 6.1
git diff --check(no whitespace errors) across all changed files — clean - 6.2
openspec validate downgrade-python-3-13-paddleocr --strict— valid - 6.3 Confirm all four
pyproject.tomlfiles andDockerfile/Jenkinsfileagree on the same Python version, anduv.lockis committed alongside them — all agree on 3.13