Skip to content

Commit 3e3a3b4

Browse files
author
BrokenDuck
committed
Merge branch 'update-pyodide-version' into add-file-support
2 parents 25ef73b + d45cd03 commit 3e3a3b4

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

mcp-run-python/deno.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
"@std/fs": "jsr:@std/fs@^1.0.19",
2020
"@std/media-types": "jsr:@std/media-types@^1.1.0",
2121
"@std/path": "jsr:@std/path@^1.0.8",
22-
// do NOT upgrade above this version until there is a workaround for https://github.com/pyodide/pyodide/pull/5621
23-
"pyodide": "npm:[email protected]",
22+
"pyodide": "npm:[email protected]",
2423
"zod": "npm:zod@^3.24.2"
2524
},
2625
"fmt": {

mcp-run-python/deno.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mcp-run-python/src/runCode.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ export async function runCode(
1818
rootDir: string | null,
1919
mountDir: string | null,
2020
): Promise<RunSuccess | RunError> {
21-
// remove once we can upgrade to pyodide 0.27.7 and console.log is no longer used.
22-
const realConsoleLog = console.log
23-
// deno-lint-ignore no-explicit-any
24-
console.log = (...args: any[]) => log('debug', args.join(' '))
25-
2621
const output: string[] = []
2722
const pyodide = await loadPyodide({
2823
stdout: (msg) => {
@@ -108,7 +103,6 @@ export async function runCode(
108103
}
109104
sys.stdout.flush()
110105
sys.stderr.flush()
111-
console.log = realConsoleLog
112106
return runResult
113107
}
114108

mcp-run-python/test_mcp_servers.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ async def test_list_tools(
251251
<status>run-error</status>
252252
<error>
253253
Traceback (most recent call last):
254+
...<9 lines>...
255+
.run_async(globals, locals)
254256
File "main.py", line 1, in <module>
255257
print(unknown)
256258
^^^^^^^
@@ -566,7 +568,8 @@ async def logging_callback(params: types.LoggingMessageNotificationParams) -> No
566568
</return_value>\
567569
"""
568570
assert content.text == expected_output
569-
assert len(logs) >= 18
571+
assert len(logs) >= 16
570572
assert re.search(
571-
r"debug: Didn't find package numpy\S+?\.whl locally, attempting to load from", '\n'.join(logs)
573+
r"debug: loadPackage: Didn't find package numpy\S*\.whl locally, attempting to load from",
574+
'\n'.join(logs),
572575
)

0 commit comments

Comments
 (0)