Conversation
BREAKING CHANGE: Supervision no longer installs OpenCV. Install one ambient OpenCV wheel family when native behavior is required. Co-authored-by: Codex <codex@openai.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes OpenCV (opencv-python) as a runtime dependency of Supervision so the package defaults to its bundled fallback backend, and adds release/CI guardrails + documentation to ensure the wheel remains usable in environments where cv2 is not installed.
Changes:
- Dropped
opencv-pythonfrompyproject.toml(and corresponding lockfile metadata). - Added a new “clean wheel” CI job plus a wheel verification script + manifest to validate installs in an environment without OpenCV.
- Added/updated documentation (migration guide, FAQ, changelog) and a release-contract test to keep the migration discoverable and prevent OpenCV from reappearing as a dependency/extra.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
uv.lock |
Removes OpenCV from the lock; updates Requires-Dist metadata to match updated deps. |
pyproject.toml |
Removes opencv-python from runtime dependencies. |
tests/cv2/test_release.py |
Adds release-contract checks to ensure no OpenCV dependency/extra and that migration docs exist. |
tests/cv2/installed_wheel_fallback_manifest.txt |
Declares the exact smoke-check contract used by the clean-wheel verifier. |
.github/workflows/ci-tests.yml |
Adds clean-wheel matrix job and gates the guardian job on it. |
.github/scripts/verify_clean_wheel.py |
Implements wheel metadata checks + installed-environment smoke probe for fallback behavior. |
docs/how_to/opencv_migration.md |
New migration guide describing how to run with fallback or an explicitly installed OpenCV wheel. |
docs/faq.md |
Updates FAQ to state OpenCV is not installed and links the migration guide. |
docs/changelog.md |
Documents the breaking change and aligns wording/requirements with the new backend behavior. |
mkdocs.yml |
Adds the migration guide to documentation navigation. |
This was referenced Jul 17, 2026
- Keep the fallback suite on supported Python versions. - Exercise full and headless OpenCV wheels on Python 3.14 across all CI platforms. --- Co-authored-by: Codex <codex@openai.com>
- Match addWeighted keyword arguments and keep doctests cv2-free. - Update pywin32 lock data for Windows CPython 3.14. --- Co-authored-by: Codex <codex@openai.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2443 +/- ##
=======================================
+ Coverage 87% 87% +1%
=======================================
Files 85 85
Lines 11933 11935 +2
=======================================
+ Hits 10342 10429 +87
+ Misses 1591 1506 -85 🚀 New features to boost your workflow:
|
- Assert stable Douglas-Peucker invariants across OpenCV major versions. - Print installed CI packages to diagnose matrix-specific failures. --- Co-authored-by: Codex <codex@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request removes OpenCV as a runtime dependency and extra from Supervision, making the package rely on its included fallback backend by default. It introduces new release-contract checks, updates documentation to guide users through the migration, and adds CI validation to ensure the wheel works in environments without OpenCV.
Dependency and Packaging Changes
dependencieslist inpyproject.toml, so Supervision no longer installs or requires any OpenCV distribution by default.Continuous Integration and Release Checks
clean-wheelCI job to build, install, and validate the Supervision wheel in an isolated environment without OpenCV, using a new.github/scripts/verify_clean_wheel.pyscript and a fallback manifest for explicit checks. [1] [2] [3]tests/cv2/test_release.pyto assert that OpenCV is not listed as a dependency and that migration documentation is present and up-to-date.Documentation Updates
docs/how_to/opencv_migration.md) explaining how to use Supervision with or without OpenCV, backend selection, and best practices for different application types.cc: @robmarkcole
closes #2114