Skip to content

Keep Version importable in slim installations - #520

Open
cdeil wants to merge 1 commit into
roboflow:mainfrom
cdeil:fix-slim-version-import
Open

Keep Version importable in slim installations#520
cdeil wants to merge 1 commit into
roboflow:mainfrom
cdeil:fix-slim-version-import

Conversation

@cdeil

@cdeil cdeil commented Aug 26, 2026

Copy link
Copy Markdown

Summary

  • defer model and model-processing imports in roboflow.core.version until the corresponding feature is used
  • add a direct Version import to the existing slim compatibility suite

Motivation

A clean roboflow-slim installation currently cannot import Version:

from roboflow.core.version import Version

The import reaches full-SDK model helpers at module scope and fails successively on optional dependencies such as Pillow, pillow-avif-plugin, and packaging. Those helpers are only needed by specific model, training, deployment, or export paths.

Deferring them to those paths keeps the normal full-SDK behavior while making the core version API usable with the dependencies declared by the slim distribution.

Test plan

  • full Python 3.14 suite: 971 passed, 1 skipped
  • slim compatibility suite on Python 3.10: 51 passed
  • slim compatibility suite on Python 3.14: 51 passed
  • built roboflow-slim wheel imports Version with Pillow, AVIF, OpenCV, NumPy, Matplotlib, and packaging absent
  • Ruff format/lint and mypy pass
  • git diff --check origin/main...HEAD

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