An alternative would be to use a separate node type to provide the locals, but playing with that locally I just ended up doing the context.derive(locals) call myself; I don't know if there are many cases where extension authors would want the locals without the rest of the context, which is (I think) the only use case that approach would enable that the above diff doesn't.
As far as I can tell, there is no way for extensions to access local variables from their call site, they can only access the template context (which, for example, excludes loop-local variables).
Using the extension at https://review.openstack.org/#/c/568021/5/jenkins_jobs/jinja2_extension.py, and
contextpassed by a ContextReference in
yis in the context, but none of
The text was updated successfully, but these errors were encountered: