Skip to content

Commit dca8303

Browse files
lesnik512claude
andauthored
ci: run fastmcp on the 3.14t free-threaded leg (#155)
Now that the opentelemetry api/sdk split (#154) lets lite-bootstrap[fastmcp] import in an api-only environment, fastmcp/fastmcp-metrics install and smoke-pass on 3.14t. Add them to the 3.14t leg's extras; 3.13t stays excluded (cffi gates free-threading to 3.14+). Verified locally on a real 3.14t interpreter. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 763008e commit dca8303

3 files changed

Lines changed: 19 additions & 32 deletions

File tree

.github/workflows/_checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
- python-version: "3.13t"
5757
extras: "logging,sentry,fastapi,faststream,fastapi-metrics,faststream-metrics"
5858
- python-version: "3.14t"
59-
extras: "logging,sentry,fastapi,litestar,faststream,fastapi-metrics,litestar-metrics,faststream-metrics"
59+
extras: "logging,sentry,fastapi,litestar,faststream,fastmcp,fastapi-metrics,litestar-metrics,faststream-metrics,fastmcp-metrics"
6060
steps:
6161
- uses: actions/checkout@v6
6262
- uses: astral-sh/setup-uv@v8.2.0
@@ -65,7 +65,7 @@ jobs:
6565
cache-dependency-glob: "**/pyproject.toml"
6666
- run: uv python install ${{ matrix.python-version }}
6767
- run: uv venv --python ${{ matrix.python-version }}
68-
- name: Install core + ft-ready extras (orjson/otl/pyroscope/fastmcp excluded)
68+
- name: Install core + ft-ready extras (orjson/otl/pyroscope excluded; litestar/fastmcp 3.14t-only)
6969
run: uv pip install ".[${{ matrix.extras }}]"
7070
- name: Free-threaded smoke test
7171
run: .venv/bin/python scripts/ft_smoke.py

architecture/free-threading.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,17 @@ its extra, not `lite-bootstrap` itself.
1212
| core, `logging`, `sentry` ||| pure Python; `logging` uses the stdlib-json serializer fallback when `orjson` is absent |
1313
| `fastapi`/`faststream` (+ `-sentry`/`-logging`/`-metrics`) ||| pure Python + `pydantic-core` ft wheels |
1414
| `litestar` (+ `litestar-metrics`) ||| `msgspec` gates `Py_GIL_DISABLED` to Python 3.14+ — its `_core.c` contains `#error "Py_GIL_DISABLED is only supported in Python 3.14+"` (v0.21.1), so the source build fails on 3.13t. See [`planning/deferred.md`](../planning/deferred.md) |
15-
| `fastmcp` (+ `fastmcp-metrics`) || | 3.13t: `cffi` (via `fastmcp``cryptography`) refuses to build free-threaded. 3.14t: `fastmcp` pulls bare `opentelemetry-api` without `opentelemetry-sdk`, so `import lite_bootstrap` still fails. See [`planning/deferred.md`](../planning/deferred.md) |
15+
| `fastmcp` (+ `fastmcp-metrics`) || | 3.13t: `cffi` (via `fastmcp``cryptography`) refuses to build free-threaded. 3.14t: works (on the leg) since the opentelemetry api/sdk split. See [`planning/deferred.md`](../planning/deferred.md) |
1616
| `orjson` (opt-in speedup) ||| no ft wheels, build refuses ft ([ijl/orjson#530](https://github.com/ijl/orjson/issues/530)). Omit it on ft; the serializer falls back to stdlib json |
1717
| `otl` (gRPC exporter) ||| needs `grpcio`, no ft wheels ([grpc/grpc#38762](https://github.com/grpc/grpc/issues/38762)). An HTTP-exporter path is deferred (`planning/deferred.md`) |
1818
| `pyroscope` ||| `pyroscope-io` is abi3-only, unmaintained, no ft wheels ([`planning/deferred.md`](../planning/deferred.md)) |
1919

2020
The CI matrix (`.github/workflows/_checks.yml`, `free-threaded` job) installs
2121
per Python version to match this table exactly: the 3.13t leg's extras stop at
2222
`logging,sentry,fastapi,faststream,fastapi-metrics,faststream-metrics`; the
23-
3.14t leg adds `litestar,litestar-metrics`. `orjson`, `otl`, `pyroscope`, and
24-
`fastmcp`/`fastmcp-metrics` are excluded from both legs.
23+
3.14t leg adds `litestar,litestar-metrics,fastmcp,fastmcp-metrics`. `orjson`,
24+
`otl`, and `pyroscope` are excluded from both legs; `fastmcp` runs on 3.14t only
25+
(3.13t is `cffi`-blocked).
2526

2627
## The `orjson` fallback
2728

planning/deferred.md

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -28,33 +28,19 @@ this repo.
2828
**Trigger:** `pyroscope-io` ships ft wheels (or a maintained ft-capable
2929
replacement appears).
3030

31-
### fastmcp on free-threaded Python
32-
33-
`fastmcp` and `fastmcp-metrics` are excluded from both ft CI legs
34-
(`.github/workflows/_checks.yml`) and from `scripts/ft_smoke.py`'s local
35-
verification commands, for two separate, independent reasons — one per leg:
36-
37-
- **3.13t (install-time, upstream, not fixable here):** `fastmcp`
38-
`fastmcp-slim[server]``joserfc``cryptography``cffi`, and `cffi`
39-
(v2.1.0) refuses to build on free-threaded 3.13: "CFFI does not support the
40-
free-threaded build of CPython 3.13. Upgrade to free-threaded 3.14 or newer
41-
to use CFFI with the free-threaded build." — an upstream gate, not a
42-
build-environment problem, the same shape as msgspec's 3.13t gate below.
43-
Reproduced 2026-07-18: `uv pip install --python <3.13t venv> ".[fastmcp]"`
44-
fails building `cffi`.
45-
- **3.14t (now importable):** `fastmcp` transitively pulls bare
46-
`opentelemetry-api` with no other `opentelemetry-*` package. The three
47-
incomplete-opentelemetry-stack bugs this exposed are all fixed — the
48-
`import_checker` namespace crash and the unconditional grpc-exporter import in
49-
`changes/2026-07-18.01`, and the api-vs-sdk conflation
50-
(`opentelemetry_instrument.py` importing `opentelemetry.sdk.*` and
51-
`check_dependencies()` under the api-only flag) in `changes/2026-07-19.01`. So
52-
`uv pip install ".[fastmcp]"` + `import lite_bootstrap` now succeeds on 3.14t;
53-
it is simply not yet wired into the 3.14t leg's extras.
54-
55-
**Trigger:** `cffi` ships free-threaded 3.13 wheels (unblocks 3.13t), **or** add
56-
`fastmcp`/`fastmcp-metrics` to the 3.14t leg's extras in `_checks.yml` (import
57-
now works there).
31+
### fastmcp on free-threaded Python 3.13 (cffi gates Py_GIL_DISABLED to 3.14+)
32+
33+
`fastmcp`/`fastmcp-metrics` run on the **3.14t** ft CI leg
34+
(`.github/workflows/_checks.yml`) but are excluded from **3.13t**: `fastmcp`
35+
`fastmcp-slim[server]``joserfc``cryptography``cffi`, and `cffi` (v2.1.0)
36+
refuses to build on free-threaded 3.13 ("CFFI does not support the free-threaded
37+
build of CPython 3.13. Upgrade to free-threaded 3.14 or newer to use CFFI with
38+
the free-threaded build.") — an upstream gate, the same shape as msgspec's 3.13t
39+
gate below. Reproduced 2026-07-18: `uv pip install --python <3.13t venv>
40+
".[fastmcp]"` fails building `cffi`. (The three opentelemetry-stack import bugs
41+
that previously also blocked 3.14t are fixed in `changes/2026-07-18.01` and
42+
`changes/2026-07-19.01`.)
43+
**Trigger:** `cffi` ships free-threaded 3.13 wheels.
5844

5945
### litestar on free-threaded Python 3.13 (msgspec gates Py_GIL_DISABLED to 3.14+)
6046

0 commit comments

Comments
 (0)