Skip to content

fix(python): resolve runpy paths in virtual filesystem#300

Open
wsxiaoys wants to merge 1 commit into
vercel-labs:mainfrom
wsxiaoys:fix/python-runpy-path
Open

fix(python): resolve runpy paths in virtual filesystem#300
wsxiaoys wants to merge 1 commit into
vercel-labs:mainfrom
wsxiaoys:fix/python-runpy-path

Conversation

@wsxiaoys

Copy link
Copy Markdown

Summary

  • redirect io.open_code() through the Python virtual filesystem mount so runpy.run_path() can execute sandbox files
  • preserve logical paths in __file__ instead of exposing the internal /host mount
  • add coverage for absolute paths, returned globals, and pathlib.Path inputs

Test plan

  • pnpm exec vitest run --config vitest.wasm.config.ts src/commands/python3/python3.files.test.ts
  • pnpm typecheck
  • pnpm exec biome check src/commands/python3/worker.ts src/commands/python3/python3.files.test.ts

🤖 Generated with Pochi | Task

Ensure runpy.run_path can load sandbox files without exposing the internal /host mount in Python metadata.

🤖 Generated with [Pochi](https://getpochi.com) | [Task](https://app.getpochi.com/share/p-d4a677e543944346bd8834bfa046822d)

Co-Authored-By: Pochi <noreply@getpochi.com>
@wsxiaoys
wsxiaoys requested a review from cramforce as a code owner July 16, 2026 01:55
@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

@wsxiaoys is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant