Matt Martz
ba080f51e0
use soft_str in do_wordcount, to trigger undefined
2020-02-27 11:06:35 -08:00
David Lord
1164cc3617
fix formatting
2020-02-05 14:31:20 -08:00
David Lord
0166b4c8b8
fix formatting
2020-02-05 14:29:52 -08:00
David Lord
b0015c72d5
remove deprecated code
2020-02-05 08:37:40 -08:00
David Lord
0c75d48058
Merge branch '2.11.x'
2020-02-05 08:37:15 -08:00
David Lord
04294999c7
add changelog and test
2020-02-04 08:57:39 -08:00
David Lord
547e6e39ec
Merge branch '2.11.x'
2020-01-30 09:56:19 -08:00
David Lord
d61c1ea70b
add changelog
2020-01-30 09:50:36 -08:00
David Lord
4b8d839e1e
start version 3.0.0
2020-01-27 13:51:27 -08:00
David Lord
bbdafe33ce
release version 2.11.0
2020-01-27 10:24:29 -08:00
David Lord
9ff27f64a9
add python 3.8 classifier, clean up changelog
2020-01-26 22:24:57 -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
Andrew Rabert
b23a0dec2d
TemplateSyntaxError can be pickled
2020-01-08 11:14:52 -08:00
David Lord
2ec62dc414
handle Undefined in get/select_template
2019-12-05 13:46:36 -08:00
David Lord
d2e0e78afe
PackageLoader understands namespace packages
2019-12-05 07:06:09 -08:00
David Lord
2b0d1ed921
TemplateSyntaxError from included template has source
2019-12-03 13:22:10 -08:00
David Lord
d4aff1fc0b
apply optimizer to all Expr nodes
2019-12-03 09:08:37 -08:00
Daniel Watkins
1539dd418a
add a node for derived context references
...
This allows extensions to access locals in the scope from which they
were called.
2019-12-02 14:03:12 -08:00
David Lord
cfb789adc8
rewrite traceback rewriting support
...
Simplify the `jinja.debug` code.
On Python >= 3.7, `tb_next` is directly assignable. On PyPy, use
transparent proxies only if support is enabled. For cpython < 3.7, use
ctypes to set `tb_next`. Rewrite the ctypes code to use `py_object` and
`pythonapi.Py_IncRef`, which seems to avoid crashing on debug builds.
On Python 3, a rewritten `TemplateSyntaxError` would retain the frames
from the compiler functions for some reason. Clear these so the template
source is the last thing in the traceback.
2019-12-02 12:58:18 -08:00
David Lord
1f37d5f0d4
add test and changelog for constant comparison folding
2019-11-20 06:55:16 -08:00
Adriano Scoditti
70ea1d3e22
use 'callable' instead of typechecking to inject context
2019-11-20 06:16:05 -08:00
David Lord
4d0949b308
async templates await attribute access
2019-11-07 19:05:16 -08:00
Alessandro -oggei- Ogier
2edcf7db4b
add break_on_hyphens parameter to wordwrap filter
2019-11-01 08:35:01 -07:00
David Lord
f6e539831f
reformat, doc, and test for wordwrap
2019-11-01 08:08:38 -07:00
David Lord
1db7d51366
compile writes utf8
2019-10-28 09:39:37 -07:00
David Lord
32027ea0e6
creating a NativeTemplate creates a NativeEnvironment
2019-10-28 09:00:01 -07:00
David Lord
7ca03082c5
don't create a third queue
2019-10-24 07:54:38 -07:00
Ryan Siemens
39d2e2254a
LRUCache.copy initializes queue methods
2019-10-24 07:47:20 -07:00
David Lord
57626a000a
use "Jinja" instead of "Jinja2"
2019-10-23 12:35:53 -07:00
David Lord
e5c042bb7f
preserve quotes between nodes in native env
2019-10-22 12:58:17 -07:00
David Lord
b43531f8d8
use fspath instead of str
2019-10-21 07:37:26 -07:00
Alex Chan
12307960dc
support pathlib in FileSystemLoader and ModuleLoader
2019-10-21 06:13:58 -07:00
David Lord
4b6077a8c0
PackageLoader doesn't depend on setuptools
2019-10-17 11:08:19 -07:00
aayushuppal
ef1a4c698c
fixing LoopContext, loops indexing and iterator length property
2019-10-14 09:11:13 -07:00
David Lord
468b2df4c1
reformat changelog
2019-10-14 07:03:03 -07:00
Adrian Moennich
4d331a0ae3
Don't make cond_expr_undefined configurable
2019-10-13 16:54:35 +02:00
Adrian Moennich
c4d39969e2
Use separate undefined object for CondExpr
2019-10-13 16:32:02 +02:00
David Lord
aaf13a231c
skip template with same name as directory
...
When using multiple paths with FileSystemLoader, a template with the
same name as a directory will not prevent loading a template in the
directory.
2019-10-13 06:42:44 -07:00
David Lord
719537aeec
don't finalize TemplateData nodes
...
Finalize only applies to the output of expressions (constant or not).
Add tests for context, eval, and env finalize functions.
2019-10-12 21:25:48 -07:00
Dag Wieers
9bd3cb22c1
Add more strict type tests
...
This PR adds a few more type-related tests.
- boolean
Testing of an object is a boolean required 2 tests.
- false
Make this similar to testing none value
- true
Make this similar to testing none value
- integer
The existing 'number' test does not make a distinction between
integer, float or even booleans
- float
The existing 'number' test does not make a distinction between
integer, float or even booleans
2019-10-09 20:02:28 -07:00
David Lord
0a4dad6031
add changelog for #938
2019-10-07 07:42:04 -07:00
David Lord
c8b1b020c0
add changelog for #858
2019-10-06 23:42:36 -07:00
David Lord
5e645ab25c
document debug extension
2019-10-04 19:13:39 -07:00
David Lord
e68d9b8705
Merge branch '2.10.x'
2019-10-04 12:53:44 -07:00
Josh Holland
b5adc65c22
Fix incorrect release date for 2.10.3
2019-10-04 12:44:46 -07:00
David Lord
f179cf8c71
Merge pull request #828 from chamini2/trim-more
...
Add chars option to trim
2019-10-04 12:01:37 -07:00
David Lord
544c2e9501
Merge branch '2.10.x'
2019-10-04 11:59:18 -07:00
David Lord
c6a71f9545
release version 2.10.3
2019-10-04 11:50:02 -07:00
Matteo Ferrando
9a5d522cb5
add chars option to trim
2019-10-04 11:46:04 -07:00
David Lord
38165dfeba
Merge branch '2.10.x'
2019-10-04 11:22:50 -07:00
David Lord
0fee409131
release version 2.10.2
2019-10-04 11:18:56 -07:00
EtiennePelletier
065b58fc74
Prevent deadlock in LRUCache.setdefault
...
setdefault was acquiring write_lock, then calling getitem and also
potentially setitem, which also both try to acquire the write lock.
2019-10-04 07:58:58 -07:00
David Lord
436f00b776
Merge branch '2.10.x'
2019-09-04 08:25:09 -07:00
Victor Stinner
3a86ef3d72
Fix TracebackFrameProxy.set_next() on Python 3.7
...
Fix issue #1050 : fix a crash in TracebackFrameProxy.set_next() on
Python 3.7 and newer, when Python is build in debug mode.
Since Python 3.7, traceback.tb_next field can be modified: ctypes is
no longer needed.
2019-09-04 07:40:52 -07:00
David Lord
9550dc85ff
Merge branch '2.10.x'
2019-07-26 15:21:16 -07:00
David Lord
288dd42f57
Merge branch '2.9.x' into docs
2019-07-26 15:01:03 -07:00
David Lord
90756da7b6
reformat readme
2019-07-26 14:36:55 -07:00
David Lord
06696563d7
fix linkcheck issues
2019-07-26 12:12:41 -07:00
David Lord
f77b09d998
modernize docs config, use pallets-sphinx-themes
2019-07-26 11:41:08 -07:00
David Lord
733851eda0
clean up numeric underscore support
...
add changelog
clean up docs
parametrize tests
explain float regex
2019-07-23 11:07:09 -07:00
David Lord
483b62eec2
clean up scientific notation support
...
add changelog
clean up docs
parametrize tests
2019-07-23 08:19:51 -07:00
Brendan
f7b110cbd0
exclude globals from find_undeclared_variables
2019-07-22 10:43:47 -07:00
David Lord
81783615ea
Merge branch 'master' into 557-map-default
2019-07-22 10:30:10 -07:00
Brendan
8b09b03aa0
Adding a default parameter to builtin map filter
2019-07-22 09:43:13 -07:00
Prakhar Bhandari
35fcd9fef2
sandbox uses xrange on Python 2
2019-07-22 08:30:22 -07:00
Kevin
2319cd5409
add default to map filter
2019-07-22 07:38:50 -07:00
Mark Roth
1e71e31512
Allow '{%+' to be valid syntax (but NOP) when lstrip_blocks == False. Fixes #748 .
2019-07-20 14:18:56 -07:00
David Lord
13cc9f410c
Merge branch '2.10.x'
2019-07-20 14:03:04 -07:00
Juan Barreneche
4b1cae9c60
Add python 3.7 deprecation warning fix to changelog
2019-06-18 10:51:55 -03:00
Étienne Pelletier
19133d4059
Add ChainableUndefined allowing getattr & getitem ( #997 )
...
* Add ChainableUndefined allowing getattr & getitem
Allows using default values with chains of items or attributes that may
contain undefined values without raising a jinja2.exceptions.UndefinedError.
>>> import jinja2
>>> env = jinja2.Environment(undefined=jinja2.ChainableUndefined)
>>> env.from_string("{{ foo.bar['baz'] | default('val') }}").render()
'val'
* Remove class decorator from ChainableUndefined
2019-05-08 10:47:33 -04:00
David Lord
fd89fed745
Merge branch '2.10.x'
2019-04-06 13:12:56 -07:00
David Lord
c4c4088945
release 2.10.1
2019-04-06 11:02:53 -07:00
Armin Ronacher
7e417c5c6e
Update CHANGES.rst
2019-02-18 08:15:10 +01:00
Florian Bruhin
5425921899
Also drop Python 2.6
2018-06-27 21:48:02 +02:00
Florian Bruhin
d1fb22fd45
Drop Python 3.3 support
...
It's currently broken on Travis (as it was dropped in 'wheel'), so continuing to
support it is probably not worth the pain.
2018-06-27 16:13:52 +02:00
David Lord
989a7db234
add changelog
...
fix unrelated docs issue
2018-02-06 07:48:10 -08:00
Unknown
778ccb22e9
Trivial typos
...
Most non-user facing.
2017-11-08 20:02:28 -05:00
David Lord
b2dd36b60f
Bump version number to 2.11.dev
2017-11-08 12:02:36 -08:00
David Lord
d9d3fc32f0
clean up MANIFEST.in
...
clean up make-release.py for py3
add rst extension to CHANGES for GitHub
clean up changelog formatting
2017-11-08 10:53:47 -08:00