From 28ce64b755d413a1bc3b1dcf8de363617391ff60 Mon Sep 17 00:00:00 2001 From: Hans-Martin von Gaudecker Date: Wed, 29 Jul 2026 13:28:39 +0200 Subject: [PATCH] Silence beartype.claw warnings from a numpy NDArray PEP 695 incompatibility beartype 0.22.9 (latest) cannot decorate any parameterized numpy.typing.NDArray[...] hint under numpy>=2.5's PEP 695 NDArray[ScalarT] definition (confirmed via minimal repro: even NDArray[np.float64] alone fails). beartype.claw already degrades gracefully -- it warns and leaves the function's args unchecked rather than crashing -- so this only affects test log noise, not correctness. No matching upstream beartype issue found; will be filed separately. --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index d1e823b2..60a7c631 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -247,6 +247,11 @@ ini_options.markers = [ "long_running: slow tests skipped in CI (run with -m long_running)", ] ini_options.filterwarnings = [ + # beartype 0.22.9 (latest) cannot decorate any parameterized numpy.typing.NDArray[...] + # hint under numpy>=2.5's PEP 695 NDArray[ScalarT] definition -- beartype.claw just + # warns and leaves the function unchecked (confirmed via minimal repro; no matching + # upstream issue found as of 2026-07-29). Remove once fixed upstream. + "ignore:(?s).*NumPy data type.*invalid.*:beartype.roar.BeartypeClawDecorWarning", "ignore::pandas.errors.PerformanceWarning", ]