Hello community,

here is the log from the commit of package python-MarkupSafe for 
openSUSE:Factory checked in at 2014-07-16 16:37:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-MarkupSafe (Old)
 and      /work/SRC/openSUSE:Factory/.python-MarkupSafe.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-MarkupSafe"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-MarkupSafe/python-MarkupSafe.changes      
2014-05-10 08:32:41.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-MarkupSafe.new/python-MarkupSafe.changes 
2014-07-16 16:37:14.000000000 +0200
@@ -1,0 +2,6 @@
+Tue Jul 15 10:42:00 UTC 2014 - [email protected]
+
+- Update to 0.23
+  + No upstream changelog
+
+-------------------------------------------------------------------

Old:
----
  MarkupSafe-0.21.tar.gz

New:
----
  MarkupSafe-0.23.tar.gz

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

Other differences:
------------------
++++++ python-MarkupSafe.spec ++++++
--- /var/tmp/diff_new_pack.VffB3t/_old  2014-07-16 16:37:15.000000000 +0200
+++ /var/tmp/diff_new_pack.VffB3t/_new  2014-07-16 16:37:15.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           python-MarkupSafe
-Version:        0.21
+Version:        0.23
 Release:        0
 Url:            http://dev.pocoo.org/
 Summary:        Implements a XML/HTML/XHTML Markup safe string for Python

++++++ MarkupSafe-0.21.tar.gz -> MarkupSafe-0.23.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/MarkupSafe-0.21/MarkupSafe.egg-info/PKG-INFO 
new/MarkupSafe-0.23/MarkupSafe.egg-info/PKG-INFO
--- old/MarkupSafe-0.21/MarkupSafe.egg-info/PKG-INFO    2014-04-17 
11:50:53.000000000 +0200
+++ new/MarkupSafe-0.23/MarkupSafe.egg-info/PKG-INFO    2014-05-08 
16:58:52.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: MarkupSafe
-Version: 0.21
+Version: 0.23
 Summary: Implements a XML/HTML/XHTML Markup safe string for Python
 Home-page: http://github.com/mitsuhiko/markupsafe
 Author: Armin Ronacher
@@ -79,7 +79,7 @@
         3.  otherwise the default format system of Python kicks in and the 
result
             is HTML escaped.
         
-        Here is how you can implement your own formatting:
+        Here is how you can implement your own formatting::
         
             class User(object):
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/MarkupSafe-0.21/PKG-INFO new/MarkupSafe-0.23/PKG-INFO
--- old/MarkupSafe-0.21/PKG-INFO        2014-04-17 11:50:53.000000000 +0200
+++ new/MarkupSafe-0.23/PKG-INFO        2014-05-08 16:58:52.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: MarkupSafe
-Version: 0.21
+Version: 0.23
 Summary: Implements a XML/HTML/XHTML Markup safe string for Python
 Home-page: http://github.com/mitsuhiko/markupsafe
 Author: Armin Ronacher
@@ -79,7 +79,7 @@
         3.  otherwise the default format system of Python kicks in and the 
result
             is HTML escaped.
         
-        Here is how you can implement your own formatting:
+        Here is how you can implement your own formatting::
         
             class User(object):
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/MarkupSafe-0.21/README.rst 
new/MarkupSafe-0.23/README.rst
--- old/MarkupSafe-0.21/README.rst      2014-04-17 11:49:09.000000000 +0200
+++ new/MarkupSafe-0.23/README.rst      2014-04-17 11:58:15.000000000 +0200
@@ -71,7 +71,7 @@
 3.  otherwise the default format system of Python kicks in and the result
     is HTML escaped.
 
