Skip to content
Myr

Removed mention of speedup module and rewrote docs for markupsafe dependency

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 · parent 294f2eb · Browse files · 2 files+5 added−47 removed
This commit

State

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

Diff stats

2 files+5 added−47 removed

  • other:+5 added−47 removed

2 files+5 added−47 removed

modified:docs/faq.rst-18 removed
123 unmodified lines
124instead that one can assign to a variable by using set::125126 {% set comments = get_latest_comments() %}127128What is the speedups module and why is it missing?129--------------------------------------------------130131To achieve a good performance with automatic escaping enabled, the escaping132function was also implemented in pure C in older Jinja2 releases and used if133Jinja2 was installed with the speedups module.134135Because this feature itself is very useful for non-template engines as136well it was moved into a separate project on PyPI called `MarkupSafe`_.137138Jinja2 no longer ships with a C implementation of it but only the pure139Python implementation. It will however check if MarkupSafe is available140and installed, and if it is, use the Markup class from MarkupSafe.141142So if you want the speedups, just install MarkupSafe.143144.. _MarkupSafe: http://pypi.python.org/pypi/MarkupSafe145128My tracebacks look weird. What's happening?129--------------------------------------------130131If the debugsupport module is not compiled and you are using a Python
54 unmodified lines
modified:docs/intro.rst+5 added-29 removed
70 unmodified lines
71.. _pip: http://pypi.python.org/pypi/pip72.. _git: http://git-scm.org/737475More Speed with MarkupSafe76~~~~~~~~~~~~~~~~~~~~~~~~~~75MarkupSafe Dependency76~~~~~~~~~~~~~~~~~~~~~7778As of version 2.5.1 Jinja2 will check for an installed `MarkupSafe`_79module. If it can find it, it will use the Markup class of that module80instead of the one that comes with Jinja2. `MarkupSafe` replaces the81older speedups module that came with Jinja2 and has the advantage that is82has a better setup script and will automatically attempt to install the C83version and nicely fall back to a pure Python implementation if that is84not possible.78As of version 2.7 Jinja2 depends on the `MarkupSafe`_ module. If you79install Jinja2 via `pip` or `easy_install` it will be installed80automatically for you.8186The C implementation of MarkupSafe is much faster and recommended when87using Jinja2 with autoescaping.8882.. _MarkupSafe: http://pypi.python.org/pypi/MarkupSafe839192<<<<<<< HEAD93=======94Enable the debug support Module95~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~9697By default Jinja2 will not compile the debug support module. Enabling this98will fail if you don't have the Python headers or a working compiler. This99is often the case if you are installing Jinja2 from a Windows machine.100101Because the debug support is only necessary for Python 2.4 you will not102have to do this unless you run 2.4::103104 sudo python setup.py --with-debugsupport install105106107>>>>>>> Talksum/distribute_required84Basic API Usage85---------------8687This section gives you a brief introduction to the Python API for Jinja2
37 unmodified lines