Skip to content

PyPI release 1.0.10 diverges from main — reintroduces "jupyter" variant bug already fixed on main #17

Description

@erwan-simon-CATIE

Bug

code_sandboxes==1.0.10 on PyPI raises ValueError: Unknown sandbox variant: jupyter when calling Sandbox.create(variant="jupyter") or Sandbox.list_environments(variant="jupyter"), even though "jupyter" is exactly the value documented in the docstring and in the error message's own "Supported variants" list.

Root cause in the installed 1.0.10 wheel (code_sandboxes/base.py):

  • line ~303: elif variant_value == "jupyter_server": (imports .jupyter_server_sandbox)
  • line ~330: error message still says "Supported variants: eval, docker, jupyter, ..."
  • same mismatch repeated in list_environments around line ~387

So any caller passing the documented "jupyter" string falls through to the else branch.

Why I'm filing an issue and not a PR

I checked the public branches to write a fix, and the bug does not exist there:

  • main (commit fa5a2ab): already uses elif variant_value == "jupyter": and imports .jupyter_sandbox, consistent with the docstring and error message, with the same 8 variants (eval, docker, jupyter, datalayer, google_colab, kaggle, monty, modal) as the 1.0.10 error text.
  • enh/jupyter and var/google-colab: neither matches the jupyter_server_sandbox module name or comparison found in the shipped wheel either.

So the source that produced the 1.0.10 wheel doesn't seem to correspond to any branch I could inspect — this looks like a packaging/release issue (wrong ref released) rather than a source bug to patch via PR.

Suggested fix

Re-cut a release from current main (which already has the correct "jupyter" handling), or investigate what ref the 1.0.10 build was actually taken from.

Repro

​```python
from code_sandboxes.base import Sandbox
Sandbox.create(variant="jupyter")

ValueError: Unknown sandbox variant: jupyter. Supported variants: eval, docker, jupyter, datalayer, google_colab, kaggle, monty, modal

​```

Installed via: uvx code-sandboxes==1.0.10 (or any resolver picking up latest, published 2026-08-20T13:28:35Z).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions