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

Guard optional stream setEncoding by StantonMatt · Pull Request #328 · extrabacon/python-shell · GitHub

Repository navigation

Guard optional stream setEncoding - #328

Open
StantonMatt wants to merge 1 commit into
extrabacon:masterfrom
StantonMatt:fix-bun-stream-setencoding
Open

StantonMatt wants to merge 1 commit into
extrabacon:masterfrom
StantonMatt:fix-bun-stream-setencoding

Conversation

StantonMatt commented Jun 1, 2026 •
edited
Loading

Copy link
Copy Markdown

Summary

  • only call setEncoding when a child-process stream exposes that method
  • preserves current behavior for Node streams while avoiding the Bun/Deno-compatible stream TypeError reported in Support Bun #305

Fixes #305.

Verification

  • npm test (rerun passed with 43 passing; one earlier local run hit three Mocha 2s timeouts before passing on rerun)
  • bun -e 'import { PythonShell } from "./index.ts"; await PythonShell.run("exit-code.py", { scriptPath: "test/python", stdio: ["ignore", "pipe", "pipe"] }); console.log("bun smoke passed");'
  • git diff --check
  • review-fix-loop clean

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.

Support Bun

1 participant


Back | FazBrowse Home | New Git URL