Commit Graph

44 Commits

Author SHA1 Message Date
Adam Englander
a3dce7bb64
fix type/lint/format findings 2025-05-28 10:08:39 -07:00
James Addison
f8323cf404
Additional test coverage for async rendering of native type templates (#1807) 2024-07-10 09:14:52 -07:00
Thomas Grainger
1655128cfc
test on trio, fix all missing aclose related warnings (#1960) 2024-05-11 15:01:12 -07:00
David Lord
a150ff749a
add parens around auto_await for filters and calls 2022-03-07 09:14:21 -08:00
David Lord
5308c9588d
drop Python 3.6 2021-11-08 08:07:29 -08:00
Daniel Stone
baff54fe1d
imported macros can access template globals in async mode 2021-10-04 13:49:13 -07:00
David Lord
7d0b7accff
use asyncio.run 2021-05-18 13:22:46 -07:00
David Lord
1932ce3dc4
async support doesn't require patching 2021-04-10 16:12:25 -07:00
remidebette
3642ae7fef
NativeEnvironment supports async mode 2021-04-05 11:36:54 -07:00
Jafnee
3242428c52
add Undefined.__aiter__ 2021-04-05 10:51:29 -07:00
David Lord
a30f92d246
fix new formatting issues 2021-01-30 23:07:30 -08:00
David Lord
0a370316c6
Merge branch '2.11.x' 2020-03-30 11:40:59 -07:00
Bart Feenstra
0fd45a4dc7
namespace object works in async templates 2020-03-30 11:32:34 -07:00
David Lord
e08dadd220
Merge branch '2.11.x' 2020-02-05 20:39:04 -08:00
David Lord
dd5a0508c5
remove custom pytest marks 2020-02-05 20:23:47 -08:00
David Lord
2a8515d2e5
apply pyupgrade and f-strings 2020-02-05 08:44:15 -08:00
Armin Ronacher
15d7e615f4
Added regression test for slicing of attributes 2020-01-30 09:40:14 -08:00
David Lord
4a59ac9514
Revert "rename imports to jinja"
This reverts commit 1167525b73.
2020-01-26 21:12:52 -08:00
David Lord
1167525b73
rename imports to jinja 2020-01-10 15:30:16 -08:00
David Lord
bb6216ea30
apply flake8 2020-01-10 10:40:52 -08:00
David Lord
04c8787155
apply black 2020-01-10 07:54:39 -08:00
David Lord
d177eeb295
apply reorder-python-imports 2020-01-10 07:54:39 -08:00
David Lord
3487c8e087
refactor visit_Output
* `finalize` is generated once and cached for all nodes.
* Extract common behavior for native env.

Removed the compiler behavior where groups of nodes would generate a
format string. Instead, individual nodes are always yielded. This made
rendering 30% faster in the examples, and simplifies the code. It also
removes the issue where Python would report either the first or last
line of the multi-line format expression, messing up the traceback line
number mapping.
2019-11-20 14:09:44 -08:00
David Lord
4d0949b308
async templates await attribute access 2019-11-07 19:05:16 -08:00
Kevin Brown
ca72c5f301 Replaced try...catch within tests with pytest.raises
This still leaves one in test_debug which relies on reading out
the traceback and cannot easily be replaced by pytest.raises
like the others.
2019-10-10 02:32:29 -04:00
Adrian Moennich
bc076b3e25 Add changed() to loop context 2017-06-24 10:52:06 +02:00
Adrian Moennich
9bdb547b0e Add previtem/nextitem to loop context
related: #641
2017-06-24 10:52:06 +02:00
Armin Ronacher
add79164c4 Fixed async macro autoescape. Fixes #671 2017-01-28 15:33:09 +01:00
Armin Ronacher
8df94bd344 Resolved extends errors in async mode (Fixes #668) 2017-01-24 20:22:19 +01:00
Armin Ronacher
ef718011e5 Correctly scope loop filters. Fixes #649 2017-01-09 12:23:18 +01:00
Adrian Moennich
04b30cdd5c Remove unused/duplicate imports 2017-01-09 00:21:45 +01:00
Armin Ronacher
7265e6f9f3 Make tests pass on older python versions again 2016-12-28 21:54:33 +01:00
Armin Ronacher
acab87a436 Support the same set of loop functions for async mode 2016-12-28 21:49:00 +01:00
Armin Ronacher
d4e14fc4d2 Added support for async loop context 2016-12-28 20:06:34 +01:00
Armin Ronacher
aa188fd860 Added basic support for async iter 2016-12-28 17:08:21 +01:00
Armin Ronacher
3e6992f271 Wrap generate to support async mode 2016-12-28 16:11:09 +01:00
Armin Ronacher
1c9ebf16e5 Auto skip async tests for imports 2016-12-28 16:08:07 +01:00
Armin Ronacher
63d732440b Added tests for async functionality with imports and includes 2016-12-28 15:55:54 +01:00
Armin Ronacher
7c90534875 Restore original render func for non async usage 2016-12-28 14:38:58 +01:00
Armin Ronacher
2b4d44b9b5 Basic async support for blocks 2016-12-28 14:37:56 +01:00
Armin Ronacher
62989728cd Improved async test 2016-12-28 13:33:37 +01:00
Armin Ronacher
9853794a6b Added test for macro async support 2016-12-28 13:32:42 +01:00
Armin Ronacher
d1b8f08470 Automatically await on function calls if necessary 2016-12-28 13:18:20 +01:00
Armin Ronacher
b11056d780 Initial support for async rendering 2016-12-28 12:40:42 +01:00