Skip to content
Myr

Merge branch '2.9-maintenance' of github.com:pallets/jinja into 2.9-maintenance

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parents a9b9258, 7589409 · Browse files · 11 files+7 added−17 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

11 files+7 added−17 removed

  • tests:+1 added−10 removed
  • other:+6 added−7 removed

11 files+7 added−17 removed

modified:jinja2/asyncsupport.py+1 added-1 removed
12 unmodified lines
13import asyncio14import inspect15from functools import update_wrapper1617from jinja2.utils import concat, internalcode, concat, Markup17from jinja2.utils import concat, internalcode, Markup18from jinja2.environment import TemplateModule19from jinja2.runtime import LoopContextBase, _last_iteration2021
216 unmodified lines
modified:jinja2/ext.py+1 added-1 removed
85 unmodified lines
8687 def filter_stream(self, stream):88 """It's passed a :class:`~jinja2.lexer.TokenStream` that can be used89 to filter tokens returned. This method has to return an iterable of90 :class:`~jinja2.lexer.Token`\s, but it doesn't have to return a90 :class:`~jinja2.lexer.Token`\\s, but it doesn't have to return a91 :class:`~jinja2.lexer.TokenStream`.9293 In the `ext` folder of the Jinja2 source distribution there is a file94 called `inlinegettext.py` which implements a filter that utilizes this
515 unmodified lines
modified:jinja2/lexer.py+1 added-2 removed
18 unmodified lines
19from operator import itemgetter20from collections import deque21from jinja2.exceptions import TemplateSyntaxError22from jinja2.utils import LRUCache23from jinja2._compat import iteritems, implements_iterator, text_type, \24 intern, PY223from jinja2._compat import iteritems, implements_iterator, text_type, intern242526# cache for the lexers. Exists in order to be able to have multiple27# environments with the same lexer
697 unmodified lines
modified:jinja2/sandbox.py+1 added-1 removed
15 unmodified lines
16import operator17from collections import Mapping18from jinja2.environment import Environment19from jinja2.exceptions import SecurityError20from jinja2._compat import string_types, text_type, PY220from jinja2._compat import string_types, PY221from jinja2.utils import Markup2223from markupsafe import EscapeFormatter24from string import Formatter
451 unmodified lines
modified:tests/conftest.py-4 removed
8 unmodified lines
9 :license: BSD, see LICENSE for more details.10"""11import pytest12import os13import re14import sys1316from traceback import format_exception14from jinja2 import loaders18from jinja2._compat import PY215from jinja2.utils import have_async_gen16from jinja2 import Environment1718
59 unmodified lines
modified:tests/test_async.py-1 removed
1import pytest2import asyncio34from jinja2 import Template, Environment, DictLoader5from jinja2.utils import have_async_gen5from jinja2.exceptions import TemplateNotFound, TemplatesNotFound, \6 UndefinedError78
409 unmodified lines
modified:tests/test_debug.py-2 removed
9 unmodified lines
10"""11import pytest1213import re1414import sys15from traceback import format_exception1617from jinja2 import Environment, TemplateSyntaxError19from traceback import format_exception181920@pytest.fixture21def fs_env(filesystem_loader):
63 unmodified lines
modified:tests/test_ext.py+1 added-1 removed
17 unmodified lines
18from jinja2._compat import BytesIO, itervalues, text_type1920importable_object = 232122_gettext_re = re.compile(r'_\((.*?)\)(?s)')22_gettext_re = re.compile(r'_\((.*?)\)', re.DOTALL)232425i18n_templates = {26 'master.html': '<title>{{ page_title|default(_("missing")) }}</title>'
471 unmodified lines
modified:tests/test_idtracking.py-2 removed
1import pytest21from jinja2 import nodes2from jinja2.idtracking import symbols_for_node34
212 unmodified lines
modified:README.rst+1 added-1 removed
44 unmodified lines
45+---------------------+------------------------------------------------------------------------------+46| ``master`` | .. image:: https://travis-ci.org/pallets/jinja.svg?branch=master |47| | :target: https://travis-ci.org/pallets/jinja |48+---------------------+------------------------------------------------------------------------------+49| ``2.7-maintenance`` | .. image:: https://travis-ci.org/pallets/jinja.svg?branch=2.7-maintenance |49| ``2.9-maintenance`` | .. image:: https://travis-ci.org/pallets/jinja.svg?branch=2.9-maintenance |50| | :target: https://travis-ci.org/pallets/jinja |51+---------------------+------------------------------------------------------------------------------+
modified:tox.ini+1 added-1 removed
1[tox]2envlist = py26,py27,pypy,py33,py34,py352envlist = py26,py27,pypy,py33,py34,py35,py3634[testenv]5commands = py.test {posargs}6
2 unmodified lines