From: Armin Ronacher Date: Sun, 19 May 2013 12:51:47 +0000 (+0100) Subject: Removed mention of speedup module and rewrote docs for markupsafe dependency X-Git-Tag: 2.7~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd7bf5b00f77adc0f875efb9d945b9b42271f53a;p=thirdparty%2Fjinja.git Removed mention of speedup module and rewrote docs for markupsafe dependency --- diff --git a/docs/faq.rst b/docs/faq.rst index f66bd81f..4db50799 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -125,24 +125,6 @@ instead that one can assign to a variable by using set:: {% set comments = get_latest_comments() %} -What is the speedups module and why is it missing? --------------------------------------------------- - -To achieve a good performance with automatic escaping enabled, the escaping -function was also implemented in pure C in older Jinja2 releases and used if -Jinja2 was installed with the speedups module. - -Because this feature itself is very useful for non-template engines as -well it was moved into a separate project on PyPI called `MarkupSafe`_. - -Jinja2 no longer ships with a C implementation of it but only the pure -Python implementation. It will however check if MarkupSafe is available -and installed, and if it is, use the Markup class from MarkupSafe. - -So if you want the speedups, just install MarkupSafe. - -.. _MarkupSafe: http://pypi.python.org/pypi/MarkupSafe - My tracebacks look weird. What's happening? -------------------------------------------- diff --git a/docs/intro.rst b/docs/intro.rst index 5d7e9f8f..080f5c5b 100644 --- a/docs/intro.rst +++ b/docs/intro.rst @@ -72,39 +72,15 @@ has the advantage that the C extensions are compiled. .. _git: http://git-scm.org/ -More Speed with MarkupSafe -~~~~~~~~~~~~~~~~~~~~~~~~~~ +MarkupSafe Dependency +~~~~~~~~~~~~~~~~~~~~~ -As of version 2.5.1 Jinja2 will check for an installed `MarkupSafe`_ -module. If it can find it, it will use the Markup class of that module -instead of the one that comes with Jinja2. `MarkupSafe` replaces the -older speedups module that came with Jinja2 and has the advantage that is -has a better setup script and will automatically attempt to install the C -version and nicely fall back to a pure Python implementation if that is -not possible. - -The C implementation of MarkupSafe is much faster and recommended when -using Jinja2 with autoescaping. +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. .. _MarkupSafe: http://pypi.python.org/pypi/MarkupSafe - -<<<<<<< HEAD -======= -Enable the debug support Module -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -By default Jinja2 will not compile the debug support module. Enabling this -will fail if you don't have the Python headers or a working compiler. This -is often the case if you are installing Jinja2 from a Windows machine. - -Because the debug support is only necessary for Python 2.4 you will not -have to do this unless you run 2.4:: - - sudo python setup.py --with-debugsupport install - - ->>>>>>> Talksum/distribute_required Basic API Usage ---------------