Only import Jinja2 when actually used, drop unused Jinja2 extension

--HG--
extra : rebase_source : d0cb9ddbfd1246280be805ef3eba3d8d6fa95dff