Hello community,

here is the log from the commit of package python-Jinja2 for openSUSE:Factory 
checked in at 2013-08-15 12:29:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Jinja2 (Old)
 and      /work/SRC/openSUSE:Factory/.python-Jinja2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Jinja2"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Jinja2/python-Jinja2.changes      
2013-07-11 19:37:07.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-Jinja2.new/python-Jinja2.changes 
2013-08-15 12:29:09.000000000 +0200
@@ -1,0 +2,15 @@
+Tue Aug 13 09:56:18 UTC 2013 - dmuel...@suse.com
+
+- update to 2.7.1:
+ - Fixed a bug with ``call_filter`` not working properly on environment
+   and context filters.
+ - Fixed lack of Python 3 support for bytecode caches.
+ - Reverted support for defining blocks in included templates as this
+   broke existing templates for users.
+ - Fixed some warnings with hashing of undefineds and nodes if Python
+   is run with warnings for Python 3.
+ - Added support for properly hashing undefined objects.
+ - Fixed a bug with the title filter not working on already uppercase
+   strings.
+
+-------------------------------------------------------------------

Old:
----
  Jinja2-2.7.tar.gz

New:
----
  Jinja2-2.7.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-Jinja2.spec ++++++
--- /var/tmp/diff_new_pack.nncWGb/_old  2013-08-15 12:29:10.000000000 +0200
+++ /var/tmp/diff_new_pack.nncWGb/_new  2013-08-15 12:29:10.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           python-Jinja2
-Version:        2.7
+Version:        2.7.1
 Release:        0
 Summary:        A fast and easy to use template engine written in pure Python
 License:        BSD-3-Clause

++++++ Jinja2-2.7.tar.gz -> Jinja2-2.7.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-2.7/CHANGES new/Jinja2-2.7.1/CHANGES
--- old/Jinja2-2.7/CHANGES      2013-05-20 15:02:34.000000000 +0200
+++ new/Jinja2-2.7.1/CHANGES    2013-08-07 14:05:58.000000000 +0200
@@ -1,6 +1,21 @@
 Jinja2 Changelog
 ================
 
+Version 2.7.1
+-------------
+(bugfix release, released on August 7th 2013)
+
+- Fixed a bug with ``call_filter`` not working properly on environment
+  and context filters.
+- Fixed lack of Python 3 support for bytecode caches.
+- Reverted support for defining blocks in included templates as this
+  broke existing templates for users.
+- Fixed some warnings with hashing of undefineds and nodes if Python
+  is run with warnings for Python 3.
+- Added support for properly hashing undefined objects.
+- Fixed a bug with the title filter not working on already uppercase
+  strings.
+
 Version 2.7
 -----------
 (codename Translation, released on May 20th 2013)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-2.7/Jinja2.egg-info/PKG-INFO 
new/Jinja2-2.7.1/Jinja2.egg-info/PKG-INFO
--- old/Jinja2-2.7/Jinja2.egg-info/PKG-INFO     2013-05-20 15:02:56.000000000 
+0200
+++ new/Jinja2-2.7.1/Jinja2.egg-info/PKG-INFO   2013-08-07 15:27:32.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: Jinja2
-Version: 2.7
+Version: 2.7.1
 Summary: A small but fast and easy to use stand-alone template engine written 
in pure python.
 Home-page: http://jinja.pocoo.org/
 Author: Armin Ronacher
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-2.7/Jinja2.egg-info/SOURCES.txt 
new/Jinja2-2.7.1/Jinja2.egg-info/SOURCES.txt
--- old/Jinja2-2.7/Jinja2.egg-info/SOURCES.txt  2013-05-20 15:02:56.000000000 
+0200
+++ new/Jinja2-2.7.1/Jinja2.egg-info/SOURCES.txt        2013-08-07 
15:27:32.000000000 +0200
@@ -105,6 +105,7 @@
 jinja2/visitor.py
 jinja2/testsuite/__init__.py
 jinja2/testsuite/api.py
+jinja2/testsuite/bytecode_cache.py
 jinja2/testsuite/core_tags.py
 jinja2/testsuite/debug.py
 jinja2/testsuite/doctests.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-2.7/PKG-INFO new/Jinja2-2.7.1/PKG-INFO
--- old/Jinja2-2.7/PKG-INFO     2013-05-20 15:02:56.000000000 +0200
+++ new/Jinja2-2.7.1/PKG-INFO   2013-08-07 15:27:32.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: Jinja2
-Version: 2.7
+Version: 2.7.1
 Summary: A small but fast and easy to use stand-alone template engine written 
in pure python.
 Home-page: http://jinja.pocoo.org/
 Author: Armin Ronacher
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-2.7/jinja2/__init__.py 
new/Jinja2-2.7.1/jinja2/__init__.py
--- old/Jinja2-2.7/jinja2/__init__.py   2013-05-20 15:02:56.000000000 +0200
+++ new/Jinja2-2.7.1/jinja2/__init__.py 2013-08-07 15:27:31.000000000 +0200
@@ -27,7 +27,7 @@
     :license: BSD, see LICENSE for more details.
 """
 __docformat__ = 'restructuredtext en'
-__version__ = '2.7'
+__version__ = '2.7.1'
 
 # high level interface
 from jinja2.environment import Environment, Template
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-2.7/jinja2/bccache.py 
new/Jinja2-2.7.1/jinja2/bccache.py
--- old/Jinja2-2.7/jinja2/bccache.py    2013-05-19 15:32:25.000000000 +0200
+++ new/Jinja2-2.7.1/jinja2/bccache.py  2013-08-07 13:31:17.000000000 +0200
@@ -21,7 +21,7 @@
 import fnmatch
 from hashlib import sha1
 from jinja2.utils import open_if_exists
-from jinja2._compat import BytesIO, pickle, PY2
+from jinja2._compat import BytesIO, pickle, PY2, text_type
 
 
 # marshal works better on 3.x, one hack less required
@@ -160,7 +160,7 @@
         hash = sha1(name.encode('utf-8'))
         if filename is not None:
             filename = '|' + filename
-            if isinstance(filename, unicode):
+            if isinstance(filename, text_type):
                 filename = filename.encode('utf-8')
             hash.update(filename)
         return hash.hexdigest()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-2.7/jinja2/compiler.py 
new/Jinja2-2.7.1/jinja2/compiler.py
--- old/Jinja2-2.7/jinja2/compiler.py   2013-05-20 10:23:20.000000000 +0200
+++ new/Jinja2-2.7.1/jinja2/compiler.py 2013-08-07 13:40:59.000000000 +0200
@@ -949,16 +949,9 @@
             self.indent()
 
         if node.with_context:
-            self.writeline('include_context = template.new_context('
-                           'context.parent, True, locals())')
-            self.writeline('for name, context_blocks in context.'
-                           'blocks.%s():' % dict_item_iter)
-            self.indent()
-            self.writeline('include_context.blocks.setdefault('
-                           'name, [])[0:0] = context_blocks')
-            self.outdent()
             self.writeline('for event in template.root_render_func('
-                           'include_context):')
+                           'template.new_context(context.parent, True, '
+                           'locals())):')
         else:
             self.writeline('for event in template.module._body_stream:')
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-2.7/jinja2/environment.py 
new/Jinja2-2.7.1/jinja2/environment.py
--- old/Jinja2-2.7/jinja2/environment.py        2013-05-20 13:09:56.000000000 
+0200
+++ new/Jinja2-2.7.1/jinja2/environment.py      2013-07-26 18:00:44.000000000 
+0200
@@ -411,7 +411,7 @@
         func = self.filters.get(name)
         if func is None:
             raise TemplateRuntimeError('no filter named %r' % name)
-        args = list(args or ())
+        args = [value] + list(args or ())
         if getattr(func, 'contextfilter', False):
             if context is None:
                 raise TemplateRuntimeError('Attempted to invoke context '
@@ -426,7 +426,7 @@
             args.insert(0, eval_ctx)
         elif getattr(func, 'environmentfilter', False):
             args.insert(0, self)
-        return func(value, *args, **(kwargs or {}))
+        return func(*args, **(kwargs or {}))
 
     def call_test(self, name, value, args=None, kwargs=None):
         """Invokes a test on a value the same way the compiler does it.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-2.7/jinja2/filters.py 
new/Jinja2-2.7.1/jinja2/filters.py
--- old/Jinja2-2.7/jinja2/filters.py    2013-05-20 10:05:46.000000000 +0200
+++ new/Jinja2-2.7.1/jinja2/filters.py  2013-08-07 13:51:57.000000000 +0200
@@ -186,7 +186,7 @@
     for item in re.compile(r'([-\s]+)(?u)').split(s):
         if not item:
             continue
-        rv.append(item[0].upper() + item[1:])
+        rv.append(item[0].upper() + item[1:].lower())
     return ''.join(rv)
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-2.7/jinja2/nodes.py 
new/Jinja2-2.7.1/jinja2/nodes.py
--- old/Jinja2-2.7/jinja2/nodes.py      2013-05-20 03:05:20.000000000 +0200
+++ new/Jinja2-2.7.1/jinja2/nodes.py    2013-08-07 13:44:47.000000000 +0200
@@ -232,6 +232,9 @@
     def __ne__(self, other):
         return not self.__eq__(other)
 
+    # Restore Python 2 hashing behavior on Python 3
+    __hash__ = object.__hash__
+
     def __repr__(self):
         return '%s(%s)' % (
             self.__class__.__name__,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-2.7/jinja2/runtime.py 
new/Jinja2-2.7.1/jinja2/runtime.py
--- old/Jinja2-2.7/jinja2/runtime.py    2013-05-20 10:26:46.000000000 +0200
+++ new/Jinja2-2.7.1/jinja2/runtime.py  2013-08-07 13:47:44.000000000 +0200
@@ -497,6 +497,15 @@
     __float__ = __complex__ = __pow__ = __rpow__ = \
         _fail_with_undefined_error
 
+    def __eq__(self, other):
+        return type(self) is type(other)
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+
+    def __hash__(self):
+        return id(type(self))
+
     def __str__(self):
         return u''
 
@@ -563,7 +572,8 @@
     """
     __slots__ = ()
     __iter__ = __str__ = __len__ = __nonzero__ = __eq__ = \
-        __ne__ = __bool__ = Undefined._fail_with_undefined_error
+        __ne__ = __bool__ = __hash__ = \
+        Undefined._fail_with_undefined_error
 
 
 # remove remaining slots attributes, after the metaclass did the magic they
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-2.7/jinja2/testsuite/__init__.py 
new/Jinja2-2.7.1/jinja2/testsuite/__init__.py
--- old/Jinja2-2.7/jinja2/testsuite/__init__.py 2013-05-20 12:51:19.000000000 
+0200
+++ new/Jinja2-2.7.1/jinja2/testsuite/__init__.py       2013-08-07 
13:31:17.000000000 +0200
@@ -123,7 +123,7 @@
 def suite():
     from jinja2.testsuite import ext, filters, tests, core_tags, \
          loader, inheritance, imports, lexnparse, security, api, \
-         regression, debug, utils, doctests
+         regression, debug, utils, bytecode_cache, doctests
     suite = unittest.TestSuite()
     suite.addTest(ext.suite())
     suite.addTest(filters.suite())
@@ -138,6 +138,7 @@
     suite.addTest(regression.suite())
     suite.addTest(debug.suite())
     suite.addTest(utils.suite())
+    suite.addTest(bytecode_cache.suite())
 
     # doctests will not run on python 3 currently.  Too many issues
     # with that, do not test that on that platform.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-2.7/jinja2/testsuite/bytecode_cache.py 
new/Jinja2-2.7.1/jinja2/testsuite/bytecode_cache.py
--- old/Jinja2-2.7/jinja2/testsuite/bytecode_cache.py   1970-01-01 
01:00:00.000000000 +0100
+++ new/Jinja2-2.7.1/jinja2/testsuite/bytecode_cache.py 2013-08-07 
13:31:17.000000000 +0200
@@ -0,0 +1,37 @@
+# -*- coding: utf-8 -*-
+"""
+    jinja2.testsuite.bytecode_cache
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+    Test bytecode caching
+
+    :copyright: (c) 2010 by the Jinja Team.
+    :license: BSD, see LICENSE for more details.
+"""
+import unittest
+
+from jinja2.testsuite import JinjaTestCase, package_loader
+
+from jinja2 import Environment
+from jinja2.bccache import FileSystemBytecodeCache
+from jinja2.exceptions import TemplateNotFound
+
+bytecode_cache = FileSystemBytecodeCache()
+env = Environment(
+    loader=package_loader,
+    bytecode_cache=bytecode_cache,
+)
+
+
+class ByteCodeCacheTestCase(JinjaTestCase):
+
+    def test_simple(self):
+        tmpl = env.get_template('test.html')
+        assert tmpl.render().strip() == 'BAR'
+        self.assert_raises(TemplateNotFound, env.get_template, 'missing.html')
+
+
+def suite():
+    suite = unittest.TestSuite()
+    suite.addTest(unittest.makeSuite(ByteCodeCacheTestCase))
+    return suite
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-2.7/jinja2/testsuite/filters.py 
new/Jinja2-2.7.1/jinja2/testsuite/filters.py
--- old/Jinja2-2.7/jinja2/testsuite/filters.py  2013-05-20 10:06:37.000000000 
+0200
+++ new/Jinja2-2.7.1/jinja2/testsuite/filters.py        2013-08-07 
13:52:20.000000000 +0200
@@ -19,6 +19,10 @@
 
 class FilterTestCase(JinjaTestCase):
 
+    def test_filter_calling(self):
+        rv = env.call_filter('sum', [1, 2, 3])
+        self.assert_equal(rv, 6)
+
     def test_capitalize(self):
         tmpl = env.from_string('{{ "foo bar"|capitalize }}')
         assert tmpl.render() == 'Foo bar'
@@ -204,6 +208,8 @@
         assert tmpl.render() == "Foo-Bar"
         tmpl = env.from_string('''{{ "foo\tbar"|title }}''')
         assert tmpl.render() == "Foo\tBar"
+        tmpl = env.from_string('''{{ "FOO\tBAR"|title }}''')
+        assert tmpl.render() == "Foo\tBar"
 
     def test_truncate(self):
         tmpl = env.from_string(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-2.7/jinja2/testsuite/imports.py 
new/Jinja2-2.7.1/jinja2/testsuite/imports.py
--- old/Jinja2-2.7/jinja2/testsuite/imports.py  2013-05-19 14:25:43.000000000 
+0200
+++ new/Jinja2-2.7.1/jinja2/testsuite/imports.py        2013-08-07 
13:40:59.000000000 +0200
@@ -121,22 +121,6 @@
         )))
         assert env.get_template("main").render() == "123"
 
-    def test_included_block_override(self):
-        env = Environment(loader=DictLoader(dict(
-            main="{% extends 'base' %}{% block b %}1337{% endblock %}",
-            base="{% include 'inc' %}",
-            inc="{% block b %}42{% endblock %}"
-        )))
-        assert env.get_template("main").render() == "1337"
-
-    def test_included_block_override_with_super(self):
-        env = Environment(loader=DictLoader(dict(
-            main="{% extends 'base' %}{% block b %}1337|{{ super() }}{% 
endblock %}",
-            base="{% include 'inc' %}",
-            inc="{% block b %}42{% endblock %}"
-        )))
-        assert env.get_template("main").render() == "1337|42"
-
     def test_unoptimized_scopes(self):
         t = test_env.from_string("""
             {% macro outer(o) %}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Jinja2-2.7/setup.py new/Jinja2-2.7.1/setup.py
--- old/Jinja2-2.7/setup.py     2013-05-20 15:02:56.000000000 +0200
+++ new/Jinja2-2.7.1/setup.py   2013-08-07 15:27:31.000000000 +0200
@@ -57,7 +57,7 @@
 
 setup(
     name='Jinja2',
-    version='2.7',
+    version='2.7.1',
     url='http://jinja.pocoo.org/',
     license='BSD',
     author='Armin Ronacher',

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to