Skip to content

Commit dd5c432

Browse files
committed
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: plotly/plotly.py#5522 [1] https://docs.pytest.org/en/latest/deprecations.html#py-path-local-arguments-for-hooks-replaced-with-pathlib-path
1 parent cb3f6fa commit dd5c432

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkgs/development/python-modules/plotly/default.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ buildPythonPackage rec {
5252
substituteInPlace pyproject.toml \
5353
--replace-fail '"hatch", ' "" \
5454
--replace-fail "jupyter_packaging~=0.10.0" jupyter_packaging
55+
56+
# `pytest_ignore_collect` takes only `collection_path` starting with
57+
# pytest 9. Most of the paths referenced in `plotly/conftest.py`
58+
# don't exist anymore and wouldn't be collected anyway, so we can just
59+
# remove the file.
60+
# https://docs.pytest.org/en/latest/deprecations.html#py-path-local-arguments-for-hooks-replaced-with-pathlib-path
61+
# Upstream PR: https://github.com/plotly/plotly.py/pull/5521
62+
rm plotly/conftest.py
5563
'';
5664

5765
env.SKIP_NPM = true;

0 commit comments

Comments
 (0)