From: David Lord Date: Fri, 26 Jul 2019 22:21:16 +0000 (-0700) Subject: Merge branch '2.10.x' X-Git-Tag: 2.11.0~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9550dc85ff826442c4609b139c20f5698b2c9b5d;p=thirdparty%2Fjinja.git Merge branch '2.10.x' --- 9550dc85ff826442c4609b139c20f5698b2c9b5d diff --cc CHANGES.rst index 7852bec3,3199d559..ab67cd4c --- a/CHANGES.rst +++ b/CHANGES.rst @@@ -1,37 -1,5 +1,28 @@@ .. currentmodule:: jinja2 - Jinja Changelog - =============== - - +Version 2.11 +------------ + - unreleased - - - Async support is only loaded the first time an - :class:`~environment.Environment` enables it, in order to avoid a - slow initial import. (`#765`_) - - Python 2.6 and 3.3 are not supported anymore. - - The ``map`` filter in async mode now automatically awaits - - Added a new ``ChainableUndefined`` class to support getitem - and getattr on an undefined object. (`#977`_) - - Allow ``{%+`` syntax (with NOP behavior) when - ``lstrip_blocks == False`` (`#748`_) - - Added a ``default`` parameter for the ``map`` filter. (`#557`_) ++Unreleased ++ ++- Async support is only loaded the first time an ++ :class:`~environment.Environment` enables it, in order to avoid a ++ slow initial import. :issue:`765` ++- Python 2.6 and 3.3 are not supported anymore. ++- The ``map`` filter in async mode now automatically awaits ++- Added a new ``ChainableUndefined`` class to support getitem and ++ getattr on an undefined object. :issue:`977` ++- Allow ``{%+`` syntax (with NOP behavior) when ``lstrip_blocks`` is ++ disabled. :issue:`748` ++- Added a ``default`` parameter for the ``map`` filter. :issue:`557` +- Exclude environment globals from - :func:`meta.find_undeclared_variables`. #931 ++ :func:`meta.find_undeclared_variables`. :issue:`931` +- Float literals can be written with scientific notation, like - ``{{ 2.56e-3 }}``. #912, #922 ++ 2.56e-3. :issue:`912`, :pr:`922` +- Int and float literals can be written with the '_' separator for - legibility, like ``{{ 12_345 }}``. #923 - - .. _#557: https://github.com/pallets/jinja/issues/557 - .. _#765: https://github.com/pallets/jinja/issues/765 - .. _#748: https://github.com/pallets/jinja/issues/748 - .. _#977: https://github.com/pallets/jinja/issues/977 ++ legibility, like 12_345. :pr:`923` + + Version 2.10.2 -------------- diff --cc docs/integration.rst index af0e64ff,e84e5793..ff8fbafb --- a/docs/integration.rst +++ b/docs/integration.rst @@@ -90,17 -89,13 +90,17 @@@ often used snippets Vim --- -A syntax plugin for `Vim`_ exists in the Vim-scripts directory as well as the -`ext` folder at the root of the Jinja2 project. `The script -`_ supports Jinja1 and -Jinja2. Once installed two file types are available `jinja` and `htmljinja`. -The first one for text based templates, the latter for HTML templates. +A syntax plugin for `Vim`_ is available `from the jinja repository +`_. The script +supports Jinja1 and Jinja2. Once installed, two file types are available +(``jinja`` and ``htmljinja``). The first one is for text-based templates and the +second is for HTML templates. For HTML documents, the plugin attempts to +automatically detect Jinja syntax inside of existing HTML documents. -Copy the files into your `syntax` folder. +If you are using a plugin manager like `Pathogen`_, see the `vim-jinja +`_ repository for installing in the +``bundle/`` directory. .. _Babel: http://babel.pocoo.org/ - .. _Vim: http://www.vim.org/ + .. _Vim: https://www.vim.org/ +.. _Pathogen: https://github.com/tpope/vim-pathogen diff --cc docs/intro.rst index 1059765f,90636f57..e01450a3 --- a/docs/intro.rst +++ b/docs/intro.rst @@@ -41,19 -60,22 +41,19 @@@ As an alternative to steps 4 you can al which will install the package via `distribute` in development mode. This also has the advantage that the C extensions are compiled. -.. _download page: https://pypi.org/project/Jinja2/ .. _distribute: https://pypi.org/project/distribute/ - .. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools + .. _setuptools: https://pypi.org/project/setuptools/ -.. _easy_install: https://setuptools.readthedocs.io/en/latest/easy_install.html .. _pip: https://pypi.org/project/pip/ - .. _git: https://git-scm.org/ + .. _git: https://git-scm.com/ MarkupSafe Dependency ~~~~~~~~~~~~~~~~~~~~~ -As of version 2.7 Jinja2 depends on the `MarkupSafe`_ module. If you -install Jinja2 via `pip` or `easy_install` it will be installed -automatically for you. +As of version 2.7 Jinja2 depends on the `MarkupSafe`_ module. If you install +Jinja2 via ``pip`` it will be installed automatically for you. - .. _MarkupSafe: https://pypi.org/project/MarkupSafe/ + .. _MarkupSafe: https://markupsafe.palletsprojects.com/ Basic API Usage ---------------