From 182e420eccd48bea2deb5d7ff9cb450b920a2b85 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 13 Jul 2026 15:01:44 +0200 Subject: [PATCH] python3Packages.filterpy: fix scipy 1.12 deprecation warnings --- .../python-modules/filterpy/default.nix | 7 ++++++- .../filterpy/scipy-1.12-deprecation.patch | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/python-modules/filterpy/scipy-1.12-deprecation.patch diff --git a/pkgs/development/python-modules/filterpy/default.nix b/pkgs/development/python-modules/filterpy/default.nix index 110d3b136b0d..c5417046b1f6 100644 --- a/pkgs/development/python-modules/filterpy/default.nix +++ b/pkgs/development/python-modules/filterpy/default.nix @@ -24,7 +24,12 @@ buildPythonPackage { hash = "sha256-KuuVu0tqrmQuNKYmDmdy+TU6BnnhDxh4G8n9BGzjGag="; }; - patches = [ ./numpy-2.4-compat.patch ]; + patches = [ + ./numpy-2.4-compat.patch + + # https://github.com/rlabbe/filterpy/pull/331 + ./scipy-1.12-deprecation.patch + ]; build-system = [ setuptools ]; diff --git a/pkgs/development/python-modules/filterpy/scipy-1.12-deprecation.patch b/pkgs/development/python-modules/filterpy/scipy-1.12-deprecation.patch new file mode 100644 index 000000000000..ef26dbefafa2 --- /dev/null +++ b/pkgs/development/python-modules/filterpy/scipy-1.12-deprecation.patch @@ -0,0 +1,14 @@ +diff --git a/filterpy/discrete_bayes/discrete_bayes.py b/filterpy/discrete_bayes/discrete_bayes.py +index 084ba8c..c465835 100644 +--- a/filterpy/discrete_bayes/discrete_bayes.py ++++ b/filterpy/discrete_bayes/discrete_bayes.py +@@ -19,8 +19,7 @@ from __future__ import (absolute_import, division, print_function, + unicode_literals) + + import numpy as np +-from scipy.ndimage.filters import convolve +-from scipy.ndimage.interpolation import shift ++from scipy.ndimage import convolve, shift + + + def normalize(pdf):