-Here is how you can implement your own formatting:
+Here is how you can implement your own formatting::
 
     class User(object):
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/MarkupSafe-0.21/markupsafe/__init__.py 
new/MarkupSafe-0.23/markupsafe/__init__.py
--- old/MarkupSafe-0.21/markupsafe/__init__.py  2014-04-17 11:43:10.000000000 
+0200
+++ new/MarkupSafe-0.23/markupsafe/__init__.py  2014-05-08 16:52:34.000000000 
+0200
@@ -10,6 +10,7 @@
 """
 import re
 import string
+from collections import Mapping
 from markupsafe._compat import text_type, string_types, int_types, \
      unichr, iteritems, PY2
 
@@ -42,7 +43,7 @@
     >>> class Foo(object):
     ...  def __html__(self):
     ...   return '<a href="#">foo</a>'
-    ... 
+    ...
     >>> Markup(Foo())
     Markup(u'<a href="#">foo</a>')
 
@@ -118,7 +119,8 @@
     rsplit.__doc__ = text_type.rsplit.__doc__
 
     def splitlines(self, *args, **kwargs):
-        return list(map(self.__class__, text_type.splitlines(self, *args, 
**kwargs)))
+        return list(map(self.__class__, text_type.splitlines(
+            self, *args, **kwargs)))
     splitlines.__doc__ = text_type.splitlines.__doc__
 
     def unescape(self):
@@ -195,7 +197,8 @@
         def format(*args, **kwargs):
             self, args = args[0], args[1:]
             formatter = EscapeFormatter(self.escape)
-            return self.__class__(formatter.format(self, *args, **kwargs))
+            kwargs = _MagicFormatMapping(args, kwargs)
+            return self.__class__(formatter.vformat(self, args, kwargs))
 
         def __html_format__(self, format_spec):
             if format_spec:
@@ -210,6 +213,37 @@
     del method, make_simple_escaping_wrapper
 
 
+class _MagicFormatMapping(Mapping):
+    """This class implements a dummy wrapper to fix a bug in the Python
+    standard library for string formatting.
+
+    See http://bugs.python.org/issue13598 for information about why
+    this is necessary.
+    """
+
+    def __init__(self, args, kwargs):
+        self._args = args
+        self._kwargs = kwargs
+        self._last_index = 0
+
+    def __getitem__(self, key):
+        if key == '':
+            idx = self._last_index
+            self._last_index += 1
+            try:
+                return self._args[idx]
+            except LookupError:
+                pass
+            key = str(idx)
+        return self._kwargs[key]
+
+    def __iter__(self):
+        return iter(self._kwargs)
+
+    def __len__(self):
+        return len(self._kwargs)
+
+
 if hasattr(text_type, 'format'):
     class EscapeFormatter(string.Formatter):
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/MarkupSafe-0.21/markupsafe/tests.py 
new/MarkupSafe-0.23/markupsafe/tests.py
--- old/MarkupSafe-0.21/markupsafe/tests.py     2014-04-17 11:48:41.000000000 
+0200
+++ new/MarkupSafe-0.23/markupsafe/tests.py     2014-05-08 16:58:28.000000000 
+0200
@@ -1,5 +1,6 @@
 # -*- coding: utf-8 -*-
 import gc
+import sys
 import unittest
 from markupsafe import Markup, escape, escape_silent
 from markupsafe._compat import text_type
@@ -42,7 +43,7 @@
             __str__ = __unicode__
         assert Markup(Foo()) == '<em>awesome</em>'
         assert Markup('<strong>%s</strong>') % Foo() == \
-               '<strong><em>awesome</em></strong>'
+            '<strong><em>awesome</em></strong>'
 
     def test_tuple_interpol(self):
         self.assertEqual(Markup('<em>%s:%s</em>') % (
@@ -78,6 +79,12 @@
              '<bar/>')):
             assert actual == expected, "%r should be %r!" % (actual, expected)
 
+    # This is new in 2.7
+    if sys.version_info >= (2, 7):
+        def test_formatting_empty(self):
+            formatted = Markup('{}').format(0)
+            assert formatted == Markup('0')
+
     def test_custom_formatting(self):
         class HasHTMLOnly(object):
             def __html__(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/MarkupSafe-0.21/setup.py new/MarkupSafe-0.23/setup.py
--- old/MarkupSafe-0.21/setup.py        2014-04-17 11:50:25.000000000 +0200
+++ new/MarkupSafe-0.23/setup.py        2014-05-08 16:58:40.000000000 +0200
@@ -66,7 +66,7 @@
     ext_modules = [ext] if with_binary else []
     setup(
         name='MarkupSafe',
-        version='0.21',
+        version='0.23',
         url='http://github.com/mitsuhiko/markupsafe',
         license='BSD',
         author='Armin Ronacher',

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to