Skip to content

Commit

Permalink
Merge pull request #19 from dvorst/fix_import_latest_version_jinja2
Browse files Browse the repository at this point in the history
fix: fixes import error when importing jinja2 > 3.0.3,
  • Loading branch information
lopuhin committed May 11, 2022
2 parents 6963707 + f0e858b commit 58e7b69
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions eli5/formatters/html.py
Expand Up @@ -19,9 +19,7 @@
from .text_helpers import prepare_weighted_spans, PreparedWeightedSpans


template_env = Environment(
loader=PackageLoader('eli5', 'templates'),
extensions=['jinja2.ext.with_'])
template_env = Environment(loader=PackageLoader('eli5', 'templates'))
template_env.globals.update(dict(zip=zip, numpy=np))
template_env.filters.update(dict(
weight_color=lambda w, w_range: format_hsl(weight_color_hsl(w, w_range)),
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Expand Up @@ -3,6 +3,6 @@ scipy
singledispatch >= 3.4.0.3
scikit-learn >= 0.20
attrs > 16.0.0
jinja2
jinja2 >= 3.0.0
pip >= 8.1
setuptools >= 20.7
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -32,7 +32,7 @@ def get_long_description():
packages=find_packages(exclude=['tests']),
install_requires=[
'attrs > 17.1.0',
'jinja2',
'jinja2 >= 3.0.0',
'numpy >= 1.9.0',
'scipy',
'six',
Expand Down

0 comments on commit 58e7b69

Please sign in to comment.