]> git.ipfire.org Git - thirdparty/jinja.git/log
thirdparty/jinja.git
5 years agodo_dictsort: update example ready to copy/paste 1209/head
Mark Hansen [Sat, 16 May 2020 07:07:59 +0000 (17:07 +1000)] 
do_dictsort: update example ready to copy/paste

When iterating over a dict you usually want to pull out the keys and values.

5 years agofix changelog header
David Lord [Mon, 13 Apr 2020 16:20:59 +0000 (09:20 -0700)] 
fix changelog header

5 years agorelease version 2.11.2 2.11.2
David Lord [Mon, 13 Apr 2020 16:12:19 +0000 (09:12 -0700)] 
release version 2.11.2

5 years agoMerge pull request #1190 from pallets/native-eval
David Lord [Mon, 13 Apr 2020 15:56:37 +0000 (08:56 -0700)] 
Merge pull request #1190 from pallets/native-eval

native only evals at end of render

5 years agonative only evals at end of render 1190/head
David Lord [Mon, 13 Apr 2020 15:25:49 +0000 (08:25 -0700)] 
native only evals at end of render

Co-authored-by: Martin Krizek <mkrizek@redhat.com>
5 years agoMerge pull request #1183 from exponea/1138-fix-unintended-lstrip-behavior-change
David Lord [Mon, 13 Apr 2020 14:09:31 +0000 (07:09 -0700)] 
Merge pull request #1183 from exponea/1138-fix-unintended-lstrip-behavior-change

Fix unintended lstrip_blocks behavior

5 years agoAdd tests for lstrip whitespace behavior fix 1183/head
Peter Dolak [Fri, 3 Apr 2020 09:29:28 +0000 (11:29 +0200)] 
Add tests for lstrip whitespace behavior fix

Also did peformance tests for the previous fix and saw no measurable
impact.

5 years agoFix unintended lstrip_blocks behavior. Fixes #1138
Peter Dolak [Thu, 2 Apr 2020 14:55:57 +0000 (16:55 +0200)] 
Fix unintended lstrip_blocks behavior. Fixes #1138

Introduced in #858. Tests will follow, also results of performance
testing.

5 years agoMerge tag '2.11.1' into 2.11.x
David Lord [Wed, 8 Apr 2020 15:52:03 +0000 (08:52 -0700)] 
Merge tag '2.11.1' into 2.11.x

5 years agoMerge pull request #1181 from bartfeenstra/async-namespace
David Lord [Mon, 30 Mar 2020 18:34:13 +0000 (11:34 -0700)] 
Merge pull request #1181 from bartfeenstra/async-namespace

Allow namespaces to be used in asynchronously rendered templates.

5 years agonamespace object works in async templates 1181/head
Bart Feenstra [Sat, 28 Mar 2020 16:18:58 +0000 (16:18 +0000)] 
namespace object works in async templates

5 years agoMerge pull request #1178 from avli/fix-lexer-lineno
David Lord [Mon, 30 Mar 2020 18:23:11 +0000 (11:23 -0700)] 
Merge pull request #1178 from avli/fix-lexer-lineno

Fix tokens line number calculation when whitespace stripping is used

5 years agoFix tokens line number calculation when whitespace stripping is used 1178/head
Andrey Lisin [Fri, 27 Mar 2020 10:20:01 +0000 (13:20 +0300)] 
Fix tokens line number calculation when whitespace stripping is used

5 years agoMerge pull request #1182 from pallets/revert-package-loader
David Lord [Mon, 30 Mar 2020 17:34:13 +0000 (10:34 -0700)] 
Merge pull request #1182 from pallets/revert-package-loader

Revert dropping pkg_resources from PackageLoader for 2.11

5 years agochangelog for reverting PackageLoader changes 1182/head
David Lord [Mon, 30 Mar 2020 17:22:51 +0000 (10:22 -0700)] 
changelog for reverting PackageLoader changes

5 years agoRevert "PackageLoader doesn't depend on setuptools"
David Lord [Mon, 30 Mar 2020 17:11:22 +0000 (10:11 -0700)] 
Revert "PackageLoader doesn't depend on setuptools"

This reverts commit 4b6077a8c0a0f56bb8dbac37f8f9027130b4091c.

5 years agoRevert "PackageLoader understands namespace packages"
David Lord [Mon, 30 Mar 2020 16:55:51 +0000 (09:55 -0700)] 
Revert "PackageLoader understands namespace packages"

This reverts commit d2e0e78afe7c6ae864a20c2cc29e80936cff47af.

5 years agoMerge pull request #1179 from pallets/undefined-recursion
David Lord [Fri, 27 Mar 2020 17:05:12 +0000 (10:05 -0700)] 
Merge pull request #1179 from pallets/undefined-recursion

AttributeError in undefined message doesn't cause RuntimeError

5 years agoAttributeError in undefined message doesn't cause RuntimeError 1179/head
David Lord [Fri, 27 Mar 2020 16:51:53 +0000 (09:51 -0700)] 
AttributeError in undefined message doesn't cause RuntimeError

5 years agoMerge pull request #1163 from pallets/traceback-32-bit
David Lord [Sat, 29 Feb 2020 03:08:10 +0000 (19:08 -0800)] 
Merge pull request #1163 from pallets/traceback-32-bit

better PyObject_HEAD size calculation

5 years agobetter PyObject_HEAD size calculation 1163/head
David Lord [Sat, 29 Feb 2020 02:50:00 +0000 (18:50 -0800)] 
better PyObject_HEAD size calculation

fixes infinite loop on Python 3.6 32-bit

5 years agoMerge pull request #1161 from ldealmei/patch-1
David Lord [Fri, 28 Feb 2020 16:02:50 +0000 (08:02 -0800)] 
Merge pull request #1161 from ldealmei/patch-1

Add link to template designer documentation

5 years agoAdd link to template designer documentation 1161/head
ldealmei [Fri, 28 Feb 2020 15:29:26 +0000 (16:29 +0100)] 
Add link to template designer documentation

For those who were actually looking for the template design documentation putting a link directly to it might prevent them to have to google for it. When on the API page, there is no direct way to find the template design documentation. Hope this can help others.

5 years agoMerge pull request #1160 from sivel/wordcount-soft-str
David Lord [Thu, 27 Feb 2020 19:10:31 +0000 (11:10 -0800)] 
Merge pull request #1160 from sivel/wordcount-soft-str

Use soft_str in do_wordcount, to trigger undefined

5 years agouse soft_str in do_wordcount, to trigger undefined 1160/head
Matt Martz [Thu, 27 Feb 2020 18:46:58 +0000 (12:46 -0600)] 
use soft_str in do_wordcount, to trigger undefined

5 years agoMerge pull request #1149 from davidbrochart/fix_doc
David Lord [Sat, 8 Feb 2020 19:12:55 +0000 (11:12 -0800)] 
Merge pull request #1149 from davidbrochart/fix_doc

5 years agorewrite async discussion 1149/head
David Lord [Sat, 8 Feb 2020 19:07:18 +0000 (11:07 -0800)] 
rewrite async discussion

5 years agoFix async doc
David Brochart [Fri, 7 Feb 2020 12:30:35 +0000 (13:30 +0100)] 
Fix async doc

5 years agoremove custom pytest marks
David Lord [Thu, 6 Feb 2020 04:23:47 +0000 (20:23 -0800)] 
remove custom pytest marks

5 years agoMerge pull request #1146 from tomaskrizek/stricter-getattr-checks
David Lord [Tue, 4 Feb 2020 17:01:50 +0000 (09:01 -0800)] 
Merge pull request #1146 from tomaskrizek/stricter-getattr-checks

Use stricter getattr() checks for decorator functions

5 years agoadd changelog and test 1146/head
David Lord [Tue, 4 Feb 2020 16:46:53 +0000 (08:46 -0800)] 
add changelog and test

5 years agoUse stricter getattr() checks for decorator functions
Tomas Krizek [Mon, 3 Feb 2020 22:25:56 +0000 (23:25 +0100)] 
Use stricter getattr() checks for decorator functions

Explicit checks for "is True" prevents unexpected behaviour with objects
that are callable and have permissive gettatr(), such as Mock.

Fixes #1145

5 years agorelease version 2.11.1 2.11.1
David Lord [Thu, 30 Jan 2020 18:05:29 +0000 (10:05 -0800)] 
release version 2.11.1

5 years agoMerge pull request #1143 from pallets/bugfix/attribute-access
David Lord [Thu, 30 Jan 2020 17:54:44 +0000 (09:54 -0800)] 
Merge pull request #1143 from pallets/bugfix/attribute-access

Fix attribute access in async code.

5 years agoadd changelog 1143/head
David Lord [Thu, 30 Jan 2020 17:50:36 +0000 (09:50 -0800)] 
add changelog

5 years agoAdded regression test for slicing of attributes
Armin Ronacher [Thu, 30 Jan 2020 17:16:38 +0000 (18:16 +0100)] 
Added regression test for slicing of attributes

5 years agoFix attribute access in async code. Fixes #1141
Armin Ronacher [Thu, 30 Jan 2020 17:14:22 +0000 (18:14 +0100)] 
Fix attribute access in async code. Fixes #1141

5 years agorelease version 2.11.0 2.11.0
David Lord [Mon, 27 Jan 2020 18:24:29 +0000 (10:24 -0800)] 
release version 2.11.0

5 years agoadd python 3.8 classifier, clean up changelog
David Lord [Mon, 27 Jan 2020 06:24:57 +0000 (22:24 -0800)] 
add python 3.8 classifier, clean up changelog

5 years agoisolate bytecode cache tests
David Lord [Mon, 27 Jan 2020 06:24:38 +0000 (22:24 -0800)] 
isolate bytecode cache tests

5 years agoimport Markup from markupsafe, fix flake8 import warnings
David Lord [Mon, 27 Jan 2020 06:23:36 +0000 (22:23 -0800)] 
import Markup from markupsafe, fix flake8 import warnings

5 years agoincrement bytecode cache version
David Lord [Mon, 27 Jan 2020 06:22:11 +0000 (22:22 -0800)] 
increment bytecode cache version

5 years agoremove test and coverage results from ci
David Lord [Mon, 27 Jan 2020 06:21:08 +0000 (22:21 -0800)] 
remove test and coverage results from ci

5 years agoMerge pull request #1133 from pallets/revert-rename
David Lord [Mon, 27 Jan 2020 05:22:29 +0000 (21:22 -0800)] 
Merge pull request #1133 from pallets/revert-rename

Revert "Rename to Jinja"

5 years agoRevert "rename directory to jinja" 1133/head
David Lord [Mon, 27 Jan 2020 05:12:53 +0000 (21:12 -0800)] 
Revert "rename directory to jinja"

This reverts commit eac9acb7aeabf6f3e0ed4cb876e200e5e72d0d0e.

5 years agoRevert "rename imports to jinja"
David Lord [Mon, 27 Jan 2020 05:12:52 +0000 (21:12 -0800)] 
Revert "rename imports to jinja"

This reverts commit 1167525b73863119f8bbec03ddb9d35eacff4bef.

5 years agoRevert "add warning and alias for jinja2"
David Lord [Mon, 27 Jan 2020 05:12:47 +0000 (21:12 -0800)] 
Revert "add warning and alias for jinja2"

This reverts commit fc9c60ba457efc4cadf6fa2886567e0ee6ca1a99.

5 years agoextract jinja2-compat to separate repo
David Lord [Sat, 11 Jan 2020 00:54:34 +0000 (16:54 -0800)] 
extract jinja2-compat to separate repo

5 years agoMerge pull request #1121 from pallets/the-great-rename
David Lord [Sat, 11 Jan 2020 00:15:25 +0000 (16:15 -0800)] 
Merge pull request #1121 from pallets/the-great-rename

Rename jinja2 to jinja

5 years agoadd warning and alias for jinja2 1121/head
David Lord [Fri, 10 Jan 2020 22:40:27 +0000 (14:40 -0800)] 
add warning and alias for jinja2

5 years agorename imports to jinja
David Lord [Fri, 10 Jan 2020 22:19:48 +0000 (14:19 -0800)] 
rename imports to jinja

5 years agorename directory to jinja
David Lord [Fri, 10 Jan 2020 21:52:24 +0000 (13:52 -0800)] 
rename directory to jinja

5 years agoMerge pull request #1125 from pallets/style
David Lord [Fri, 10 Jan 2020 23:12:20 +0000 (15:12 -0800)] 
Merge pull request #1125 from pallets/style

move to src directory, add pre-commit

5 years agosimplify module docstrings 1125/head
David Lord [Fri, 10 Jan 2020 21:42:02 +0000 (13:42 -0800)] 
simplify module docstrings

5 years agoremove old scripts and examples
David Lord [Fri, 10 Jan 2020 20:58:38 +0000 (12:58 -0800)] 
remove old scripts and examples

5 years agoadd py 3.8 and style to tests
David Lord [Fri, 10 Jan 2020 20:44:39 +0000 (12:44 -0800)] 
add py 3.8 and style to tests

5 years agomore relative imports
David Lord [Fri, 10 Jan 2020 19:10:19 +0000 (11:10 -0800)] 
more relative imports

_identifier exports a compiled regex instead of a string to avoid some
tricky cleanup

5 years agoensure deprecation warnings mention version
David Lord [Fri, 10 Jan 2020 18:46:52 +0000 (10:46 -0800)] 
ensure deprecation warnings mention version

5 years agoapply flake8
David Lord [Fri, 10 Jan 2020 18:40:52 +0000 (10:40 -0800)] 
apply flake8

5 years agoapply black
David Lord [Fri, 10 Jan 2020 15:46:18 +0000 (07:46 -0800)] 
apply black

5 years agoapply reorder-python-imports
David Lord [Thu, 9 Jan 2020 20:03:07 +0000 (12:03 -0800)] 
apply reorder-python-imports

5 years agoadd pre-commit config
David Lord [Thu, 9 Jan 2020 20:02:54 +0000 (12:02 -0800)] 
add pre-commit config

5 years agomove to src directory
David Lord [Thu, 9 Jan 2020 18:38:52 +0000 (10:38 -0800)] 
move to src directory

5 years agoMerge pull request #1117 from nvllsvm/fix_exc_pickle
David Lord [Wed, 8 Jan 2020 20:09:37 +0000 (12:09 -0800)] 
Merge pull request #1117 from nvllsvm/fix_exc_pickle

Fix TemplateSyntaxError pickling

5 years agoTemplateSyntaxError can be pickled 1117/head
Andrew Rabert [Fri, 13 Dec 2019 21:24:50 +0000 (16:24 -0500)] 
TemplateSyntaxError can be pickled

5 years agoMerge pull request #1122 from blueyed/vim-indent
David Lord [Mon, 6 Jan 2020 13:45:31 +0000 (05:45 -0800)] 
Merge pull request #1122 from blueyed/vim-indent

ext/Vim/jinja.vim: minor fixes

5 years agoMerge pull request #1123 from blueyed/fix-typo
David Lord [Mon, 6 Jan 2020 13:45:09 +0000 (05:45 -0800)] 
Merge pull request #1123 from blueyed/fix-typo

minor: fix typo in docstring

