Skip to content

Commit a125224

Browse files
Roger-luoclaude
andcommitted
fix(website): pin UV_PYTHON=3.13 for the Amplify build
The build phase died in resolve_sources.py with `ModuleNotFoundError: No module named 'tomllib'`. tomllib is stdlib only in Python 3.11+, but the repo declares requires-python ">=3.10" with no version pin, so uv on Amplify's Amazon Linux created the venv with a <=3.10 interpreter. (Locally and on GH Actions uv happens to pick 3.13.) Set UV_PYTHON=3.13 so uv fetches/uses 3.13 for both the root env and the notebook emitter project (both declare >=3.10 and resolve to 3.13 locally), giving resolve_sources.py + gen_compat_matrix.py their tomllib. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 2dc932f commit a125224

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

amplify.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ env:
2323
NODE_VERSION: "24"
2424
PNPM_VERSION: "11"
2525
UV_VERSION: "0.5.1"
26+
# Pin the Python uv uses. The repo declares requires-python ">=3.10", but the
27+
# docs tooling (resolve_sources.py, gen_compat_matrix.py) hard-imports
28+
# `tomllib`, which is stdlib only in 3.11+. Amplify's Amazon Linux gave uv a
29+
# <=3.10 interpreter (ModuleNotFoundError: No module named 'tomllib'); this
30+
# forces uv to fetch/use 3.13 for both the root env and the notebook emitter
31+
# project (both resolve to 3.13 locally). Applies to `uv sync` and `uv run`.
32+
UV_PYTHON: "3.13"
2633
RUST_TOOLCHAIN: "nightly-2026-04-17" # rustdoc JSON format_version 57
2734
# Served at the domain root on Amplify — no subpath. Override SITE_URL
2835
# per-branch in the Amplify console if you want correct canonical/sitemap

0 commit comments

Comments
 (0)