The current async mode happily allows coroutines to be awaited without requiring the await keyword. Whilst this is nice, it is actually quite a confusing and a non-obvious behavior. In addition it doesn't always work, for example {% if coroutine %}, and I'm not sure {% async for ... or {% async with ... work. (Edit: The if statement does work, I'm unsure about async for or async with)
I propose that templating engine understand and require the usage of the async and await keywords dropping the current support for non awaited coroutines.
It would also be nice if the engine did not use any asyncio features so as to be event loop agnostic.
The current async mode happily allows coroutines to be awaited without requiring the
awaitkeyword. Whilst this is nice, it is actually quite a confusing and a non-obvious behavior.In addition it doesn't always work, for example(Edit: The if statement does work, I'm unsure about{% if coroutine %}, and I'm not sure{% async for ...or{% async with ...work.async fororasync with)I propose that templating engine understand and require the usage of the
asyncandawaitkeywords dropping the current support for nonawaited coroutines.It would also be nice if the engine did not use any
asynciofeatures so as to be event loop agnostic.