Skip to content

chore: sync the e2b floor of the Python Code Interpreter and Desktop SDKs on version - #1926

Merged
mishushakov merged 2 commits into
mainfrom
devin/1790862253-sync-python-e2b-floor
Oct 5, 2026
Merged

mishushakov merged 2 commits into
mainfrom
devin/1790862253-sync-python-e2b-floor

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Python Code Interpreter and Desktop SDKs already resolve e2b from the workspace ([tool.uv.sources] e2b = { workspace = true }). That only affects local dev and CI: uv build drops tool.uv.sources and publishes the e2b>=X,<3.0.0 range from [project].dependencies exactly as written. So the floor had to be bumped by hand and drifted: Desktop still says >=2.44.0 while CI only ever tests it against the current SDK (2.52.0).

This change makes postVersion (run by pnpm run version after changeset version) also set the range to e2b>=<sdk version>,<<sdk major + 1>.0.0. That mirrors what pnpm's workspace:^ does for the JS SDKs:

 "postVersion": "uv version --frozen <own version>
+  && uv add --frozen \"$(node -p \"const v = require('../python-sdk/package.json').version; 'e2b>=' + v + ',<' + (Number(v.split('.')[0]) + 1) + '.0.0'\")\""
  • It reads python-sdk's package.json, not pyproject.toml: changesets writes package.json before any postVersion runs, while python-sdk's own postVersion (which updates pyproject.toml) may run at the same time under pnpm run -r.
  • The upper bound comes from the SDK's major version, so a 3.0.0 SDK release gives e2b>=3.0.0,<4.0.0 instead of an impossible range.
  • --frozen leaves [tool.uv.sources] untouched; the existing pnpm run -r lock step refreshes uv.lock afterwards.
  • The range is rewritten even when a package isn't being released. That's harmless: the new range ships with the package's next release. The first release after this raises Desktop's floor to the current SDK version.

I ran pnpm run postVersion on a copy of both packages. Desktop's floor went 2.44.0 → 2.52.0, Code Interpreter's stayed the same (already 2.52.0), and uv lock --check passed for both. With the SDK version set to 3.0.0, the expression gives e2b>=3.0.0,<4.0.0.

Link to Devin session: https://app.devin.ai/sessions/cc34bb02be3a42679a5eab9529034b76
Open in Devin Desktop: https://app.devin.ai/desktop/session/cc34bb02be3a42679a5eab9529034b76?variant=devin
Requested by: @mishushakov

…SDKs on version

Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@cla-bot cla-bot Bot added the cla-signed label Oct 1, 2026
@changeset-bot

changeset-bot Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a32acec

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TASTE.md review: complies — 0 violations. The PR only changes the postVersion release scripts in packages/code-interpreter-python/package.json and packages/desktop-python/package.json (no public SDK API surface); checked against T-43 (shell-string escaping), T-54/T-56 (package structure / no hardcoded SDK version), and the API-shape, parity, error, and docs rules, none of which this tooling-only change touches.

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Package Artifacts

Built from 975cbc3. Download artifacts from this workflow run.

JS SDK (e2b@2.52.1-devin-1790862253-sync-python-e2b-floor.0):

npm install ./e2b-2.52.1-devin-1790862253-sync-python-e2b-floor.0.tgz

CLI (@e2b/cli@2.21.1-devin-1790862253-sync-python-e2b-floor.0):

npm install ./e2b-cli-2.21.1-devin-1790862253-sync-python-e2b-floor.0.tgz

Code Interpreter JS SDK (@e2b/code-interpreter@2.8.1-devin-1790862253-sync-python-e2b-floor.0):

npm install ./e2b-code-interpreter-2.8.1-devin-1790862253-sync-python-e2b-floor.0.tgz

Desktop JS SDK (@e2b/desktop@2.4.1-devin-1790862253-sync-python-e2b-floor.0):

npm install ./e2b-desktop-2.4.1-devin-1790862253-sync-python-e2b-floor.0.tgz

Python SDK (e2b==2.52.0+devin.1790862253.sync.python.e2b.floor):

pip install ./e2b-2.52.0+devin.1790862253.sync.python.e2b.floor-py3-none-any.whl

Code Interpreter Python SDK (e2b-code-interpreter==2.10.1+devin.1790862253.sync.python.e2b.floor):

pip install ./e2b_code_interpreter-2.10.1+devin.1790862253.sync.python.e2b.floor-py3-none-any.whl

Desktop Python SDK (e2b-desktop==2.6.0+devin.1790862253.sync.python.e2b.floor):

pip install ./e2b_desktop-2.6.0+devin.1790862253.sync.python.e2b.floor-py3-none-any.whl

@mishushakov
mishushakov marked this pull request as ready for review October 1, 2026 15:21
@mishushakov
mishushakov self-requested a review as a code owner October 1, 2026 15:21
devin-ai-integration[bot]

This comment was marked as resolved.

@mishushakov

Copy link
Copy Markdown
Member

check review

