Title: Support Bun · Issue #305 · extrabacon/python-shell · GitHub
Open Graph Title: Support Bun · Issue #305 · extrabacon/python-shell
X Title: Support Bun · Issue #305 · extrabacon/python-shell
Description: Describe the bug python-shell doesn't work on Bun. Python code See the below. Javascript code https://github.com/extrabacon/python-shell#running-python-code import { PythonShell } from 'python-shell'; PythonShell.runString('x=1+1;print(x...
Open Graph Description: Describe the bug python-shell doesn't work on Bun. Python code See the below. Javascript code https://github.com/extrabacon/python-shell#running-python-code import { PythonShell } from 'python-shel...
X Description: Describe the bug python-shell doesn't work on Bun. Python code See the below. Javascript code https://github.com/extrabacon/python-shell#running-python-code import { PythonShell } from 'pyt...
Opengraph URL: https://github.com/extrabacon/python-shell/issues/305
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support Bun","articleBody":"**Describe the bug**\r\n`python-shell` doesn't work on [Bun](https://github.com/oven-sh/bun).\r\n\r\n**Python code**\r\nSee the below.\r\n\r\n**Javascript code**\r\nhttps://github.com/extrabacon/python-shell#running-python-code\r\n\r\n```js\r\nimport { PythonShell } from 'python-shell';\r\n\r\nPythonShell.runString('x=1+1;print(x)', null).then((messages) =\u003e {\r\n console.log('finished');\r\n});\r\n```\r\n\r\n**Expected behavior**\r\n`2` is shown.\r\n\r\n**Actual behavior**\r\n```\r\n$ bun example.js\r\n128 | this.stderrParser = resolve('parse', options.stderrParser || 'text');\r\n129 | this.terminated = false;\r\n130 | this.childProcess = (0, child_process_1.spawn)(pythonPath, this.command, options);\r\n131 | ['stdout', 'stdin', 'stderr'].forEach(function (name) {\r\n132 | self[name] = self.childProcess[name];\r\n133 | self.parser \u0026\u0026 self[name] \u0026\u0026 self[name].setEncoding(options.encoding || 'utf8');\r\n ^\r\nTypeError: self[name].setEncoding is not a function. (In 'self[name].setEncoding(options.encoding || \"utf8\")', 'self[name].setEncoding' is undefined)\r\n at /Users/exkazuu/ghq/github.com/WillBoosterLab/repair-ai/node_modules/python-shell/index.js:133:42\r\n at forEach (:1:21)\r\n at new PythonShell (/Users/exkazuu/ghq/github.com/WillBoosterLab/repair-ai/node_modules/python-shell/index.js:131:9)\r\n at /Users/exkazuu/ghq/github.com/WillBoosterLab/repair-ai/node_modules/python-shell/index.js:252:27\r\n at new Promise (:1:21)\r\n at run (/Users/exkazuu/ghq/github.com/WillBoosterLab/repair-ai/node_modules/python-shell/index.js:251:16)\r\n at /Users/exkazuu/ghq/github.com/WillBoosterLab/repair-ai/example.js:3:1\r\n\r\nBun v1.1.8 (macOS arm64)\r\n```\r\n\r\n**Other Information (please complete the following information):**\r\n - OS: `macOS`\r\n - Python Version `3.12.3`\r\n - Node Version `Bun v1.1.8 (macOS arm64)`\r\n\r\n**Additional context**\r\nNothing.","author":{"url":"https://github.com/exKAZUu","@type":"Person","name":"exKAZUu"},"datePublished":"2024-05-11T06:55:56.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/305/python-shell/issues/305"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3e52e152-6824-801c-c449-76f5f90eb5a9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BB0C:1A3A28:26D1A9E:324D32C:69747981 |
| html-safe-nonce | 0c8227b0f689eac520e9e84e63a47fce6b7f781c6764fe4f740342de1d085e6c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQjBDOjFBM0EyODoyNkQxQTlFOjMyNEQzMkM6Njk3NDc5ODEiLCJ2aXNpdG9yX2lkIjoiODM0Njc1NTAzNTgyMzM3MjY3MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6135506c6aa8b064e7b5f7d63cf4a7f7c23ccb0434a8e9cd2552aca38dfe3ca6 |
| hovercard-subject-tag | issue:2290727097 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/extrabacon/python-shell/305/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0408ec1b75f0402246e5f4bbf81f28cba55d1d5e181bc2a265ade52c6b6479f1/extrabacon/python-shell/issues/305 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0408ec1b75f0402246e5f4bbf81f28cba55d1d5e181bc2a265ade52c6b6479f1/extrabacon/python-shell/issues/305 |
| og:image:alt | Describe the bug python-shell doesn't work on Bun. Python code See the below. Javascript code https://github.com/extrabacon/python-shell#running-python-code import { PythonShell } from 'python-shel... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | exKAZUu |
| hostname | github.com |
| expected-hostname | github.com |
| None | e0b95d743b7672c9ac0e1032d5f117950182dc164a83434a7db86510e8f0b37c |
| turbo-cache-control | no-preview |
| go-import | github.com/extrabacon/python-shell git https://github.com/extrabacon/python-shell.git |
| octolytics-dimension-user_id | 1558613 |
| octolytics-dimension-user_login | extrabacon |
| octolytics-dimension-repository_id | 17671651 |
| octolytics-dimension-repository_nwo | extrabacon/python-shell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 17671651 |
| octolytics-dimension-repository_network_root_nwo | extrabacon/python-shell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 56fe7e2e8de6e57740bca50402351ea656f7a4bf |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width