From 0c4b26bb77c850518e85dea67774236693f8816a Mon Sep 17 00:00:00 2001 From: Victor Kuznetsov Date: Thu, 30 Jul 2026 16:29:29 -0700 Subject: [PATCH] Fix OpenCV Dependabot compatibility bound --- .github/dependabot.yml | 10 +++++----- tests/test_dependabot.py | 11 +++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 tests/test_dependabot.py diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 73bf8b8..49ce021 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -15,17 +15,17 @@ updates: - "minor" - "patch" # The `all` extra must remain jointly resolvable. These candidates violate - # upstream constraints: TrustMark still requires NumPy 1.x, OpenCV 5 requires - # NumPy 2 on newer Python versions, and this project keeps tokenizers below - # 0.23 for the stable Transformers path. Keep Dependabot on the compatible - # lines until those constraints move. + # upstream constraints: TrustMark still requires NumPy 1.x, OpenCV 4.13+ + # requires NumPy 2 on newer Python versions, and this project keeps tokenizers + # below 0.23 for the stable Transformers path. Keep Dependabot on the + # compatible lines until those constraints move. ignore: - dependency-name: "numpy" versions: - ">=2" - dependency-name: "opencv-python-headless" versions: - - ">=5" + - ">=4.13" - dependency-name: "tokenizers" versions: - ">=0.23" diff --git a/tests/test_dependabot.py b/tests/test_dependabot.py new file mode 100644 index 0000000..3524f03 --- /dev/null +++ b/tests/test_dependabot.py @@ -0,0 +1,11 @@ +"""Regression tests for Dependabot compatibility constraints.""" + +from pathlib import Path + + +def test_dependabot_blocks_opencv_releases_that_require_numpy_2() -> None: + config = Path(".github/dependabot.yml").read_text() + + opencv_ignore = config.split('dependency-name: "opencv-python-headless"', maxsplit=1)[1] + assert '"<4.13"' not in opencv_ignore + assert '- ">=4.13"' in opencv_ignore