From 550515e68a5b6d6e7dac992730396c2a8d407ea9 Mon Sep 17 00:00:00 2001 From: Tom Hunze Date: Mon, 23 Feb 2026 19:09:55 +0100 Subject: [PATCH] python3Packages.plotly: fix test collection with pytest 9 `pytest_ignore_collect` takes only `collection_path` starting with pytest 9 [1]. Most of the paths referenced in `plotly/conftest.py` don't exist anymore and wouldn't be collected anyway, so we can just remove the file. Upstream PR: https://github.com/plotly/plotly.py/pull/5521 [1] https://docs.pytest.org/en/latest/deprecations.html#py-path-local-arguments-for-hooks-replaced-with-pathlib-path --- pkgs/development/python-modules/plotly/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/python-modules/plotly/default.nix b/pkgs/development/python-modules/plotly/default.nix index 9dd75f482830..ec0a17f33fe9 100644 --- a/pkgs/development/python-modules/plotly/default.nix +++ b/pkgs/development/python-modules/plotly/default.nix @@ -52,6 +52,14 @@ buildPythonPackage rec { substituteInPlace pyproject.toml \ --replace-fail '"hatch", ' "" \ --replace-fail "jupyter_packaging~=0.10.0" jupyter_packaging + + # `pytest_ignore_collect` takes only `collection_path` starting with + # pytest 9. Most of the paths referenced in `plotly/conftest.py` + # don't exist anymore and wouldn't be collected anyway, so we can just + # remove the file. + # https://docs.pytest.org/en/latest/deprecations.html#py-path-local-arguments-for-hooks-replaced-with-pathlib-path + # Upstream PR: https://github.com/plotly/plotly.py/pull/5521 + rm plotly/conftest.py ''; env.SKIP_NPM = true;