From 95b3f55f0cd0b25a1f6e239bc9e85a1ab4a6543b Mon Sep 17 00:00:00 2001 From: davidnichols-ops Date: Mon, 29 Jun 2026 22:28:18 -0500 Subject: [PATCH] fix(dev): cap numpy<2.5 in dev extra to unblock mypy typecheck MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit numpy 2.5.0 (2026-06-21) ships type stubs using PEP 695 `type` statement syntax, which mypy cannot parse under python_version = "3.10". With no upper bound on numpy, `pip install ".[dev]"` pulls 2.5.0 and the `mypy roboflow` CI step fails across the entire 3.10–3.13 matrix. Cap numpy<2.5 in the dev extra only. pip intersects this with the runtime requirement (numpy>=1.18.5), so dev/typecheck installs get >=1.18.5,<2.5 while end-user runtime installs stay unconstrained. Fixes #498 --- setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.py b/setup.py index 85f671ab..49278e77 100644 --- a/setup.py +++ b/setup.py @@ -31,6 +31,11 @@ extras_require={ "desktop": ["opencv-python==4.8.0.74"], "dev": [ + # numpy 2.5.0 (2026-06-21) ships PEP 695 `type` statement stubs that + # mypy cannot parse under python_version = "3.10". Cap in the dev + # extra only so typecheck CI keeps passing; runtime installs + # (requirements.txt) stay unconstrained for end users. See #498. + "numpy<2.5", "mypy", "responses", "ruff",