Co-Authored-By: mish@e2b.dev <mish@e2b.dev>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, straightforward config change. Both edits are identical and mechanical: appending a uv add --frozen "e2b>=<python-sdk version>,<3.0.0" call to the existing postVersion script in the two Python-SDK-dependent packages, keeping the published dependency floor in sync with the sibling python-sdk version.

What was reviewed: the two package.json diffs line-by-line (confirmed only the postVersion script changed, identical pattern applied to both files); the version-read mechanism (reads python-sdk's package.json, not pyproject.toml, avoiding a race with python-sdk's own postVersion); the hardcoded <3.0.0 ceiling and its interaction with a pending desktop-python patch changeset — both are edge cases outside this diff's scope, not introduced bugs.

Extended reasoning...

The diff touches only the postVersion npm script in two package.json files (code-interpreter-python, desktop-python), adding a uv add --frozen call to sync the e2b dependency floor with python-sdk's version; no security-sensitive surface (auth, crypto, permissions) is touched. The change is small, symmetric across both affected packages (matching repo convention of keeping parallel Python packages in sync), and the bug hunt reported zero findings. The three ruled-out candidate issues (hardcoded <3.0.0 ceiling, interaction with a pending patch changeset, and network-call fragility in postVersion) are edge cases that don't represent correctness bugs in this diff and were adequately reasoned through by the PR author's own testing description.

This review covers commit b2416d0, which is no longer the latest commit on this pull request; later commits are not covered by it.

@mishushakov
mishushakov enabled auto-merge (squash) October 5, 2026 13:41
@mishushakov
mishushakov merged commit d058b4c into main Oct 5, 2026
30 checks passed
@mishushakov
mishushakov deleted the devin/1790862253-sync-python-e2b-floor branch October 5, 2026 13:43
devin-ai-integration Bot added a commit that referenced this pull request Oct 6, 2026
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
mishushakov pushed a commit that referenced this pull request Oct 6, 2026
…#1926), unblocking the release (#1951)

## Summary

Fixes the failed release run [Publish / Build and test
SDK](https://github.com/e2b-dev/E2B/actions/runs/37520925792/job/112468741075)
on `main` (1de92fc). Reverts #1926.

```
packages/desktop-python postVersion: e2b-desktop 2.6.1 => 2.6.1
...
packages/desktop-python postPublish: error: Local file and index file do not match for e2b_desktop-2.6.1-py3-none-any.whl. Local: sha256=6b05209c…, Remote: sha256=cf1cfd6d…
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @e2b/desktop-python@2.6.1 postPublish: `uv build && uv publish --trusted-publishing always --check-url https://pypi.org/simple/`
```

**Root cause:** #1926 made `postVersion` rewrite `e2b>=<sdk version>` in
`pyproject.toml` on **every** release, even when the package itself is
not released. This release only bumped python-sdk, so Desktop's floor
went from `e2b>=2.44.0` to `e2b>=2.53.0` while its version stayed at
`2.6.1`. `pnpm run -r postPublish` rebuilds every Python package, and
`uv publish --check-url` only skips files that are byte-identical to
what's already on PyPI. The rebuilt `e2b_desktop-2.6.1` had different
METADATA, so uv rejected it, and the whole publish aborted. Nothing was
uploaded: PyPI still has `e2b` 2.52.1 and `e2b-code-interpreter` 2.10.1,
and `changeset publish` (npm) never ran.

**Changes:**
- `postVersion` in `code-interpreter-python` / `desktop-python` goes
back to `uv version --frozen <own version>` (a revert of #1926).
- Restores `e2b>=2.44.0,<3.0.0` in
`packages/desktop-python/pyproject.toml`. The release commit 2438c92 had
written `e2b>=2.53.0` there, and 2.6.1 on PyPI declares `>=2.44.0`.
Without this, the next release would fail the same way.
- `code-interpreter-python` keeps the `e2b>=2.53.0` that 2438c92 wrote.
It came with that package's own version bump (2.10.2, not yet
published), so there's no mismatch.

## Verification
- `uv build` (uv 0.10.0, the CI version) of `desktop-python` with the
restored floor gives the same sha256 as both files on PyPI (wheel
`cf1cfd6d…`, sdist `dc715a77…`). So `--check-url` will skip them again.

## Follow-up
- The 2.53.0 / 2.10.2 versions are committed on `main` but were never
published to npm or PyPI. The next release with a changeset bumps the
versions past them (the workflow keeps failed versions on purpose).
- After this revert, Desktop's `e2b` floor has to be bumped by hand
again.

Link to Devin session:
https://app.devin.ai/sessions/328bb32ba7344529858415273d98c0ec
Open in Devin Desktop:
https://app.devin.ai/desktop/session/328bb32ba7344529858415273d98c0ec?variant=devin
<!-- devin-review-badge-begin -->

---

<a href="https://app.devin.ai/review/e2b-dev/e2b/pull/1951"
target="_blank"><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img
src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4"
alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant