-
Notifications
You must be signed in to change notification settings - Fork 980
feat(python-sdk): move the envd HTTP API client onto pyqwest #1623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
mishushakov
wants to merge
2
commits into
migrate-template-uploads-to-pyqwest
from
migrate-envd-api-to-pyqwest
+662
−623
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| --- | ||
| "@e2b/python-sdk": minor | ||
| --- | ||
|
|
||
| Move the envd HTTP API client (sandbox file transfers, health checks) onto | ||
| [`pyqwest`](https://pypi.org/project/pyqwest/) via its httpx-compatible | ||
| transport adapter. envd RPC already runs on pyqwest through `connectrpc`, so | ||
| all sandbox traffic now shares one HTTP stack built from the same transport | ||
| pieces (with separate connection pools per use). | ||
|
|
||
| The per-thread (sync) and per-loop (async) envd httpx clients are gone: the | ||
| pyqwest transports are thread-safe and loop-independent, so a single client | ||
| per module serves all threads and event loops. | ||
|
|
||
| Timeout semantics through the adapter: | ||
|
|
||
| - Streamed downloads (`files.read(format="stream")`): a `request_timeout` | ||
| set explicitly for the call is the deadline for the whole transfer — by | ||
| default the transfer is unbounded in total, as before. A stalled stream is | ||
| reclaimed by a 60-second idle read timeout that resets on every chunk. | ||
| `stream_idle_timeout` keeps working on the async client (applied per | ||
| read); the sync client cannot interrupt a blocking read, so it relies on | ||
| the transport-wide idle bound and now ignores the parameter. | ||
| - Uploads: a buffered upload is bounded by `request_timeout` as a | ||
| whole-request deadline, and a streamed (file-like) upload carries no | ||
| client-side timeout (a stalled one is bounded server-side by envd's idle | ||
| read timeout) — both matching the JS SDK. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused httpx pool limits
Low Severity
limitsis no longer referenced anywhere after the envd httpx transports were removed, soE2B_MAX_CONNECTIONSand the related httpxLimitstuning are dead. That makes the leftover env-var surface look effective when it is not.Reviewed by Cursor Bugbot for commit 77e563b. Configure here.