fix(packaging): support Python 3.14 builds - #33120
fix(packaging): support Python 3.14 builds#33120devin-ai-integration[bot] wants to merge 3 commits into
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
|
|
Greptile SummaryThis PR upgrades
Confidence Score: 5/5Safe to merge — all three changed Rust call sites correctly adopt the pyo3 0.29 API, the packaging metadata is consistent, and the new CI steps verify both the wheel build and the previously uncovered python-config feature path. The pyo3 API migration is mechanically straightforward and all three call sites (lib.rs, config.rs, gil.rs) are updated correctly. The pyproject.toml upper bound (<3.15) is consistent with the newly added 3.14 classifier. The CI additions give direct evidence the wheel builds successfully on 3.14, and the --features python-config clippy step closes the gap for the Dockerfile path. The one lingering item — a stale Python::allow_threads reference in the module-level doc comment of gil.rs — was flagged in a prior review and is cosmetic. No files require special attention; litellm-rust/crates/python-bridge/src/gil.rs has an outstanding stale doc-comment nit from a prior review cycle that is still unaddressed.
|
| Filename | Overview |
|---|---|
| .github/workflows/test-rust.yml | Adds Python 3.14 + uv setup steps, a separate clippy run for the python-config feature, and a wheel build step; CI path triggers also extended to cover pyproject.toml and uv.lock changes. |
| litellm-rust/Cargo.toml | Bumps pyo3 and pyo3-async-runtimes from 0.23 to 0.29.0, the minimum version required for Python 3.14 support. |
| litellm-rust/crates/python-bridge/src/gil.rs | Migrates py.allow_threads to py.detach (pyo3 0.29 API); the module-level doc comment on line 4 still references the old Python::allow_threads name (flagged in prior review). |
| litellm-rust/crates/python-bridge/src/lib.rs | Migrates Python::with_gil to Python::attach in the aocr async helper; usage is correct and consistent with pyo3 0.29. |
| litellm-rust/crates/ai-gateway/src/python/config.rs | Migrates Python::with_gil to Python::attach in the boot-time config loader; record_acquisition is called correctly before attach, matching the Dockerfile python-config path. |
| pyproject.toml | Adds Python 3.14 classifier and tightens requires-python to >=3.10, <3.15, correctly bounding the newly supported version range. |
| scripts/install.sh | Comment updated to reference 3.15+ instead of the old upper bound; no logic change. |
| scripts/install-cli.sh | Comment updated to reference 3.15+ instead of the old upper bound; no logic change. |
Reviews (2): Last reviewed commit: "fix(rust): migrate python-config GIL cal..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Fixed: migrated the |
Relevant issues
Fixes #33116
Linear ticket
Pre-Submission checklist
@greptileaito re-request a review after pushing changes)Delays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review)
Screenshots / Proof of Fix
Before at
f448ea5762:After at
8cf53d446f:The
python-configfeature path (used by the Dockerfile with--features python-config) also compiles clean under 0.29:Type
Bug Fix
Test
Changes
Upgrades
pyo3andpyo3-async-runtimesfrom 0.23 to the aligned 0.29 series, with the correspondingallow_threadstodetachandwith_giltoattachAPI migrations. This covers bothpython-bridgeand thepython-configfeature path inai-gateway/src/python/config.rs, which the standard CI clippy step did not previously exerciseExtends package metadata and the uv lock to Python 3.14, updates installer compatibility text, and adds CI that builds a CPython 3.14 wheel plus a clippy run over the
python-configfeature so the Dockerfile build path stays coveredFinal Attestation
Link to Devin session: https://app.devin.ai/sessions/9c98d988360a42cd85a1f606b4a75844