Skip to content

Enable HTTP/2 for Python SDK transports for sandbox/main api calls#1310

Open
matthewlouisbrockman wants to merge 3 commits intomainfrom
python-http2
Open

Enable HTTP/2 for Python SDK transports for sandbox/main api calls#1310
matthewlouisbrockman wants to merge 3 commits intomainfrom
python-http2

Conversation

@matthewlouisbrockman
Copy link
Copy Markdown
Contributor

@matthewlouisbrockman matthewlouisbrockman commented May 2, 2026

switches python sdk to use http2 for calls to main api + sandboxes

doesn't add it to volumes yet - need to test those separately

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 2, 2026

🦋 Changeset detected

Latest commit: be50779

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 Minor

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

@matthewlouisbrockman matthewlouisbrockman marked this pull request as ready for review May 2, 2026 05:35
@cursor
Copy link
Copy Markdown

cursor Bot commented May 2, 2026

PR Summary

Medium Risk
Enables HTTP/2 and adjusts proxy/transport wiring in the Python SDK’s core HTTP client, which can affect connection behavior and compatibility with proxies/servers. Adds new HTTP/2 dependencies, so regressions would show up as request failures or subtle networking issues.

Overview
Adds HTTP/2 support for the Python SDK by enabling http2=True on both sync and async httpx transports used for main API/sandbox calls.

Refactors ApiClient construction so proxy is only passed via httpx_args when no explicit transport is provided, avoiding double proxy configuration; new tests assert the client uses the singleton/per-loop transport and does not inject proxy mounts. Dependency updates add h2 (and related lockfile entries) and a changeset bumps @e2b/python-sdk as a minor release.

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 2, 2026

Package Artifacts

Built from 47128fa. Download artifacts from this workflow run.

JS SDK (e2b@2.19.5-python-http2.0):

npm install ./e2b-2.19.5-python-http2.0.tgz

CLI (@e2b/cli@2.10.2-python-http2.0):

npm install ./e2b-cli-2.10.2-python-http2.0.tgz

Python SDK (e2b==2.20.3+python-http2):

pip install ./e2b-2.20.3+python.http2-py3-none-any.whl

Comment thread packages/python-sdk/e2b/api/client_sync/__init__.py
Comment thread packages/python-sdk/e2b/api/client_sync/__init__.py
@matthewlouisbrockman matthewlouisbrockman changed the title Enable HTTP/2 for Python SDK transports Enable HTTP/2 for Python SDK transports for envd calls May 2, 2026
@matthewlouisbrockman matthewlouisbrockman changed the title Enable HTTP/2 for Python SDK transports for envd calls Enable HTTP/2 for Python SDK transports for envd/main api calls May 2, 2026
@matthewlouisbrockman matthewlouisbrockman changed the title Enable HTTP/2 for Python SDK transports for envd/main api calls Enable HTTP/2 for Python SDK transports for sandbox/main api calls May 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant