experimental Python 3 support.
authorArmin Ronacher <armin.ronacher@active-4.com>
Tue, 9 Feb 2010 01:09:10 +0000 (02:09 +0100)
committerArmin Ronacher <armin.ronacher@active-4.com>
Tue, 9 Feb 2010 01:09:10 +0000 (02:09 +0100)
--HG--
branch : trunk

CHANGES
jinja2/environment.py
setup.py

diff --git a/CHANGES b/CHANGES
index 1b6f7d67adce1ba2f73087fc422716a8962e4197..4241487941148ab0e3a7be97f87f9f9e1245cd61 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -20,6 +20,7 @@ Version 2.3
   now. (#364)
 - added support for translator comments if extracted via babel.
 - added with-statement extension.
+- experimental Python 3 support.
 
 Version 2.2.1
 -------------
index 2f72ecc16103eaf1a0d360193c1300128592ae22..9ee3fb744fe934c9746f7a47d6ae38a8603e10f1 100644 (file)
@@ -475,7 +475,7 @@ class Environment(object):
         >>> env.compile_expression('var', undefined_to_none=False)()
         Undefined
 
-        **new in Jinja 2.1**
+        .. versionadded:: 2.1
         """
         parser = Parser(self, source, state='variable')
         exc_info = None
@@ -564,7 +564,7 @@ class Environment(object):
         before it fails.  If it cannot find any of the templates, it will
         raise a :exc:`TemplatesNotFound` exception.
 
-        .. versionadded:: 2.2
+        .. versionadded:: 2.3
         """
         if not names:
             raise TemplatesNotFound(message=u'Tried to select from an empty list '
@@ -586,7 +586,7 @@ class Environment(object):
         Does a typecheck and dispatches to :meth:`select_template` if an
         iterable of template names is given, otherwise to :meth:`get_template`.
 
-        .. versionadded:: 2.2
+        .. versionadded:: 2.3
         """
         if isinstance(template_name_or_list, basestring):
             return self.get_template(template_name_or_list, parent, globals)
index 09998a49744503a39039855b1ad73427a471379b..5e9efcb1faf9461407b48c74da5b3b1ac1c9c083 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -46,6 +46,11 @@ from setuptools import setup, Extension, Feature
 from distutils.command.build_ext import build_ext
 from distutils.errors import CCompilerError, DistutilsPlatformError
 
+try:
+    from distutils.command.build_py import build_py_2to3 as build_py
+except ImportError:
+    from distutils.command.build_py import build_py
+
 
 setup(
     name='Jinja2',
@@ -83,5 +88,6 @@ setup(
     entry_points="""
     [babel.extractors]
     jinja2 = jinja2.ext:babel_extract[i18n]
-    """
+    """,
+    cmdclass=dict(build_py=build_py)
 )