From ff3f2270db9dddb7abe3e0bec78bf1d2656f8867 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 11 Jul 2026 23:46:46 +0200 Subject: [PATCH] python3Packages.pytest-mock: fix tests with pytest 9.1 --- pkgs/development/python-modules/pytest-mock/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/python-modules/pytest-mock/default.nix b/pkgs/development/python-modules/pytest-mock/default.nix index 3c03379fceb4..f6a89f265a05 100644 --- a/pkgs/development/python-modules/pytest-mock/default.nix +++ b/pkgs/development/python-modules/pytest-mock/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, + fetchpatch, pytest, pytest-asyncio, pytestCheckHook, @@ -21,6 +22,14 @@ buildPythonPackage rec { hash = "sha256-9h5/cssWs4F0LKnFLjWDsEjB2AYczLvnSjiUdsaEcBQ="; }; + patches = [ + (fetchpatch { + name = "pytest-9.1-compat.patch"; + url = "https://github.com/pytest-dev/pytest-mock/commit/1d42981a1577207db5919852f30ef08c97208496.patch"; + hash = "sha256-9/vQi/VvZRrIUSq1e90MvLB0idkc+tT4R6q1Ut4HKnY="; + }) + ]; + build-system = [ setuptools setuptools-scm