Skip to content

Commit

Permalink
Fix compatibility issue with Jinja2 2.11.x
Browse files Browse the repository at this point in the history
  • Loading branch information
kblomqvist committed Jan 30, 2021
1 parent b51dd15 commit f56f588
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Minor release (last with Python 2.7 support), 23 Aug 2020
- Fixed an exit code in case of undefined variable from 0 to 1.
- Fixed a bug that caused extension classes not to load.
- Quoted string variable with commas is not converted to list anymore (gh-57).
- Implemented workaround for Jinja 2.11 compatibility issue (gh-60)
- Implemented workaround for Jinja 2.11 compatibility issue (gh-60).
- Added support for INI and CSV file parsing.
- Fixed a bug that caused Yasha to crash when loading file extensions
(regression likely caused by Click).
Expand Down
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
license="MIT",
packages=find_packages(),
include_package_data=True,
python_requires=">=3.5",
install_requires=[
"Click",
"Jinja2<2.11",
"Jinja2>=2.11",
"pytoml",
"pyyaml",
"xmltodict",
Expand All @@ -31,9 +32,6 @@
yasha=yasha.cli:cli
''',
classifiers=[
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Topic :: Software Development :: Code Generators",
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: MIT License",
Expand Down
2 changes: 1 addition & 1 deletion yasha/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def load_extensions(file):

import jinja2.defaults
for name, obj in inspect.getmembers(module):
if name in jinja2.defaults.__all__:
if name in tuple(x for x in dir(jinja2.defaults) if x.isupper()):
setattr(jinja2.defaults, name, obj)

try:
Expand Down

0 comments on commit f56f588

Please sign in to comment.