FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add timeout option for PythonShell runs by StantonMatt · Pull Request #329 · extrabacon/python-shell · GitHub

Repository navigation

Add timeout option for PythonShell runs - #329

Open
StantonMatt wants to merge 1 commit into
extrabacon:masterfrom
StantonMatt:add-timeout-option
Open

StantonMatt wants to merge 1 commit into
extrabacon:masterfrom
StantonMatt:add-timeout-option

Conversation

StantonMatt commented Jun 2, 2026 •
edited
Loading

Copy link
Copy Markdown

Summary

  • Add an optional timeout setting to PythonShell options
  • Reject timed-out runs with a timeout error and preserve collected logs
  • Honor killSignal, flush buffered splitter output, handle parser errors during timeout flush, and use a SIGKILL fallback when the timeout signal is ignored
  • Clear timeout timers on spawn failures

Context

Fixes #96.

Verification

  • npm test -- --grep 'timeout|bad path|fails to spawn'
  • npm test (run outside the sandbox because Python's py_compile test writes bytecode under ~/Library/Caches)
  • npx prettier --check README.md index.ts test/test-python-shell.ts
  • git diff --check
  • review-fix-loop: no actionable regressions found

Signed-off-by: Matthew Stanton <stantonmatthewj@gmail.com>
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
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.

Timeout support

1 participant


Back | FazBrowse Home | New Git URL