Closed renonat closed 7 months ago
I just had the same issue breaking my CI.
As a workaround I pinned nbdime==3.2.1
in my project until this is solved in pytest-notebooks
Thanks for reporting. I probably won't have time to look at this straight away, so any PRs or suggestions on how to fix would be appreciated!
If you want, I can make a quick PR just limiting the nbdime depend to <4
as a workaround to prevent other people being hit by this until a proper fix is done
I just created the PR #60 . Its workflow is pending approval for running
Edit: I filed the PR against the default branch (master
) if you prefer it against develop
or something else, just let me know
suggestions on how to fix would be appreciated!
well, that should be rather straightforward since now instead of predicates
one should pass config
which includes predicates. See the diff from https://github.com/jupyter/nbdime/pull/639, in particular:
- predicates = defaultdict(lambda: [operator.__eq__], {
- '/': [lambda a, b: a['id'] == b['id']],
- })
+ config = DiffConfig(
+ predicates=defaultdict(lambda: [operator.__eq__], {
+ '/': [lambda a, b: a['id'] == b['id']],
+ })
+ )
- ld = diff(b, l, path="", predicates=predicates)
+ ld = diff(b, l, path="", config=config)
Alternatively, nbdime could be patched for backward compatibility re-adding predicates as an optional, deprecated argument (which cannot be passed when config is passed).
Dear Reno, Carlos, and Michał,
thank you very much for your reports and suggestions how to fix this problem. We just submitted GH-62 to make pytest-notebook
compatible with nbdime>=4
.
With kind regards, Andreas.
Thanks for the quick release, Chris. Cheers!
Issue
pytest-notebook
is incompatible withnbdime>=4.0.0
asnbdime.diffing.generic.diff
dropped thepredicates
keyword argument.Notes
nbdime
PR: https://github.com/jupyter/nbdime/pull/639pytest-notebook
usage: https://github.com/chrisjsewell/pytest-notebook/blob/413609804db1568d0dc9024902778be8171d1a2a/pytest_notebook/diffing.py#L82C10-L82C10Stack Trace