Closed lneuhaus closed 1 year ago
see https://github.com/pallets/jinja/blob/05a5f8120a62f2e1da322131c632be2ba8d969fc/src/jinja2/utils.py#L40 - seems one is supposed to use pass_context()
instead of contextfilter
now. And in the tagged github version 3.0.0, this change has already happened, but I suppose the PyPI version 3.0.0 is not that one, but maybe corresponds to tag 3.0.0a1
or so https://github.com/pallets/jinja/blob/3.0.0a1/src/jinja2/utils.py or so, where it's still called contextfilter
.
Ah, I now see this is a duplicate of https://github.com/jupyter/nbconvert/issues/1742, and it belongs there..
When I try using nbsphinx (latest version from pip 0.8.12) together with the latest version of Jinja2 (3.1.2), I get the following error:
I believe jinja2 might have silently broken its public API, or maybe
contextfilter
was never part of that public API, don't know. Maybe there is a workaround here?