From cdbdd9f92433b2bbaf9bf450e607372bf0dd278b Mon Sep 17 00:00:00 2001 From: aleksana Date: Wed, 24 Dec 2025 10:52:54 +0800 Subject: [PATCH] python314Packages.coverage: fix test_coverage_stop_in_threads --- pkgs/development/python-modules/coverage/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/development/python-modules/coverage/default.nix b/pkgs/development/python-modules/coverage/default.nix index af2fdd133c1d..61ca6abc8c44 100644 --- a/pkgs/development/python-modules/coverage/default.nix +++ b/pkgs/development/python-modules/coverage/default.nix @@ -4,6 +4,7 @@ buildPythonPackage, isPy312, fetchFromGitHub, + fetchpatch, flaky, hypothesis, pytest-xdist, @@ -25,6 +26,17 @@ buildPythonPackage rec { hash = "sha256-2i01Jlk4oj/0WhoYE1BgeKKjZK3YpEOrGHEgNhTruR4="; }; + patches = [ + # test: correctly default the core being tested + # This fixes test_coverage_stop_in_threads + # https://github.com/coveragepy/coveragepy/issues/2109 + (fetchpatch { + url = "https://github.com/coveragepy/coveragepy/commit/2f2e540709371f6184c2731f6d076bc782d37a3d.patch"; + hash = "sha256-lwQ8OM9OWZAwrjExuPeGKSLEF+pYhgDHyAlgXzHiQ0M="; + excludes = [ "CHANGES.rst" ]; + }) + ]; + build-system = [ setuptools ]; optional-dependencies = {