Skip to content

fix(sandbox): unblock multi-sandbox when host pyzmq lags PyPI - #10690

Draft
Light2Dark wants to merge 1 commit into
mainfrom
sham/fix-sandbox-pyzmq-pin
Draft

fix(sandbox): unblock multi-sandbox when host pyzmq lags PyPI#10690
Light2Dark wants to merge 1 commit into
mainfrom
sham/fix-sandbox-pyzmq-pin

Conversation

@Light2Dark

Copy link
Copy Markdown
Member

This pull request was authored by a coding agent.

📝 Summary

Opening a notebook from marimo edit --sandbox (directory or home page) can fail to build the kernel venv:

Because you require pyzmq{...}==27.2.0 and pyzmq==27.1.0,
we can conclude that your requirements are unsatisfiable.

The editor pinned its installed pyzmq into the sandbox so host and kernel would match. uv export independently locks marimo's transitive pyzmq from PyPI. Those versions diverge whenever the host was installed before a new pyzmq release — here 27.1.0 in the repo lock vs 27.2.0 on PyPI. The notebook never asked for pyzmq.

We stopped exact-pinning. IPC only needs pyzmq>=27.1.0; ZMQ does not require the same wheel on both sides. If the lock already has pyzmq, we skip adding a second line. That avoids a merge engine for a conflict we were creating ourselves.

📋 Pre-Review Checklist

  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • Any AI generated code has been reviewed line-by-line by the human PR author, who stands by it.
  • Video or media evidence is provided for any visual changes (optional).

✅ Merge Checklist

  • I have read the contributor guidelines.
  • Documentation has been updated where applicable, including docstrings for API changes.
  • Tests have been added for the changes made.

Written by cursor-grok-4.6 on Cursor

An exact host pin conflicts with the version uv export locks from PyPI,
so multi-sandbox installs fail after a new pyzmq release.
@Light2Dark Light2Dark added the bug Something isn't working label Aug 28, 2026
@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview Aug 28, 2026 1:05pm

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 4 files

You’re at about 99% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="marimo/_cli/sandbox.py">

<violation number="1" location="marimo/_cli/sandbox.py:583">
P1: When a notebook’s existing `pyzmq` line has a false environment marker, this name-only check suppresses the unconditional IPC dependency, leaving the kernel venv without `pyzmq`. Evaluate PEP 508 markers before treating an existing line as satisfying `get_ipc_kernel_deps()`.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread marimo/_cli/sandbox.py
d.lower().split("[")[0].split(">=")[0].split("==")[0]
for d in normalized
}
existing = {_requirement_name(dep) for dep in normalized}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: When a notebook’s existing pyzmq line has a false environment marker, this name-only check suppresses the unconditional IPC dependency, leaving the kernel venv without pyzmq. Evaluate PEP 508 markers before treating an existing line as satisfying get_ipc_kernel_deps().

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At marimo/_cli/sandbox.py, line 583:

<comment>When a notebook’s existing `pyzmq` line has a false environment marker, this name-only check suppresses the unconditional IPC dependency, leaving the kernel venv without `pyzmq`. Evaluate PEP 508 markers before treating an existing line as satisfying `get_ipc_kernel_deps()`.</comment>

<file context>
@@ -570,15 +579,14 @@ def get_sandbox_requirements(
-            d.lower().split("[")[0].split(">=")[0].split("==")[0]
-            for d in normalized
-        }
+        existing = {_requirement_name(dep) for dep in normalized}
+        existing.discard("")
         for dep in additional_deps:
</file context>

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

Labels

bug Something isn't working team-draft

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant