Python: jinja2 incompatibility with paths created using pathlib
Problem
When using a clone of the git repository on an Ubuntu Focal Fossa, I get the following error:
root@eole3:~/laboite# ./tools/eole3 --config socle.ini build socle
Traceback (most recent call last):
File "./tools/eole3", line 15, in <module>
sys.exit(cli())
File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3/dist-packages/click/core.py", line 1134, in invoke
Command.invoke(self, ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/root/laboite/tools/src/eole3/options.py", line 19, in wrapper
return func(*args, **kwargs)
File "/root/laboite/tools/src/eole3/options.py", line 34, in wrapper
return func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/root/laboite/tools/src/eole3/commands/build.py", line 31, in build
default_loader = FileSystemLoader(data.templates_dir)
File "/usr/lib/python3/dist-packages/jinja2/loaders.py", line 163, in __init__
self.searchpath = list(searchpath)
TypeError: 'PosixPath' object is not iterable
Proposal
- Set the jinja2 dependency to
>= 2.11.0
as it's solved in that release