Hello community,
here is the log from the commit of package python3-MarkupSafe for
openSUSE:Factory checked in at 2014-07-15 16:26:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-MarkupSafe (Old)
and /work/SRC/openSUSE:Factory/.python3-MarkupSafe.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-MarkupSafe"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-MarkupSafe/python3-MarkupSafe.changes
2014-05-09 06:58:31.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.python3-MarkupSafe.new/python3-MarkupSafe.changes
2014-07-15 16:26:12.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:
------------------
++++++ python3-MarkupSafe.spec ++++++
--- /var/tmp/diff_new_pack.TQh3xU/_old 2014-07-15 16:26:13.000000000 +0200
+++ /var/tmp/diff_new_pack.TQh3xU/_new 2014-07-15 16:26:13.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python3-MarkupSafe
#
-# Copyright (c) 20124 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: python3-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]