Repository navigation
fix(python-sdk): upgrade pyqwest to 0.15 and download files over HTTP/2 again - #2197
Conversation
…/2 again Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
🦋 Changeset detectedLatest commit: 1d618be The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
There was a problem hiding this comment.
TASTE.md review: no violations. I checked the changed code against parity (T-1, T-2), options and docstrings (T-10, T-69, T-71), validation errors (T-59, T-62), timeouts (T-45, T-47), and export/deprecation rules (T-54, T-65). The removed ENVD_API_FILE_DOWNLOAD_HTTP_VERSION and ChunkCheck were internal and never exported from e2b/__init__.py, so no deprecated aliases are needed. Non-bytes upload chunks still raise InvalidArgumentException.
Package ArtifactsBuilt from efcd8f2. Download artifacts from this workflow run. JS SDK ( npm install ./e2b-dockerfile-utils-0.1.3-devin-1796039265-pyqwest-0-15.0.tgz ./e2b-2.67.1-devin-1796039265-pyqwest-0-15.0.tgzCLI ( npm install ./e2b-cli-2.26.1-devin-1796039265-pyqwest-0-15.0.tgzCode Interpreter JS SDK ( npm install ./e2b-code-interpreter-2.9.2-devin-1796039265-pyqwest-0-15.0.tgzDesktop JS SDK ( npm install ./e2b-desktop-2.5.1-devin-1796039265-pyqwest-0-15.0.tgzPython SDK ( pip install ./e2b_dockerfile_utils-0.1.2+devin.1796039265.pyqwest.0.15-py3-none-any.whl ./e2b-2.67.0+devin.1796039265.pyqwest.0.15-py3-none-any.whlCode Interpreter Python SDK ( pip install ./e2b_code_interpreter-2.11.13+devin.1796039265.pyqwest.0.15-py3-none-any.whlDesktop Python SDK ( pip install ./e2b_desktop-2.7.2+devin.1796039265.pyqwest.0.15-py3-none-any.whl |
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. |
…ms can't stall a shared HTTP/2 connection Co-Authored-By: mish@e2b.dev <mish@e2b.dev>
Summary
Bumps
pyqwest>=0.12.0,<0.13→>=0.15.0,<0.16(v0.15.0) and drops the workarounds it makes unnecessary. Lockfiles ofacp-python,code-interpreter-pythonanddesktop-pythonare relocked.files.readintext/bytesformat usesself._envd_apion the configuredhttp_version(the dedicated_envd_api_downloadclient is gone).ENVD_API_FILE_DOWNLOAD_HTTP_VERSIONbecomesENVD_API_FILE_STREAM_HTTP_VERSION = "1.1", used by_envd_api_streaming(sync + async) and, for an explicit asyncstream_idle_timeout, a new_envd_api_streamclient (previously that branch used_envd_api). Over HTTP/2, data a caller hasn't read holds the connection's flow-control window, so a few partly read or abandonedformat="stream"readers stall every other request on that connection, including envd RPC.WriteError, soChunkCheck(which recorded theInvalidArgumentExceptionto re-raise it) is removed.max(read, write)instead ofread + write, so Python SDK timeouts are no longer doubled (SDK-451). This supersedes fix(python-sdk): stop pyqwest transport doubling httpx timeouts (run_code waited 2x) #2175.Verification
test_envd_file_download_empty_data_frames.pyassertsbytes/textreads use the configured version and streamed reads use HTTP/1.1; the fake server sends 600-byte frames each followed by an empty one (the real proxy sends ~32 KiB per empty frame). It fails on pyqwest 0.12 withtoo_many_data_framesand passes on 0.15.too_many_data_frameson pyqwest 0.12.stream_idle_timeout=15) made the 4thfiles.readandcommands.runtime out. With this PR, 10 such open streams don't block a new read,commands.runorfiles.list.write_files) pass sync and async, checksums match.filesintegration tests: 133 passed, 2 failed (test_file_symlink, a backend failure already onmain, see chore(deps): scheduled patch/minor dependency updates for js-sdk / cli / python-sdk #2194).Link to Devin session: https://app.devin.ai/sessions/d734c4752b1a4f7b90b09bfd3379c6f4
Open in Devin Desktop: https://app.devin.ai/desktop/session/d734c4752b1a4f7b90b09bfd3379c6f4?variant=devin
Requested by: @mishushakov
🟢 Devin Review found nothing to fix · View findings