chore: bump opencv-python to >=4.10.0 and add cv2 tests#274
Merged
Conversation
#273 関連。numpy 2.x への移行に向けた事前準備として、opencv-python の下限を引き上げ、numpy 2 対応ビルドを取り込めるようにする。 あわせて cv2 を使用している箇所のテストを追加し、今回のバージョン アップおよび後続の numpy 移行のセーフティネットとする。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
rikunosuke
commented
May 18, 2026
Contributor
Author
There was a problem hiding this comment.
converters.py の opencv 関連のロジックのテスト
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
numpy>=1.26 requires python>=3.9, so 3.8 cannot install the SDK. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pillow<11.0.0 has no wheels for python 3.13+, and source build fails on 3.14. Re-add once Pillow constraint is bumped. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
aiohttp is not imported anywhere in the codebase. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
rikunosuke
commented
May 18, 2026
Comment on lines
+44
to
+45
| python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
|
|
Contributor
Author
There was a problem hiding this comment.
3.13/3.14 は Pillow のバージョンが低すぎてインストールできずにエラーとなるため、このPRには含めない
rikunosuke
commented
May 18, 2026
| "xmltodict==0.12.0", | ||
| "Pillow>=10.0.0,<11.0.0", | ||
| "opencv-python>=4.0.0,<5.0.0", | ||
| "aiohttp>=3.8.5" |
Contributor
Author
There was a problem hiding this comment.
aiohttp は使わなくなっていたので削除しています。
aiohttp の非同期処理は colab で使う際にエラーがでるため、過去に使わなくなったと思われます。
Closed
9 tasks
yo-tak
approved these changes
May 19, 2026
yo-tak
left a comment
There was a problem hiding this comment.
LGTM!!
今回の修正とは別スコープですが、uvへ移行する気持ちとかあります?
バージョン変更って破壊的変更が入るなら、ついでに移行しても良いかなというくらいです。
Contributor
Author
|
@yo-tak |
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.
Summary
numpy 2.x 対応(#273)に向けた事前準備の PR。
opencv-python下限を>=4.0.0→>=4.10.0に引き上げ(4.10 系から numpy 2 対応)cv2を使っている全箇所にテストを追加し、CI(pytest)で動作確認できるよう整備aiohttp依存を削除Python 3.13 / 3.14 対応と numpy 2.x 両対応マトリクスは、Pillow bump および numpy 制約緩和の後続 PR(#273 のコメント参照)で対応する。
変更点
pyproject.tomlopencv-python>=4.10.0,<5.0.0/dev = ["pytest>=7.0.0"]/aiohttp削除requirements.txtopencv-python>=4.10.0,<5.0.0/aiohttp削除.github/workflows/test.ymltests/conftest.py(新規)synthetic_videoフィクスチャtests/test_mask_image_util.py(新規)mask_to_polygon/mask_to_segmentation(9 件)tests/test_utils.py(新規)is_video_supported_codec(2 件)tests/test_converters_video.py(新規)VideoCapturectx /_export_image_files_for_video_file(8 件)tests/test_lerobot_v3_video.py(新規)_extract_video_segment(3 件)Test plan
pip install -e ".[dev]"で依存解決(opencv-python 4.11.0 が導入されることを確認)python -m pytest tests/で全 28 件 PASS を確認Refs
🤖 Generated with Claude Code