5 years agominor: fix typo in docstring 1123/head
Daniel Hahler [Mon, 6 Jan 2020 13:30:45 +0000 (14:30 +0100)] 
minor: fix typo in docstring

5 years agoext/Vim/jinja.vim: fix issues reported by vint 1122/head
Daniel Hahler [Mon, 6 Jan 2020 13:29:46 +0000 (14:29 +0100)] 
ext/Vim/jinja.vim: fix issues reported by vint

5 years agoext/Vim/jinja.vim: fix indent
Daniel Hahler [Mon, 6 Jan 2020 13:28:42 +0000 (14:28 +0100)] 
ext/Vim/jinja.vim: fix indent

5 years agoMerge pull request #1115 from myii/patch-2
David Lord [Sun, 8 Dec 2019 15:07:29 +0000 (07:07 -0800)] 
Merge pull request #1115 from myii/patch-2

 fix typo in templates.rst, "hat" to "that"

5 years agofix(templates.rst): fix typo (`hat` => `that`) 1115/head
Imran Iqbal [Sun, 8 Dec 2019 14:21:03 +0000 (14:21 +0000)] 
fix(templates.rst): fix typo (`hat` => `that`)

5 years agoMerge pull request #1114 from pallets/import-undefined
David Lord [Thu, 5 Dec 2019 21:50:42 +0000 (13:50 -0800)] 
Merge pull request #1114 from pallets/import-undefined

handle Undefined in get/select_template

5 years agohandle Undefined in get/select_template 1114/head
David Lord [Thu, 5 Dec 2019 21:46:36 +0000 (13:46 -0800)] 
handle Undefined in get/select_template

5 years agoMerge pull request #1113 from pallets/namespace-loader
David Lord [Thu, 5 Dec 2019 15:25:11 +0000 (07:25 -0800)] 
Merge pull request #1113 from pallets/namespace-loader

PackageLoader understands namespace packages

5 years agoPackageLoader understands namespace packages 1113/head
David Lord [Thu, 5 Dec 2019 15:05:45 +0000 (07:05 -0800)] 
PackageLoader understands namespace packages

5 years agoMerge pull request #1112 from pallets/include-syntax-error-source
David Lord [Tue, 3 Dec 2019 21:25:57 +0000 (13:25 -0800)] 
Merge pull request #1112 from pallets/include-syntax-error-source

TemplateSyntaxError from included template has source

5 years agoTemplateSyntaxError from included template has source 1112/head
David Lord [Tue, 3 Dec 2019 20:54:56 +0000 (12:54 -0800)] 
TemplateSyntaxError from included template has source

5 years agoMerge pull request #1111 from pallets/optimizer-nodes
David Lord [Tue, 3 Dec 2019 17:13:39 +0000 (09:13 -0800)] 
Merge pull request #1111 from pallets/optimizer-nodes

apply optimizer to all Expr nodes

5 years agoapply optimizer to all Expr nodes 1111/head
David Lord [Tue, 3 Dec 2019 16:57:41 +0000 (08:57 -0800)] 
apply optimizer to all Expr nodes

5 years agoMerge pull request #861 from OddBloke/contextreference_locals
David Lord [Mon, 2 Dec 2019 22:07:08 +0000 (14:07 -0800)] 
Merge pull request #861 from OddBloke/contextreference_locals

Add a DerivedContextReference node type

5 years agoadd a node for derived context references 861/head
Daniel Watkins [Fri, 1 Jun 2018 21:16:29 +0000 (17:16 -0400)] 
add a node for derived context references

This allows extensions to access locals in the scope from which they
were called.

5 years agoMerge pull request #1110 from pallets/patch-traceback
David Lord [Mon, 2 Dec 2019 21:07:56 +0000 (13:07 -0800)] 
Merge pull request #1110 from pallets/patch-traceback

rewrite traceback rewriting support

5 years agorewrite traceback rewriting support 1110/head
David Lord [Mon, 2 Dec 2019 20:58:18 +0000 (12:58 -0800)] 
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.

