Skip to content

chore(sdk): deprecate the sandbox git module - #1774

Merged
mishushakov merged 2 commits into
mainfrom
devin/1787827896-deprecate-git-module
Aug 27, 2026
Merged

mishushakov merged 2 commits into
mainfrom
devin/1787827896-deprecate-git-module

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Marks the sandbox git integration as deprecated in both SDKs. Behavior is unchanged — this is annotations only (@deprecated JSDoc in JS, .. deprecated:: docstrings in Python), so IDEs strike through usage and users get a migration hint pointing at the commands module. Removal is planned for the next major.

Closes SDK-366 (https://linear.app/e2b/issue/SDK-366/deprecate-the-sandbox-git-module-in-the-e2b-sdks)

Deprecated surface:

  • JS: Sandbox.git, the Git class, all Git*Opts / GitStatus / GitBranches / GitFileStatus / GitStatusLabel / GitConfigScope / GitResetMode types, and GitAuthError / GitUpstreamError
  • Python: Sandbox.git and AsyncSandbox.git, both Git classes, GitStatus / GitFileStatus / GitBranches / GitResetMode, and GitAuthException / GitUpstreamException

Also drops the "Run git operations" bullet from the JS Sandbox class docs.

Migration:

// before
await sandbox.git.clone('https://github.com/e2b-dev/E2B.git', { path: 'repo' })
// after
await sandbox.commands.run('git clone https://github.com/e2b-dev/E2B.git repo')
# before
sandbox.git.clone("https://github.com/e2b-dev/E2B.git", path="repo")
# after
sandbox.commands.run("git clone https://github.com/e2b-dev/E2B.git repo")

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

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@cla-bot cla-bot Bot added the cla-signed label Aug 27, 2026
@changeset-bot

changeset-bot Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d687a8b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
e2b Patch
@e2b/python-sdk Patch

Not sure what this means? Click here to learn what changesets are.

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

@linear-code

linear-code Bot commented Aug 27, 2026

Copy link
Copy Markdown

SDK-366

@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Package Artifacts

Built from 4cad58a. Download artifacts from this workflow run.

JS SDK ([email protected]):

npm install ./e2b-2.46.1-devin-1787827896-deprecate-git-module.0.tgz

CLI (@e2b/[email protected]):

npm install ./e2b-cli-2.18.1-devin-1787827896-deprecate-git-module.0.tgz

Code Interpreter JS SDK (@e2b/[email protected]):

npm install ./e2b-code-interpreter-2.7.2-devin-1787827896-deprecate-git-module.0.tgz

Desktop JS SDK (@e2b/[email protected]):

npm install ./e2b-desktop-2.3.3-devin-1787827896-deprecate-git-module.0.tgz

Python SDK (e2b==2.46.0+devin.1787827896.deprecate.git.module):

pip install ./e2b-2.46.0+devin.1787827896.deprecate.git.module-py3-none-any.whl

Code Interpreter Python SDK (e2b-code-interpreter==2.9.1+devin.1787827896.deprecate.git.module):

pip install ./e2b_code_interpreter-2.9.1+devin.1787827896.deprecate.git.module-py3-none-any.whl

Desktop Python SDK (e2b-desktop==2.4.3+devin.1787827896.deprecate.git.module):

pip install ./e2b_desktop-2.4.3+devin.1787827896.deprecate.git.module-py3-none-any.whl

@mishushakov
mishushakov marked this pull request as ready for review August 27, 2026 10:53
@mishushakov
mishushakov enabled auto-merge (squash) August 27, 2026 10:53

@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 of the deprecation annotations.

Checked: T-65/T-66/T-67/T-68 (deprecation and compatibility), T-1/T-2 (JS ↔ sync/async Python parity of the deprecated surface), T-69–T-74 (docstrings/JSDoc), T-54 (entry-point exports still intact).

1 violation (one issue, repeated across every Python site).

T-66: Python deprecations must use the :deprecated: docstring field, not the .. deprecated:: Sphinx directive. Same fix applies to the sites I didn't anchor individually: packages/python-sdk/e2b/exceptions.py (GitUpstreamException), packages/python-sdk/e2b/sandbox/_git/types.py (GitFileStatus, GitStatus, GitBranches), packages/python-sdk/e2b/sandbox_sync/git.py, packages/python-sdk/e2b/sandbox_async/git.py, and packages/python-sdk/e2b/sandbox_async/main.py (git property — keep it identical to the sync one for T-1/T-2 parity). The existing SDK convention matches the rule (beta_pause in sandbox_sync/main.py, get_httpx_transport in api/client_sync/__init__.py); note exceptions.py already had one pre-existing .. deprecated:: block, which is what this PR followed.

Everything else looks compliant: JS uses @deprecated with migration path + removal horizon (T-66), nothing is removed from the public surface (T-65), the JS and Python deprecated sets and wording mirror each other (T-1), and no beta-prefix or renaming concerns apply (T-67/T-68).

Not tied to a changed line: dropping the "Run git operations" bullet from the Sandbox class docs removes the only class-level mention of a module that still works for a whole major version — consider keeping the bullet with a "(deprecated)" marker instead, so the strike-through comes from the annotation rather than from missing docs (T-69).

Comment on lines +9 to +11
.. deprecated::
The sandbox git module is deprecated and will be removed in the next major
version. Run git commands with ``sandbox.commands.run()`` instead.

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.

T-66 — Python deprecations are marked with the :deprecated: docstring field, not the .. deprecated:: directive (T-71: reST field style is the Python docstring convention here; cf. beta_pause in sandbox_sync/main.py and get_httpx_transport in api/client_sync/__init__.py).

Suggested change
.. deprecated::
The sandbox git module is deprecated and will be removed in the next major
version. Run git commands with ``sandbox.commands.run()`` instead.
:deprecated: The sandbox git module is deprecated and will be removed in the next
major version. Run git commands with ``sandbox.commands.run()`` instead.

Comment thread packages/python-sdk/e2b/exceptions.py Outdated
Comment on lines +92 to +94
.. deprecated::
The sandbox git module is deprecated and will be removed in the next major
version. Run git commands with ``sandbox.commands.run()`` instead.

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.

T-66 — use the :deprecated: field here too, so the note renders alongside :param:/:return: fields like every other deprecation in the SDK.

Suggested change
.. deprecated::
The sandbox git module is deprecated and will be removed in the next major
version. Run git commands with ``sandbox.commands.run()`` instead.
:deprecated: The sandbox git module is deprecated and will be removed in the next
major version. Run git commands with ``sandbox.commands.run()`` instead.

Comment on lines +96 to +99

.. deprecated::
The sandbox git module is deprecated and will be removed in the next major
version. Run git commands with ``sandbox.commands.run()`` instead.

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.

T-66 — :deprecated: field instead of the directive; matches beta_pause further down this same file. Apply the identical text to the git property in sandbox_async/main.py so the two mirrors stay character-for-character equal (T-1/T-2).

Suggested change
.. deprecated::
The sandbox git module is deprecated and will be removed in the next major
version. Run git commands with ``sandbox.commands.run()`` instead.
:deprecated: The sandbox git module is deprecated and will be removed in the
next major version. Run git commands with ``sandbox.commands.run()`` instead.

@mishushakov
mishushakov disabled auto-merge August 27, 2026 10:55
@mishushakov

Copy link
Copy Markdown
Member

please fix the format

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4b786da139

ℹ️ 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".

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

please fix the format

Reformatted in d687a8b: the deprecation notes are now single-line, matching the existing style — @deprecated Run git with \sandbox.commands.run()` instead. The git module will be removed in the next major version.in JS, and the same text as a:deprecated:field in Python (instead of the wrapped.. deprecated::` block). Let me know if you meant a different format.

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

{"findings":[]}

Open in Web View Automation 

Sent by Cursor Security Agent: Security Reviewer

@mishushakov
mishushakov enabled auto-merge (squash) August 27, 2026 11:08
@mishushakov
mishushakov merged commit d4a7f41 into main Aug 27, 2026
90 of 100 checks passed
@mishushakov
mishushakov deleted the devin/1787827896-deprecate-git-module branch August 27, 2026 11:16
mishushakov added a commit that referenced this pull request Nov 25, 2026
## Summary

#1774 deprecated `Sandbox.git`, the `Git` class and its types, but not
the individual methods. This adds the same deprecation notice to all 19
public `Git` methods (`clone`, `init`, `remoteAdd`, `remoteGet`,
`status`, `branches`, `createBranch`, `checkoutBranch`, `deleteBranch`,
`add`, `commit`, `reset`, `restore`, `push`, `pull`, `setConfig`,
`getConfig`, `dangerouslyAuthenticate`, `configureUser`, and their
snake_case Python equivalents):

- JS: `@deprecated` JSDoc
- Python sync + async: `:deprecated:` docstring line (same convention as
the rest of the SDK)

Annotations only, no behavior change; `patch` changeset.

Migration:

```ts
// before
await sandbox.git.clone('https://github.com/e2b-dev/E2B', { path: '/home/user/E2B' })
// after
await sandbox.commands.run('git clone https://github.com/e2b-dev/E2B /home/user/E2B')
```


Link to Devin session:
https://app.devin.ai/sessions/c1ed439c560c461db1fbaa3669a2c2d7
Open in Devin Desktop:
https://app.devin.ai/desktop/session/c1ed439c560c461db1fbaa3669a2c2d7?variant=devin
Requested by: @mishushakov
<!-- devin-review-badge-begin -->

---

🟢 Devin Review found nothing to fix · [View
findings](https://app.devin.ai/review/e2b-dev/e2b/pull/2177)

<a href="https://app.devin.ai/review/e2b-dev/e2b/pull/2177"
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>
Co-authored-by: [email protected] <[email protected]>
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