]> git.ipfire.org Git - thirdparty/jinja.git/log
thirdparty/jinja.git
6 years agoAdd trove classifier for PyPy support 892/head
Jon Dufresne [Thu, 30 Aug 2018 04:02:27 +0000 (21:02 -0700)] 
Add trove classifier for PyPy support

Tested during CI since 761da6ff612966214fe9e34ac6bc86499e34da26.

6 years agoMerge pull request #853 from doobeh/584-filters-index
David Lord [Tue, 7 Aug 2018 17:43:48 +0000 (10:43 -0700)] 
Merge pull request #853 from doobeh/584-filters-index

Quick lookup table for builtin filters and tests-- references #584

6 years agoMerge pull request #869 from jwflory/docs/vim-syntax
David Lord [Tue, 7 Aug 2018 17:41:26 +0000 (10:41 -0700)] 
Merge pull request #869 from jwflory/docs/vim-syntax

Update integration docs for Vim syntax highlighting

6 years agoMerge pull request #867 from The-Compiler/collections
David Lord [Tue, 7 Aug 2018 17:29:46 +0000 (10:29 -0700)] 
Merge pull request #867 from The-Compiler/collections

Import abstract base classes from collections.abc

6 years agoImport abstract base classes from collections.abc 867/head
Florian Bruhin [Wed, 27 Jun 2018 13:30:54 +0000 (15:30 +0200)] 
Import abstract base classes from collections.abc

In Python 3.7, importing ABCs directly from the `collections` module shows a
warning (and in Python 3.8 it will stop working) - see
https://github.com/python/cpython/commit/c66f9f8d3909f588c251957d499599a1680e2320

This fixes various DeprecationWarnings such as those:

```
.../jinja2/utils.py:485: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import MutableMapping

.../jinja2/runtime.py:318: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Mapping
```

6 years agoMerge pull request #883 from pallets/pytest
David Lord [Tue, 7 Aug 2018 17:16:22 +0000 (10:16 -0700)] 
Merge pull request #883 from pallets/pytest

temporarily pin pytest to avoid test bug

6 years agotemporarily pin pytest to avoid test bug 883/head
David Lord [Tue, 7 Aug 2018 17:09:54 +0000 (10:09 -0700)] 
temporarily pin pytest to avoid test bug

6 years agoMerge pull request #868 from The-Compiler/py33
David Lord [Tue, 7 Aug 2018 16:53:28 +0000 (09:53 -0700)] 
Merge pull request #868 from The-Compiler/py33

Drop Python 2.6 and 3.3 support

7 years agoAdd myself to AUTHORS 868/head
Florian Bruhin [Wed, 27 Jun 2018 20:02:45 +0000 (22:02 +0200)] 
Add myself to AUTHORS

7 years agoAlso drop Python 2.6
Florian Bruhin [Wed, 27 Jun 2018 19:48:02 +0000 (21:48 +0200)] 
Also drop Python 2.6

7 years agoUpdate integration docs for Vim syntax highlighting 869/head
Justin W. Flory [Wed, 27 Jun 2018 18:39:26 +0000 (13:39 -0500)] 
Update integration docs for Vim syntax highlighting

7 years agoDrop Python 3.3 support
Florian Bruhin [Wed, 27 Jun 2018 14:13:52 +0000 (16:13 +0200)] 
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.

7 years agoMerge pull request #849 from funkyfuture/patch-1
Hsiaoming Yang [Tue, 15 May 2018 08:52:11 +0000 (16:52 +0800)] 
Merge pull request #849 from funkyfuture/patch-1

Fixes 'awaitable' typo in api.rst

7 years agoQuick lookup table for builtin filters and tests-- references #584 853/head
Anthony Plunkett [Mon, 14 May 2018 16:24:02 +0000 (12:24 -0400)] 
Quick lookup table for builtin filters and tests-- references #584

7 years agoMerge pull request #852 from ngr/html_highlight_fix
David Lord [Mon, 14 May 2018 15:48:09 +0000 (11:48 -0400)] 
Merge pull request #852 from ngr/html_highlight_fix

remove html+jinja highlight

7 years agoMerge pull request #802 from abadger/allow-more-splatting
David Lord [Mon, 14 May 2018 15:21:27 +0000 (11:21 -0400)] 
Merge pull request #802 from abadger/allow-more-splatting

More closely match python splatting for calls

7 years agoremove html+jinja highlight 852/head
ngr [Mon, 14 May 2018 15:20:32 +0000 (11:20 -0400)] 
remove html+jinja highlight

7 years agoMerge pull request #851 from ngr/tests_for_raw
David Lord [Mon, 14 May 2018 15:11:40 +0000 (11:11 -0400)] 
Merge pull request #851 from ngr/tests_for_raw

{% raw %} tests and note for documentation

7 years ago{% raw %} tests and note for documentation 851/head
ngr [Mon, 14 May 2018 14:53:36 +0000 (10:53 -0400)] 
{% raw %} tests and note for documentation

7 years agoFixes 'awaitable' typo in api.rst 849/head
Frank Sachsenheim [Fri, 11 May 2018 19:25:22 +0000 (21:25 +0200)] 
Fixes 'awaitable' typo in api.rst

7 years agoMerge pull request #841 from jdufresne/pypi
David Lord [Thu, 19 Apr 2018 02:40:50 +0000 (19:40 -0700)] 
Merge pull request #841 from jdufresne/pypi

Update all pypi.python.org URLs to pypi.org

7 years agoUpdate all pypi.python.org URLs to pypi.org 841/head
Jon Dufresne [Thu, 19 Apr 2018 02:35:29 +0000 (19:35 -0700)] 
Update all pypi.python.org URLs to pypi.org

For details on the new PyPI, see the blog post:

https://pythoninsider.blogspot.ca/2018/04/new-pypi-launched-legacy-pypi-shutting.html

7 years agoMerge pull request #840 from nwalsh1995/master
David Lord [Tue, 17 Apr 2018 23:51:24 +0000 (16:51 -0700)] 
Merge pull request #840 from nwalsh1995/master

Fix small typo in docs/api.rst

7 years agoFix small typo 840/head
nwalsh1995 [Tue, 17 Apr 2018 21:55:13 +0000 (14:55 -0700)] 
Fix small typo

7 years agoRemove old GPL licensed emacs support
Armin Ronacher [Wed, 28 Mar 2018 21:31:03 +0000 (23:31 +0200)] 
Remove old GPL licensed emacs support

This is unmaintained anyways and we do not want to ship non BSD code.

Fixes #833

7 years agoMerge pull request #826 from terminalmage/issue823
David Lord [Thu, 22 Mar 2018 18:59:02 +0000 (11:59 -0700)] 
Merge pull request #826 from terminalmage/issue823

Fix escaped characters in indent filter

7 years agoRemove unescape method for fixing concatenation issue 826/head
Erik Johnson [Tue, 20 Mar 2018 02:56:54 +0000 (21:56 -0500)] 
Remove unescape method for fixing concatenation issue

This ensures that we only concatenate Markup instances to other Markup
instances.

7 years agoAdd .pytest_cache/ to gitignore
Erik Johnson [Mon, 19 Mar 2018 21:03:29 +0000 (16:03 -0500)] 
Add .pytest_cache/ to gitignore

7 years agoApply unesacpe fix when blank is True
Erik Johnson [Mon, 19 Mar 2018 21:03:00 +0000 (16:03 -0500)] 
Apply unesacpe fix when blank is True

7 years agoFix spelling in docstring
Erik Johnson [Mon, 19 Mar 2018 19:30:46 +0000 (14:30 -0500)] 
Fix spelling in docstring

7 years agoAdd test cases for quotes and expand coverage to include Markup input
Erik Johnson [Mon, 19 Mar 2018 19:18:27 +0000 (14:18 -0500)] 
Add test cases for quotes and expand coverage to include Markup input

7 years agoFix cases where filter input is not a Markup type
Erik Johnson [Mon, 19 Mar 2018 19:17:35 +0000 (14:17 -0500)] 
Fix cases where filter input is not a Markup type

The previous commit assumes that the filter will always be a Markup
type, which is not correct.

7 years agoFix escaped characters in indent filter
Erik Johnson [Mon, 19 Mar 2018 18:27:38 +0000 (13:27 -0500)] 
Fix escaped characters in indent filter

This unescapes after concatenating, to fix a bug introduced in Jinja
2.10 where lines concatenated contain escaped versions of non-ascii
characters.

7 years agoCorrect documentation for min method (#825)
Sean Sabbage [Mon, 19 Mar 2018 14:05:42 +0000 (14:05 +0000)] 
Correct documentation for min method (#825)

7 years agoMerge pull request #820 from jdufresne/typo
David Lord [Mon, 5 Mar 2018 14:23:40 +0000 (06:23 -0800)] 
Merge pull request #820 from jdufresne/typo

Fix typo: apparenlty -> apparently.

7 years agoFix typo: apparenlty -> apparently. 820/head
Jon Dufresne [Sun, 4 Mar 2018 20:15:52 +0000 (12:15 -0800)] 
Fix typo: apparenlty -> apparently.

7 years agoFix typos (#815)
luzpaz [Sun, 18 Feb 2018 14:57:01 +0000 (09:57 -0500)] 
Fix typos (#815)

Found via `codespell -q 3` using v1.12.0.dev0

7 years agoMerge pull request #806 from methane/lazy-async-patch
David Lord [Tue, 6 Feb 2018 15:52:32 +0000 (07:52 -0800)] 
Merge pull request #806 from methane/lazy-async-patch

Lazy asyncsupport.patch_all()

7 years agoadd changelog 806/head
David Lord [Tue, 6 Feb 2018 15:48:10 +0000 (07:48 -0800)] 
add changelog
fix unrelated docs issue

7 years agoLazy asyncsupport.patch_all()
INADA Naoki [Tue, 6 Feb 2018 12:52:57 +0000 (21:52 +0900)] 
Lazy asyncsupport.patch_all()

fixes #765

7 years agoRemove old statement about Python 3 (#803)
Godefroid Chapelle [Tue, 30 Jan 2018 20:02:33 +0000 (21:02 +0100)] 
Remove old statement about Python 3 (#803)

There is now Python 3 support...

7 years agoMore closely match python splatting for calls 802/head
Toshio Kuratomi [Mon, 29 Jan 2018 23:44:46 +0000 (15:44 -0800)] 
More closely match python splatting for calls

In Python, it's legal to use splats in function calls like this:

  call_function('123', *b, c=5, **d)

Prior to this change, jinja2 did not allow that. It mandated that all
splatting had to take place at the end of the call:

  call_function('123', c=5, *b, **d)

This commit allows both orders.

Additionally, this commit adds tests for more things that are illegal:
namely giving a function a positional argument after using a splat to
unpack positional arguments or giving a function a named argument after
using a double splat to unpack keyword arguments.

7 years agoMerge pull request #799 from mkrizek/native-concat-list
David Lord [Tue, 23 Jan 2018 16:31:30 +0000 (08:31 -0800)] 
Merge pull request #799 from mkrizek/native-concat-list

Allow to pass a list to native_concat

7 years agofix code block markup
David Lord [Thu, 18 Jan 2018 16:56:55 +0000 (08:56 -0800)] 
fix code block markup

closes #800

7 years agoDon't check for generator if not needed 799/head
Martin Krizek [Wed, 17 Jan 2018 22:09:23 +0000 (23:09 +0100)] 
Don't check for generator if not needed

7 years agoAllow to pass a list to native_concat
Martin Krizek [Wed, 17 Jan 2018 20:38:58 +0000 (21:38 +0100)] 
Allow to pass a list to native_concat

7 years agoMerge pull request #787 from SabujXi/patch-1
David Lord [Fri, 1 Dec 2017 18:27:13 +0000 (10:27 -0800)] 
Merge pull request #787 from SabujXi/patch-1

Fix typo instanciable > instantiable

7 years agoFix typo instanciable > instantiable 787/head
Md. Sabuj Sarker [Fri, 1 Dec 2017 18:10:39 +0000 (00:10 +0600)] 
Fix typo instanciable > instantiable

7 years agoMerge pull request #783 from luzpaz/trivial-typos
David Lord [Thu, 9 Nov 2017 01:21:47 +0000 (18:21 -0700)] 
Merge pull request #783 from luzpaz/trivial-typos

Trivial typos

7 years agoTrivial typos 783/head
Unknown [Thu, 9 Nov 2017 01:02:28 +0000 (20:02 -0500)] 
Trivial typos

Most non-user facing.

7 years agoBump version number to 2.11.dev
David Lord [Wed, 8 Nov 2017 20:01:29 +0000 (12:01 -0800)] 
Bump version number to 2.11.dev

7 years agoBump version number to 2.10 2.10
David Lord [Wed, 8 Nov 2017 19:58:35 +0000 (11:58 -0800)] 
Bump version number to 2.10

7 years agoclean up MANIFEST.in
David Lord [Wed, 1 Nov 2017 14:57:12 +0000 (07:57 -0700)] 
clean up MANIFEST.in
clean up make-release.py for py3
add rst extension to CHANGES for GitHub
clean up changelog formatting

7 years agoSupport filters in set block 489/head
ThiefMaster [Fri, 11 Sep 2015 22:27:07 +0000 (00:27 +0200)] 
Support filters in set block

- e.g {% set foo | trim %}...{% endset %}
- closes #486

7 years agoMerge pull request #708 from jctanner/NATIVE_TYPES
David Lord [Tue, 31 Oct 2017 19:16:10 +0000 (12:16 -0700)] 
Merge pull request #708 from jctanner/NATIVE_TYPES

Add support for the Environment to optionally return native types.

7 years agoMerge branch 'master' into NATIVE_TYPES 708/head
David Lord [Tue, 31 Oct 2017 15:51:53 +0000 (08:51 -0700)] 
Merge branch 'master' into NATIVE_TYPES

7 years agoFix typo in docstring (#779)
Ricardo Lafuente [Mon, 16 Oct 2017 11:11:44 +0000 (12:11 +0100)] 
Fix typo in docstring (#779)

7 years agocodecov needs argparse on 2.6
David Lord [Sun, 8 Oct 2017 20:15:09 +0000 (13:15 -0700)] 
codecov needs argparse on 2.6

7 years agoMinor docstring grammar fix (#772)
Eli Boyarski [Mon, 18 Sep 2017 14:24:38 +0000 (17:24 +0300)] 
Minor docstring grammar fix (#772)

7 years agos/Add/Added/ in CHANGES
Adrian Moennich [Tue, 22 Aug 2017 21:24:52 +0000 (23:24 +0200)] 
s/Add/Added/ in CHANGES

Pretty much all other entries also use past tense

7 years agoMerge branch '2.9-maintenance'
Adrian Moennich [Tue, 22 Aug 2017 21:17:15 +0000 (23:17 +0200)] 
Merge branch '2.9-maintenance'

7 years agoCompile `elif` tag to `elif` instead of `else: if` 760/head
Adrian Moennich [Tue, 22 Aug 2017 20:59:57 +0000 (22:59 +0200)] 
Compile `elif` tag to `elif` instead of `else: if`

This avoids deep nesting in case of many `{% elif .. %}` blocks (which
would fail during execution) and also deep recursion (which may fail
during compilation)

fixes #759

7 years agoMerge branch '2.9-maintenance'
Armin Ronacher [Wed, 9 Aug 2017 07:07:04 +0000 (09:07 +0200)] 
Merge branch '2.9-maintenance'

7 years agoAdded a changelog entry
Armin Ronacher [Wed, 9 Aug 2017 07:06:39 +0000 (09:06 +0200)] 
Added a changelog entry

7 years agoFix regression in 2.9 involving unsafe Context.get_all() usage
Zac Medico [Tue, 8 Aug 2017 22:00:20 +0000 (15:00 -0700)] 
Fix regression in 2.9 involving unsafe Context.get_all() usage

Since commit d67f0fd4cc2a4af08f51f4466150d49da7798729, callers
of Context.get_all() need to make a copy it they're going to
modify the result.

Fixes: d67f0fd4cc2a ("Generalize scoping. This fixes #603")
8 years agoquickly fix py3 tests
James Tanner [Wed, 26 Jul 2017 02:11:22 +0000 (22:11 -0400)] 
quickly fix py3 tests

8 years agoAdd requested patch for safe_repr and nodes.Impossible
James Tanner [Wed, 26 Jul 2017 01:48:12 +0000 (21:48 -0400)] 
Add requested patch for safe_repr and nodes.Impossible

8 years agoMerge branch 'master' into NATIVE_TYPES
Adrian [Fri, 14 Jul 2017 15:19:17 +0000 (17:19 +0200)] 
Merge branch 'master' into NATIVE_TYPES

8 years agoMerge pull request #672 from alexk307/tests-memcached-bytecode-cache
David Lord [Sun, 9 Jul 2017 16:00:57 +0000 (09:00 -0700)] 
Merge pull request #672 from alexk307/tests-memcached-bytecode-cache

Adds tests for the memcached bytecode cache module

8 years agorewrite tests to match usage 672/head
David Lord [Sun, 9 Jul 2017 15:39:25 +0000 (08:39 -0700)] 
rewrite tests to match usage

8 years agoAdds tests for the memcached bytecode cache module
Alex Kahan [Fri, 27 Jan 2017 18:13:12 +0000 (13:13 -0500)] 
Adds tests for the memcached bytecode cache module

8 years agoMerge pull request #692 from dnmvisser/dictsort_reverse
David Lord [Sat, 8 Jul 2017 16:10:33 +0000 (09:10 -0700)] 
Merge pull request #692 from dnmvisser/dictsort_reverse

Dictsort reverse

8 years agoadd test and changelog 692/head
David Lord [Sat, 8 Jul 2017 16:04:29 +0000 (09:04 -0700)] 
add test and changelog
use ignore_case function

8 years ago'reverse' option for dictsort
Dick Visser [Thu, 9 Mar 2017 20:37:42 +0000 (21:37 +0100)] 
'reverse' option for dictsort

8 years agoMerge pull request #502 from berrange/callable
David Lord [Fri, 7 Jul 2017 21:00:44 +0000 (14:00 -0700)] 
Merge pull request #502 from berrange/callable

runtime: avoid assumption that all objects provide __call__

8 years agoMerge pull request #685 from jkfran/master
David Lord [Fri, 7 Jul 2017 18:55:24 +0000 (11:55 -0700)] 
Merge pull request #685 from jkfran/master

Ignore empty lines in indent filter #681

8 years agoshorten arguments 685/head
David Lord [Fri, 7 Jul 2017 18:46:19 +0000 (11:46 -0700)] 
shorten arguments
add test for single line
update changelog

8 years agoIgnore empty lines in indent filter
Francisco Jiménez Cabrera [Wed, 1 Mar 2017 23:10:29 +0000 (00:10 +0100)] 
Ignore empty lines in indent filter

8 years agoMerge pull request #617 from jackwilsdon/dont-skip-comma
David Lord [Fri, 7 Jul 2017 16:56:01 +0000 (09:56 -0700)] 
Merge pull request #617 from jackwilsdon/dont-skip-comma

Don't skip an erroneous comma when parsing "from"

8 years agoadd test and changelog 617/head
David Lord [Fri, 7 Jul 2017 16:51:31 +0000 (09:51 -0700)] 
add test and changelog

8 years agoDon't skip an erroneous comma when parsing from
Jack Wilsdon [Sun, 30 Oct 2016 21:57:12 +0000 (21:57 +0000)] 
Don't skip an erroneous comma when parsing from

Currently we skip an extra comma when "with context" is not provided to
the "from" statement. This allows invalid code such as this:

  {% from "functions.html" import my_function,, %}

The primary issue with this is that it is not consistent when providing
"with context". The following code throws an error, contrary to the
previous example:

  {% from "functions.html" import my_function,, with context %}

It seems that the comma skipping was originally found in 0611e49 and was
accidentally put inside the "with context" check in ea847c5. It was then
updated to use "skip_if" in fdf9530.

There doesn't seem to be any reason for this check existing, as
double commas should never be allowed and serve no purpose in the
statement.

8 years agoMerge pull request #618 from jackwilsdon/stricter-from-parsing
David Lord [Fri, 7 Jul 2017 16:40:35 +0000 (09:40 -0700)] 
Merge pull request #618 from jackwilsdon/stricter-from-parsing

Add stricter checking to "from ... import ..."

8 years agoadd tests and changelog 618/head
David Lord [Fri, 7 Jul 2017 16:34:32 +0000 (09:34 -0700)] 
add tests and changelog

8 years agoAdd stricter checking to "from ... import ..."
Jack Wilsdon [Sun, 30 Oct 2016 22:11:21 +0000 (22:11 +0000)] 
Add stricter checking to "from ... import ..."

Currently token parsing on "from ... import ..." is rather "loose" — it
sees the following "invalid" code as perfectly valid:

  {% from "functions" import my_function, %}
  {% from "functions" import, %}
  {% from "functions" import %}

This is caused by the parser ignoring non-name values where there should
be names, either as the first value or after commas.

This commit ensures only name values are allowed as the first value and
any values after commas in the import section.

8 years agoMerge pull request #740 from davidism/optimize-tests
David Lord [Fri, 7 Jul 2017 15:20:34 +0000 (08:20 -0700)] 
Merge pull request #740 from davidism/optimize-tests

Inline template tests during optimization

8 years agoInline template tests during optimization 740/head
Sebastian Noack [Mon, 10 Aug 2015 07:51:36 +0000 (09:51 +0200)] 
Inline template tests during optimization

8 years agoAdd support for the Environment to optionally return native types.
James Tanner [Thu, 27 Apr 2017 21:14:42 +0000 (17:14 -0400)] 
Add support for the Environment to optionally return native types.

This works by having an alternate CodeGenerator that avoids doing to_string
after the yield statement and a new version of concat that handles the returned
generator with a bit more "intelligence".

8 years agoMerge pull request #665 from pallets/operator-tests
David Lord [Thu, 6 Jul 2017 20:06:44 +0000 (13:06 -0700)] 
Merge pull request #665 from pallets/operator-tests

Allow using comparison operator symbols as tests

8 years agoallow using comparison operator symbols as tests 665/head
David Lord [Fri, 20 Jan 2017 04:40:31 +0000 (20:40 -0800)] 
allow using comparison operator symbols as tests
add tests and aliases for all comparison operators
adjust docs to prefer short names for compare tests
closes #664

8 years agoMerge pull request #738 from davidism/test-config
David Lord [Thu, 6 Jul 2017 18:15:37 +0000 (11:15 -0700)] 
Merge pull request #738 from davidism/test-config

Standard test config

8 years agostandard test configuration 738/head
David Lord [Thu, 6 Jul 2017 18:07:02 +0000 (11:07 -0700)] 
standard test configuration
add branch coverage and codecov

8 years agofix docs warnings
David Lord [Thu, 6 Jul 2017 17:43:21 +0000 (10:43 -0700)] 
fix docs warnings

8 years agoremove test copied from markupsafe
David Lord [Thu, 6 Jul 2017 17:41:46 +0000 (10:41 -0700)] 
remove test copied from markupsafe

8 years agoMerge pull request #737 from davidism/minmax-filters
David Lord [Thu, 6 Jul 2017 15:48:07 +0000 (08:48 -0700)] 
Merge pull request #737 from davidism/minmax-filters

min and max filters

8 years agoparametrize tests 737/head
David Lord [Thu, 6 Jul 2017 15:37:17 +0000 (08:37 -0700)] 
parametrize tests
argument order consistent with existing filters
add changelog

8 years agoAdded min and max filters
Sebastian Noack [Tue, 4 Aug 2015 20:11:55 +0000 (22:11 +0200)] 
Added min and max filters

8 years agoMerge pull request #735 from davidism/unique-filter
David Lord [Wed, 5 Jul 2017 21:27:45 +0000 (14:27 -0700)] 
Merge pull request #735 from davidism/unique-filter

Unique filter

8 years agomake attrgetter take generic postprocess function 735/head
David Lord [Wed, 5 Jul 2017 21:22:27 +0000 (14:22 -0700)] 
make attrgetter take generic postprocess function
add changelog

8 years agoMerge branch 'master' into unique-filter
David Lord [Wed, 5 Jul 2017 18:58:34 +0000 (11:58 -0700)] 
Merge branch 'master' into unique-filter

8 years agoMerge pull request #734 from davidism/dont-inline-random
David Lord [Wed, 5 Jul 2017 18:52:20 +0000 (11:52 -0700)] 
Merge pull request #734 from davidism/dont-inline-random

Prevent random filter from being folded