Skip to content
Myr

Merge branch '2.10.x'

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

authored by David Lord · committed by David Lord · parents d3b976b, 0fee409 · Browse files · 7 files+95 added−160 removed
This commit

State

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

Diff stats

7 files+95 added−160 removed

  • other:+95 added−160 removed

7 files+95 added−160 removed

modified:jinja2/__init__.py+1 added-1 removed
25 unmodified lines
26 :copyright: (c) 2017 by the Jinja Team.27 :license: BSD, see LICENSE for more details.28"""29__docformat__ = 'restructuredtext en'30__version__ = '2.11.dev'30__version__ = "2.11.0.dev0"3132# high level interface33from jinja2.environment import Environment, Template34
38 unmodified lines
deleted:AUTHORS-35 removed
1Jinja is written and maintained by the Jinja Team and various2contributors:34Lead Developer:56- Armin Ronacher <armin.ronacher@active-4.com>78Developers:910- Christoph Hack11- Georg Brandl1213Contributors:1415- Bryan McLemore16- Mickaël Guérin <kael@crocobox.org>17- Cameron Knight18- Lawrence Journal-World.19- David Cramer20- Adrian Mönnich (ThiefMaster)2122Patches and suggestions:2324- Ronny Pfannschmidt25- Axel Böhm26- Alexey Melchakov27- Bryan McLemore28- Clovis Fabricio (nosklo)29- Cameron Knight30- Peter van Dijk (Habbie)31- Stefan Ebner32- Rene Leonhardt33- Thomas Waldmann34- Cory Benfield (Lukasa)35- Florian Bruhin (The-Compiler)
modified:CHANGES.rst+1 added-1 removed
25 unmodified lines
2627Version 2.10.228--------------2930Unreleased30Released 2019-10-043132- Fix Python 3.7 deprecation warnings.33- Using ``range`` in the sandboxed environment uses ``xrange`` on34 Python 2 to avoid memory use. :issue:`933`
614 unmodified lines
modified:MANIFEST.in+1 added-2 removed
1include AUTHORS CHANGES.rst LICENSE.rst2global-exclude *.py[co]1include CHANGES.rst tox.ini2graft artwork3graft docs4prune docs/_build5graft examples
2 unmodified lines
modified:README.rst+48 added-44 removed
1Jinja22~~~~~~1Jinja2=====34Jinja2 is a template engine written in pure Python. It provides a5`Django`_ inspired non-XML syntax but supports inline expressions and6an optional `sandboxed`_ environment.4Jinja is a fast, expressive, extensible templating engine. Special5placeholders in the template allow writing code similar to Python6syntax. Then the template is passed data to render the final document.78Nutshell9--------8It includes:911Here a small example of a Jinja template:10- Template inheritance and inclusion.11- Define and import macros within templates.12- HTML templates can use autoescaping to prevent XSS from untrusted13 user input.14- A sandboxed environment can safely render untrusted templates.15- AsyncIO support for generating templates and calling async16 functions.17- I18N support with Babel.18- Templates are compiled to optimized Python code just-in-time and19 cached, or can be compiled ahead-of-time.20- Exceptions point to the correct line in templates to make debugging21 easier.22- Extensible filters, tests, functions, and even syntax.2324Jinja's philosophy is that while application logic belongs in Python if25possible, it shouldn't make the template designer's job difficult by26restricting functionality too much.272829Installing30----------3132Install and update using `pip`_:3334.. code-block:: text3536 $ pip install -U Jinja23738.. _pip: https://pip.pypa.io/en/stable/quickstart/394041In A Nutshell42-------------4344.. code-block:: jinja4515 {% extends 'base.html' %}16 {% block title %}Memberlist{% endblock %}46 {% extends "base.html" %}47 {% block title %}Members{% endblock %}48 {% block content %}49 <ul>50 {% for user in users %}51 <li><a href="{{ user.url }}">{{ user.username }}</a></li>52 {% endfor %}53 </ul>54 {% endblock %}5525Philosophy26----------5628Application logic is for the controller, but don't make the template designer's29life difficult by restricting functionality too much.3031For more information visit the new `Jinja2 webpage`_ and `documentation`_.3233The `Jinja2 tip`_ is installable via ``pip`` with ``pip install34https://github.com/pallets/jinja/zipball/master``.3536.. _sandboxed: https://en.wikipedia.org/wiki/Sandbox_(computer_security)37.. _Django: https://www.djangoproject.com/38.. _Jinja2 webpage: http://jinja.pocoo.org/39.. _documentation: http://jinja.pocoo.org/docs/40.. _Jinja2 tip: http://jinja.pocoo.org/docs/intro/#as-a-python-egg-via-easy-install4142Builds43------4445+---------------------+------------------------------------------------------------------------------+46| ``master`` | .. image:: https://travis-ci.org/pallets/jinja.svg?branch=master |47| | :target: https://travis-ci.org/pallets/jinja |48+---------------------+------------------------------------------------------------------------------+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+---------------------+------------------------------------------------------------------------------+5257Links58-----5956* Website: http://jinja.pocoo.org/57* Documentation: http://jinja.pocoo.org/docs/58* License: `BSD <https://raw.githubusercontent.com/pallets/jinja/master/LICENSE>`_59* Releases: https://pypi.org/project/Jinja2/60* Code: https://github.com/pallets/jinja61* Issue tracker: https://github.com/pallets/jinja/issues62* Official chat: https://discord.gg/t6rrQZH60- Website: https://palletsprojects.com/p/jinja/61- Documentation: https://jinja.palletsprojects.com/62- Releases: https://pypi.org/project/Jinja2/63- Code: https://github.com/pallets/jinja64- Issue tracker: https://github.com/pallets/jinja/issues65- Test status: https://dev.azure.com/pallets/jinja/_build66- Official chat: https://discord.gg/t6rrQZH
modified:setup.cfg+1 added-1 removed
1[metadata]2license_file = LICENSE2license_file = LICENSE.rst34[bdist_wheel]5universal = true6
14 unmodified lines
modified:setup.py+43 added-76 removed
1# -*- coding: utf-8 -*-2"""3Jinja24~~~~~~1import io2import re36Jinja2 is a template engine written in pure Python. It provides a7`Django`_ inspired non-XML syntax but supports inline expressions and8an optional `sandboxed`_ environment.910Nutshell11--------1213Here a small example of a Jinja template::1415 {% extends 'base.html' %}16 {% block title %}Memberlist{% endblock %}17 {% block content %}18 <ul>19 {% for user in users %}20 <li><a href="{{ user.url }}">{{ user.username }}</a></li>21 {% endfor %}22 </ul>23 {% endblock %}2425Philosophy26----------2728Application logic is for the controller but don't try to make the life29for the template designer too hard by giving him too few functionality.3031For more information visit the new `Jinja2 webpage`_ and `documentation`_.3233.. _sandboxed: https://en.wikipedia.org/wiki/Sandbox_(computer_security)34.. _Django: https://www.djangoproject.com/35.. _Jinja2 webpage: http://jinja.pocoo.org/36.. _documentation: http://jinja.pocoo.org/2/documentation/37"""4from setuptools import find_packages5from setuptools import setup67with io.open("README.rst", "rt", encoding="utf8") as f:8 readme = f.read()910with io.open("jinja2/__init__.py", "rt", encoding="utf8") as f:11 version = re.search(r'__version__ = "(.*?)"', f.read(), re.M).group(1)1213setup(42 name='Jinja2',43 version='2.11.dev',44 url='http://jinja.pocoo.org/',14 name="Jinja2",15 version=version,16 url="https://palletsprojects.com/p/jinja/",17 project_urls={46 'Documentation': 'https://jinja.palletsprojects.com/',47 'Code': 'https://github.com/pallets/jinja/',48 'Issue tracker': 'https://github.com/pallets/jinja/issues',18 "Documentation": "https://jinja.palletsprojects.com/",19 "Code": "https://github.com/pallets/jinja",20 "Issue tracker": "https://github.com/pallets/jinja/issues",21 },50 license='BSD-3-Clause',51 author='Armin Ronacher',52 author_email='armin.ronacher@active-4.com',53 description='A small but fast and easy to use stand-alone template '54 'engine written in pure python.',55 long_description=__doc__,56 # jinja is egg safe. But we hate eggs57 zip_safe=False,22 license="BSD-3-Clause",23 author="Armin Ronacher",24 author_email="armin.ronacher@active-4.com",25 maintainer="Pallets",26 maintainer_email="contact@palletsprojects.com",27 description="A very fast and expressive template engine.",28 long_description=readme,29 classifiers=[59 'Development Status :: 5 - Production/Stable',60 'Environment :: Web Environment',61 'Intended Audience :: Developers',62 'License :: OSI Approved :: BSD License',63 'Operating System :: OS Independent',64 'Programming Language :: Python',65 'Programming Language :: Python :: 2',66 'Programming Language :: Python :: 2.7',67 'Programming Language :: Python :: 3',68 'Programming Language :: Python :: 3.4',69 'Programming Language :: Python :: 3.5',70 'Programming Language :: Python :: 3.6',71 'Programming Language :: Python :: 3.7',72 'Programming Language :: Python :: Implementation :: CPython',73 'Programming Language :: Python :: Implementation :: PyPy',74 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',75 'Topic :: Software Development :: Libraries :: Python Modules',76 'Topic :: Text Processing :: Markup :: HTML'30 "Development Status :: 5 - Production/Stable",31 "Environment :: Web Environment",32 "Intended Audience :: Developers",33 "License :: OSI Approved :: BSD License",34 "Operating System :: OS Independent",35 "Programming Language :: Python",36 "Programming Language :: Python :: 2",37 "Programming Language :: Python :: 2.7",38 "Programming Language :: Python :: 3",39 "Programming Language :: Python :: 3.5",40 "Programming Language :: Python :: 3.6",41 "Programming Language :: Python :: 3.7",42 "Programming Language :: Python :: Implementation :: CPython",43 "Programming Language :: Python :: Implementation :: PyPy",44 "Topic :: Internet :: WWW/HTTP :: Dynamic Content",45 "Topic :: Software Development :: Libraries :: Python Modules",46 "Topic :: Text Processing :: Markup :: HTML",47 ],78 packages=['jinja2'],79 python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",80 install_requires=['MarkupSafe>=0.23'],81 extras_require={'i18n': ['Babel>=0.8']},48 packages=find_packages(),49 python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",50 include_package_data=True,83 entry_points="""84 [babel.extractors]85 jinja2 = jinja2.ext:babel_extract[i18n]86 """51 install_requires=["MarkupSafe>=0.23"],52 extras_require={"i18n": ["Babel>=0.8"]},53 entry_points={"babel.extractors": ["jinja2 = jinja2.ext:bable_extract[i18n]"]},54)