5 years agoMerge pull request #1109 from pallets/visit-output-refactor
David Lord [Wed, 20 Nov 2019 22:44:22 +0000 (14:44 -0800)] 
Merge pull request #1109 from pallets/visit-output-refactor

refactor visit_Output

5 years agorefactor visit_Output 1109/head
David Lord [Wed, 20 Nov 2019 20:38:16 +0000 (12:38 -0800)] 
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.

5 years agoMerge pull request #1105 from areebbeigh/issue-1102
David Lord [Wed, 20 Nov 2019 14:58:20 +0000 (06:58 -0800)] 
Merge pull request #1105 from areebbeigh/issue-1102

nodes.py: Return on first false in Compare() expr

5 years agoadd test and changelog for constant comparison folding 1105/head
David Lord [Wed, 20 Nov 2019 14:55:16 +0000 (06:55 -0800)] 
add test and changelog for constant comparison folding

5 years agoreturn on first false when folding Compare node
areebbeigh [Fri, 15 Nov 2019 16:58:55 +0000 (22:28 +0530)] 
return on first false when folding Compare node

5 years agoMerge pull request #1108 from captainmalloc/runtime_calls
David Lord [Wed, 20 Nov 2019 14:22:40 +0000 (06:22 -0800)] 
Merge pull request #1108 from captainmalloc/runtime_calls

Use 'callable' instead of typechecking for runtime calls ctx/env injection

5 years agouse 'callable' instead of typechecking to inject context 1108/head
Adriano Scoditti [Tue, 19 Nov 2019 14:26:39 +0000 (15:26 +0100)] 
use 'callable' instead of typechecking to inject context

5 years agoMerge pull request #1101 from pallets/refactor-loop-context
David Lord [Fri, 8 Nov 2019 15:13:53 +0000 (07:13 -0800)] 
Merge pull request #1101 from pallets/refactor-loop-context

don't prefetch next item in loop context

5 years agoasync templates await attribute access 1101/head
David Lord [Fri, 8 Nov 2019 02:57:21 +0000 (18:57 -0800)] 
async templates await attribute access

5 years agodon't prefetch next item in loop context
David Lord [Thu, 7 Nov 2019 21:35:57 +0000 (13:35 -0800)] 
don't prefetch next item in loop context

5 years agoMerge pull request #1098 from pallets/urlencode-docs
David Lord [Mon, 4 Nov 2019 16:50:13 +0000 (08:50 -0800)] 
Merge pull request #1098 from pallets/urlencode-docs

clarify quoting behavior of urlencode filter

5 years agoclarify quoting behavior of urlencode filter 1098/head
David Lord [Mon, 4 Nov 2019 16:04:24 +0000 (08:04 -0800)] 
clarify quoting behavior of urlencode filter

5 years agoMerge pull request #829 from aogier/feature/550-hyphens-wordwrap
David Lord [Fri, 1 Nov 2019 15:40:50 +0000 (08:40 -0700)] 
Merge pull request #829 from aogier/feature/550-hyphens-wordwrap

Exposing Textwrapper break_on_hyphens option to wordwrap filter

5 years agoadd break_on_hyphens parameter to wordwrap filter 829/head
Alessandro -oggei- Ogier [Fri, 23 Mar 2018 16:58:15 +0000 (17:58 +0100)] 
add break_on_hyphens parameter to wordwrap filter

5 years agoMerge pull request #766 from fheinle/palletes_jinja_175-wordwrap
David Lord [Fri, 1 Nov 2019 15:11:55 +0000 (08:11 -0700)] 
Merge pull request #766 from fheinle/palletes_jinja_175-wordwrap

Let wordwrap filter respect existing newlines

5 years agoreformat, doc, and test for wordwrap 766/head
David Lord [Fri, 1 Nov 2019 14:55:51 +0000 (07:55 -0700)] 
reformat, doc, and test for wordwrap