Skip to content

fix(python): make cloudpickle an optional dependency#215

Merged
DorianZheng merged 1 commit intomainfrom
fix/optional-cloudpickle-dependency
Feb 6, 2026
Merged

fix(python): make cloudpickle an optional dependency#215
DorianZheng merged 1 commit intomainfrom
fix/optional-cloudpickle-dependency

Conversation

@DorianZheng
Copy link
Copy Markdown
Member

Summary

  • Move cloudpickle from required dependencies to optional [orchestration] extra
  • Add lint check in CI to enforce no required dependencies in Python SDK
  • Update --no-index comment in build-wheels.yml to document its lint purpose
  • Bump Node SDK version to 0.2.7

Problem

The wheel test job was failing with:

ERROR: Could not find a version that satisfies the requirement cloudpickle>=3.0

The --no-index flag prevents PyPI access, but cloudpickle wasn't in the wheelhouse.

Solution

cloudpickle is only used by BoxRuntime (multi-box orchestration), which is already wrapped in try/except ImportError. Making it optional aligns the dependency declaration with the existing code pattern.

Before:

pip install boxlite  # Requires cloudpickle

After:

pip install boxlite              # Zero dependencies
pip install boxlite[orchestration]  # With BoxRuntime support

Test plan

  • lint.yml job passes (includes new "Check no required dependencies" step)
  • build-wheels.yml workflow passes when triggered manually
  • python -c "import boxlite" works without cloudpickle installed
  • pip install boxlite[orchestration] + from boxlite import BoxRuntime works

- Move cloudpickle from required to optional-dependencies[orchestration]
- Add lint check in lint.yml to enforce no required dependencies
- Update build-wheels.yml comment explaining --no-index as lint
- Bump Node SDK version to 0.2.7

The BoxRuntime orchestration feature requires cloudpickle for
serializing Python closures into VMs. Most users don't need this,
so it's now opt-in via: pip install boxlite[orchestration]

Fixes wheel build failure where --no-index couldn't resolve cloudpickle.
@DorianZheng DorianZheng force-pushed the fix/optional-cloudpickle-dependency branch from f4446d6 to 841b0bc Compare February 6, 2026 15:40
@DorianZheng DorianZheng merged commit 348eef1 into main Feb 6, 2026
23 checks passed
@DorianZheng DorianZheng deleted the fix/optional-cloudpickle-dependency branch February 6, 2026 15:42
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