text = await jinja2.Template(
template, enable_async=True
).render_async()
Traceback:
File ".../lib/python3.11/site-packages/jinja2/environment.py", line 1321, in <listcomp>
[n async for n in self.root_render_func(ctx)] # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<template>", line 4, in top-level template code
File ".../lib/python3.11/site-packages/jinja2/async_utils.py", line 65, in auto_await
return await t.cast("t.Awaitable[V]", value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../lib/python3.11/site-packages/jinja2/filters.py", line 603, in do_join
return sync_do_join(eval_ctx, await auto_to_list(value), d, attribute)
^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../lib/python3.11/site-packages/jinja2/async_utils.py", line 84, in auto_to_list
return [x async for x in auto_aiter(value)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../lib/python3.11/site-packages/jinja2/async_utils.py", line 84, in <listcomp>
return [x async for x in auto_aiter(value)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../lib/python3.11/site-packages/jinja2/async_utils.py", line 77, in auto_aiter
for item in t.cast("t.Iterable[V]", iterable):
File ".../lib/python3.11/site-packages/jinja2/filters.py", line 437, in do_unique
for item in value:
TypeError: 'async_generator' object is not iterable
Unique filter doesn't work when chain with map filter in async variant
Template that reproduces the bug:
Render code:
Traceback:
Environment: