chore(python-sdk): migrate from Poetry to uv#1513
Conversation
Switch the Python SDK's packaging and CI tooling from Poetry to uv: convert pyproject.toml to PEP 621 metadata with the native uv_build backend, replace poetry.lock with uv.lock, and update the Makefile, package.json scripts, .tool-versions, and all GitHub workflows to use uv. Also drop the redundant sync steps (uv run auto-syncs) and the orphaned pydoc-markdown dev dependency. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
PR SummaryMedium Risk Overview
CI and local scripts swap
Reviewed by Cursor Bugbot for commit 6bf4589. Bugbot is set up for automated code reviews on this repo. Configure here. |
Package ArtifactsBuilt from f521dfa. Download artifacts from this workflow run. JS SDK ( npm install ./e2b-2.31.1-mishushakov-python-poetry-to-uv.0.tgzCLI ( npm install ./e2b-cli-2.13.1-mishushakov-python-poetry-to-uv.0.tgzPython SDK ( pip install ./e2b-2.30.0+mishushakov.python.poetry.to.uv-py3-none-any.whl |
The init target pip-installed codegen tools, but it was unreferenced, inconsistent with codegen.Dockerfile (which uses the patched e2b-openapi-python-client fork), and datamodel-code-generator is now a dev dependency installed by `uv sync`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: db7fecb3d5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f8f9ac1. Configure here.
uv appends the package name to --check-url, so the project page (.../simple/e2b/) gave the wrong prefix for duplicate-file detection. Use the simple index root (.../simple/) so skip-existing works on publish and RC workflows. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bare `uv sync` silently re-resolves and rewrites uv.lock when pyproject.toml drifts, unlike Poetry's non-mutating install. --locked mirrors `pnpm install --frozen-lockfile` so CI fails with the real cause instead of the misleading lint formatting error. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
uv provisions and pins the interpreter through setup-uv's python-version input (fed from .tool-versions), so all uv commands use it. No workflow invokes python directly, so the separate setup-python step is redundant. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Local code generation needs pyyaml (for remove_extra_tags.py) and the patched e2b-openapi-python-client, which were only ever available inside the codegen Docker image. Add a pinned `codegen` dependency group (mirroring codegen.Dockerfile) and restore `make init` as `uv sync --group codegen` so `uv run make generate-api` works locally. datamodel-code-generator moves from dev into codegen since it is only a generation tool. generate-envd still needs Docker (Go/buf). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Migrates the Python SDK's packaging and CI from Poetry to uv:
pyproject.tomlis converted to PEP 621 metadata using uv's nativeuv_buildbackend (verified to produce a byte-equivalent wheel containing bothe2bande2b_connect),poetry.lockis replaced withuv.lock, and theMakefile,package.jsonscripts,.tool-versions,CLAUDE.md, and all six GitHub workflows now useuv(astral-sh/setup-uv+uv sync/build/version/publish). It also drops the now-redundant explicit sync steps (sinceuv runauto-syncs) and removes the orphanedpydoc-markdowndev dependency, whose only consumer was deleted long ago — trimming 58 packages from the dev lockfile.Usage
No user-facing SDK change — packaging/tooling only — so no changeset is included; the published package contents are unchanged.