Skip to content

Async Sandbox - Run code output handlers are never awaited - #160

Merged
jakubno merged 4 commits into
mainfrom
asyncsandboxrun_code-output-handlers-are-never-awaited-eng-3217
Oct 27, 2025
Merged

jakubno merged 4 commits into
mainfrom
asyncsandboxrun_code-output-handlers-are-never-awaited-eng-3217

Conversation

@jakubno

@jakubno jakubno commented Oct 27, 2025 •

Copy link
Copy Markdown
Member

Note

Await async callbacks for run_code output handlers and add async-capable parsing with tests.

  • Python:
    • Async handlers: AsyncSandbox.run_code now accepts OutputHandlerWithAsync for on_stdout, on_stderr, on_result, on_error and awaits them via async_parse_output.
    • Parsing refactor: Add async_parse_output and internal _parse_output that returns an awaitable; update parse_output to delegate.
    • Types: Introduce OutputHandlerWithAsync alongside existing OutputHandler.
  • Tests:
    • Add async callback tests for results, stdout, stderr, and error; include a sync-callback case.
  • Changeset:
    • Patch release: "Await async callbacks".

Written by Cursor Bugbot for commit 822f4da. This will update automatically on new commits. Configure here.

@linear

linear Bot commented Oct 27, 2025

Copy link
Copy Markdown

@mishushakov mishushakov left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nits

Comment thread python/e2b_code_interpreter/models.py
@jakubno
jakubno requested a review from mishushakov October 27, 2025 13:13
@jakubno
jakubno merged commit 699d26c into main Oct 27, 2025
9 checks passed
@jakubno
jakubno deleted the asyncsandboxrun_code-output-handlers-are-never-awaited-eng-3217 branch October 27, 2025 15:02
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.

2 participants