Repository navigation
Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @DZH166 on file. You can sign our CLA at https://e2b.dev/docs/cla . Once you've signed, post a comment here that says '@cla-bot check' |
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Summary
Sandbox.create_code_context()(both sync and async) documentsrequest_timeoutas"Timeout for the request in milliseconds", but the value is passed straight through
to httpx as
timeout=request_timeout or self.connection_config.request_timeout, andhttpx timeouts are in seconds.
A user following the docstring and passing
request_timeout=30000intending 30 secondsgets a 30,000-second (~8.3 hour) request deadline instead. The milliseconds wording
looks like a copy-over from the JS SDK, where the equivalent parameter is genuinely
requestTimeoutMs. The same Python parameter is already documented in seconds byrun_codein the same classes, andConnectionConfig.REQUEST_TIMEOUTis60.0 # 60 seconds.This PR fixes the two docstring lines (sync + async kept in parity) so the documented
unit matches the actual behavior. No runtime behavior changes.
Validation
pytest tests/charts tests/test_format_exception.py— 15 passed (one test,test_scatter_chart, requires a live sandbox fixture and errors without realcredentials; pre-existing and unrelated to this change).
:param request_timeout:line in bothcreate_code_contextdocstrings saysseconds; it failed on
mainand passes after this change (logs:ccx-timeout-units-red.log/ccx-timeout-units-green.log).ruff check .andruff format --check .— clean.ty check e2b_code_interpreter— 14 diagnostics, identical tomain(verified viagit stash); this change introduces 0 new diagnostics.git diff --check— clean.AI assistance
This change was located, prepared, and validated with AI assistance as part of a
community contribution; the analysis above (httpx timeout semantics,
run_codedocstring,
ConnectionConfig.REQUEST_TIMEOUTdefault, and JSrequestTimeoutMsnaming) was verified against the repository sources before writing the fix.