Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: --sandbox flag should add script metadata when none exists#7954

Merged
akshayka merged 6 commits intomainfrom
aka/fix-always-add-script-metadata
Jan 23, 2026
Merged

fix: --sandbox flag should add script metadata when none exists#7954
akshayka merged 6 commits intomainfrom
aka/fix-always-add-script-metadata

Conversation

Copy link
Contributor

akshayka commented Jan 23, 2026

When using marimo edit --sandbox notebook.py on a file without PEP 723 script metadata, the marimo dependency and Python version were not being added. This caused uv run notebook.py to fail because marimo wasn't declared as a dependency.

Now _ensure_marimo_in_script_metadata() will:

  • Create the script metadata block if it doesn't exist
  • Add requires-python with the current Python version
  • Add marimo as a dependency

Also ensures requires-python is added when marimo is already present but the Python version is missing.

Yasin197 reacted with rocket emoji
When using `marimo edit --sandbox notebook.py` on a file without PEP 723
script metadata, the marimo dependency and Python version were not being
added. This caused `uv run notebook.py` to fail because marimo wasn't
declared as a dependency.

Now `_ensure_marimo_in_script_metadata()` will:

- Create the script metadata block if it doesn't exist
- Add `requires-python` with the current Python version
- Add marimo as a dependency

Also ensures `requires-python` is added when marimo is already present
but the Python version is missing.
Copy link

vercel bot commented Jan 23, 2026 *
edited
Loading

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
marimo-docs Ready Preview, Comment Jan 23, 2026 11:26pm

vercel bot deployed to Preview January 23, 2026 18:05 View deployment
akshayka requested a review from koaning January 23, 2026 18:05
akshayka added the bug Something isn't working label Jan 23, 2026
mscolnick reviewed Jan 23, 2026
mscolnick reviewed Jan 23, 2026
vercel bot deployed to Preview January 23, 2026 19:02 View deployment
vercel bot deployed to Preview January 23, 2026 19:04 View deployment
vercel bot deployed to Preview January 23, 2026 22:35 View deployment
...o-team/marimo into aka/fix-always-add-script-metadata
akshayka force-pushed the aka/fix-always-add-script-metadata branch from 795e356 to 5e6e4e0 Compare January 23, 2026 22:43
vercel bot deployed to Preview January 23, 2026 22:44 View deployment
vercel bot deployed to Preview January 23, 2026 23:26 View deployment
akshayka merged commit a8c7120 into main Jan 23, 2026
49 of 50 checks passed
akshayka deleted the aka/fix-always-add-script-metadata branch January 23, 2026 23:55
Copy link

github-actions bot commented Jan 24, 2026

Development release published. You may be able to view the changes at https://marimo.app?v=0.19.6-dev6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

mscolnick mscolnick left review comments

koaning Awaiting requested review from koaning

Assignees

No one assigned

Labels

bug Something isn't working

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants