Skip to content

fix(python): Retry connections on HTTP/2 API transports - #1425

Merged
wj-e2b merged 1 commit into
mainfrom
wj-fix-retries
Jun 12, 2026
Merged

fix(python): Retry connections on HTTP/2 API transports#1425
wj-e2b merged 1 commit into
mainfrom
wj-fix-retries

Conversation

@wj-e2b

@wj-e2b wj-e2b commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@changeset-bot

changeset-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 8ffd738

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

This PR includes changesets to release 1 package
Name Type
@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

@cla-bot cla-bot Bot added the cla-signed label Jun 12, 2026
@cursor

cursor Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

PR Summary

Low Risk
Small networking resilience tweak with no auth or API contract changes; retries only affect connection setup, not HTTP response handling.

Overview
Adds connection-establishment retries on the Python SDK’s shared HTTP/2 transports for both the E2B API and envd clients (sync and async).

A new connection_retries setting is read from E2B_CONNECTION_RETRIES (default 3) in e2b.api and passed as httpx’s retries when constructing TransportWithLogger / AsyncTransportWithLogger and their envd variants. A patch changeset documents the behavior for @e2b/python-sdk.

Reviewed by Cursor Bugbot for commit 8ffd738. Bugbot is set up for automated code reviews on this repo. Configure here.

@wj-e2b
wj-e2b enabled auto-merge (squash) June 12, 2026 00:43

@matthewlouisbrockman matthewlouisbrockman 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.

lgtm

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Package Artifacts

Built from 7301a24. Download artifacts from this workflow run.

JS SDK (e2b@2.29.2-wj-fix-retries.0):

npm install ./e2b-2.29.2-wj-fix-retries.0.tgz

CLI (@e2b/cli@2.11.2-wj-fix-retries.0):

npm install ./e2b-cli-2.11.2-wj-fix-retries.0.tgz

Python SDK (e2b==2.28.2+wj-fix-retries):

pip install ./e2b-2.28.2+wj.fix.retries-py3-none-any.whl

@wj-e2b
wj-e2b disabled auto-merge June 12, 2026 00:45
Pass retries to the httpx HTTP/2 transports used for the E2B API and
envd clients (sync and async) so transient connect failures are
retried. Defaults to 3 and is configurable via the
E2B_CONNECTION_RETRIES environment variable, following the same
pattern as the other connection pool settings. httpx only retries
connection establishment errors, so this is safe for non-idempotent
requests.
@wj-e2b
wj-e2b enabled auto-merge (squash) June 12, 2026 00:47
Copilot stopped work on behalf of jakubno due to an error June 12, 2026 11:09
@wj-e2b
wj-e2b merged commit 1328d9f into main Jun 12, 2026
35 of 38 checks passed
@wj-e2b
wj-e2b deleted the wj-fix-retries branch June 12, 2026 11:17
mishushakov added a commit that referenced this pull request Jun 12, 2026
…ents

Main moved the sync SDK to per-thread RPC/HTTP clients (#1422, #1425).
Rebuild the sandbox health probe on top of that model: sync Commands and
Pty now lazily create a thread-local envd HTTP client (mirroring
Filesystem) and expose _check_health as a method resolving the calling
thread's client, instead of capturing a single shared httpx.Client at
construction time.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.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.

3 participants