Skip to content

feat: relax opencv pin to support both 4.x and 5.x - #77

Merged
petercorke merged 2 commits into
mainfrom
feat/opencv-dual-version-support
Aug 13, 2026
Merged

feat: relax opencv pin to support both 4.x and 5.x#77
petercorke merged 2 commits into
mainfrom
feat/opencv-dual-version-support

Conversation

@petercorke

Copy link
Copy Markdown
Owner

Summary

  • pyproject.toml's opencv-python/opencv-contrib-python pin was capped at <5.0.0 since 2026-06-16, before the codebase actually supported OpenCV 5.
  • PR fix: OpenCV 5 compatibility fixes (aruco, HoughLinesP, BRISK/AKAZE, MSER) #61 landed real OpenCV 5 compatibility fixes and release 2.2.0's changelog already claimed "works under both OpenCV 4 and 5" — but the pin was never relaxed, so pip install could never actually resolve OpenCV 5, and CI never exercised it.
  • Relaxes the pin to >=4.5,<6.0.0 per opencv5 migration: dual-version (4/5) compatibility #44's plan, and adds an opencv-version axis (4, 5) to ci.yml's test matrix so both are exercised on every push/PR going forward.

Test plan

  • Verified locally in two isolated venvs (not the ambient dev environment): full suite green against real opencv-contrib-python 4.14.0.94 (785 passed, 94 skipped) and 5.0.0.93 (784 passed, 95 skipped)
  • CI matrix now covers os × python-version × opencv-version (24 jobs) — watching this PR's CI run to confirm green across the board

Fixes #44

🤖 Generated with Claude Code

pyproject.toml's opencv-python/opencv-contrib-python pin was capped at
<5.0.0 since 2026-06-16, defensively, before the codebase actually
supported OpenCV 5. PR #61 landed real OpenCV 5 compatibility fixes
(aruco, HoughLinesP, BRISK/AKAZE, MSER) and release 2.2.0's changelog
already headlined "works under both OpenCV 4 and 5" -- but the pin
itself was never relaxed, so pip install could never actually resolve
opencv5, and CI never exercised it either.

Relax the pin to >=4.5,<6.0.0 per issue #44's plan, and add an
opencv-version axis (4, 5) to ci.yml's test matrix so both are
actually exercised on every push/PR, not just verified manually once.

Verified locally in isolated venvs (not the ambient dev environment):
full suite green against real opencv-contrib-python 4.14.0.94 (785
passed, 94 skipped) and 5.0.0.93 (784 passed, 95 skipped).

Fixes #44

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@petercorke
petercorke merged commit 7777111 into main Aug 13, 2026
31 checks passed
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.

opencv5 migration: dual-version (4/5) compatibility

1 participant