Skip to content

Conversation

@paulgb
Copy link
Member

@paulgb paulgb commented Feb 14, 2025

This supports an additional, optional, timeout_seconds parameter to exec. This supplies a timeout (in seconds) that overrides the default of 15s.


def exec(self, code: str) -> ReplExecResult:
def exec(
self, code: str, timeout_seconds: int = DEFAULT_INSTRUCTION_TIMEOUT_SECONDS
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider validating that timeout_seconds is a positive integer.

@paulgb paulgb merged commit 30dbc44 into main Feb 14, 2025
2 checks passed
@paulgb paulgb deleted the paulgb/support-timeouts-in-python-sdk branch February 14, 2025 19:39
feliciachang pushed a commit that referenced this pull request Feb 14, 2025
* Add start command (#102)

* Add start command

* newline

* Improve header logging (#101)

* Improve header logging

* Accept ellipsis comments

* 0.1.25 (#103)

* Add timeout option to CLI repl (#104)

* Support timeout in Python SDK (#106)

* add timeout option to js sdk (#107)

* Paul's changes on MCP install

---------

Co-authored-by: Jake Lazaroff <1223007+jakelazaroff@users.noreply.github.com>
Co-authored-by: Taylor Baldwin <taylorbaldwin@gmail.com>
paulgb added a commit that referenced this pull request Feb 14, 2025
* Add start command (#102)

* Add start command

* newline

* Improve header logging (#101)

* Improve header logging

* Accept ellipsis comments

* 0.1.25 (#103)

* Add timeout option to CLI repl (#104)

* Support timeout in Python SDK (#106)

* add timeout option to js sdk (#107)

* Paul's changes on MCP install

---------

Co-authored-by: Jake Lazaroff <1223007+jakelazaroff@users.noreply.github.com>
Co-authored-by: Taylor Baldwin <taylorbaldwin@gmail.com>
feliciachang added a commit that referenced this pull request Feb 14, 2025
* init

* create config path

* uninstall types

* wip

* wip

* wip

* wip

* addressing comments

* addressing comments

* Paul's changes on MCP install (#108)

* Add start command (#102)

* Add start command

* newline

* Improve header logging (#101)

* Improve header logging

* Accept ellipsis comments

* 0.1.25 (#103)

* Add timeout option to CLI repl (#104)

* Support timeout in Python SDK (#106)

* add timeout option to js sdk (#107)

* Paul's changes on MCP install

---------

Co-authored-by: Jake Lazaroff <1223007+jakelazaroff@users.noreply.github.com>
Co-authored-by: Taylor Baldwin <taylorbaldwin@gmail.com>

* fix package-lock.json

* probably fix build issues

---------

Co-authored-by: Paul Butler <paul@driftingin.space>
Co-authored-by: Jake Lazaroff <1223007+jakelazaroff@users.noreply.github.com>
Co-authored-by: Taylor Baldwin <taylorbaldwin@gmail.com>
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