Hello community,

here is the log from the commit of package python-Genshi for openSUSE:Factory 
checked in at 2015-02-22 17:25:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Genshi (Old)
 and      /work/SRC/openSUSE:Factory/.python-Genshi.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Genshi"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Genshi/python-Genshi.changes      
2013-10-23 13:11:13.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-Genshi.new/python-Genshi.changes 
2015-02-22 17:25:49.000000000 +0100
@@ -1,0 +2,5 @@
+Tue Feb 17 10:53:23 UTC 2015 - [email protected]
+
+- backport fix for bug 566 (pop from empty) from 0.7 devel 
(changeset_r1242.diff)
+
+-------------------------------------------------------------------

New:
----
  changeset_r1242.diff

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

Other differences:
------------------
++++++ python-Genshi.spec ++++++
--- /var/tmp/diff_new_pack.grzT98/_old  2015-02-22 17:25:50.000000000 +0100
+++ /var/tmp/diff_new_pack.grzT98/_new  2015-02-22 17:25:50.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-Genshi
 #
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 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
@@ -18,19 +18,21 @@
 
 Name:           python-Genshi
 Version:        0.7
-Release:        1
+Release:        0
 Url:            http://genshi.edgewall.org/
 Summary:        A toolkit for generation of output for the web
 License:        BSD-3-Clause
 Group:          Development/Languages/Python
 Source:         http://ftp.edgewall.com/pub/genshi/Genshi-%{version}.tar.gz
+# FIX-UPSTREAM http://genshi.edgewall.org/ticket/566
+Patch1:         changeset_r1242.diff
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-BuildRequires:  python-devel
 BuildRequires:  python-Babel
+BuildRequires:  python-devel
 BuildRequires:  python-setuptools
 BuildRequires:  python-xml
-Requires:       python-xml
 Requires:       python-Babel
+Requires:       python-xml
 Provides:       python-genshi = %{version}
 Obsoletes:      python-genshi < %{version}
 %if 0%{?suse_version} <= 1110
@@ -60,6 +62,7 @@
 
 %prep
 %setup -q -n Genshi-%{version}
+%patch1 -p2
 sed -i "1d" examples/{basic/run,basic/kidrun,tutorial/geddit/controller}.py # 
Fix non-excutable bits
 
 %build

++++++ changeset_r1242.diff ++++++
Index: /trunk/genshi/filters/tests/i18n.py
===================================================================
--- /trunk/genshi/filters/tests/i18n.py (revision 1177)
+++ /trunk/genshi/filters/tests/i18n.py (revision 1242)
@@ -928,4 +928,16 @@
           """</p></html>""",
           tmpl.generate(first="FIRST", second="SECOND").render())
+
+    def test_translate_i18n_msg_ticket_404_regression(self):
+        tmpl = MarkupTemplate("""<html xmlns:py="http://genshi.edgewall.org/";
+            xmlns:i18n="http://genshi.edgewall.org/i18n";>
+          <h1 i18n:msg="name">text <a>$name</a></h1>
+        </html>""")
+        gettext = lambda s: u'head [1:%(name)s] tail'
+        translator = Translator(gettext)
+        translator.setup(tmpl)
+        self.assertEqual("""<html>
+          <h1>head <a>NAME</a> tail</h1>
+        </html>""", tmpl.generate(name='NAME').render())
 
 
Index: /trunk/genshi/filters/i18n.py
===================================================================
--- /trunk/genshi/filters/i18n.py       (revision 1177)
+++ /trunk/genshi/filters/i18n.py       (revision 1242)
@@ -1049,5 +1049,11 @@
         while parts:
             order, string = parts.pop(0)
-            events = self.events[order].pop(0)
+            events = self.events[order]
+            if events:
+                events = events.pop(0)
+            else:
+                # create a dummy empty text event so any remaining
+                # part of the translation can be processed.
+                events = [(TEXT, "", (None, -1, -1))]
             parts_counter[order].pop()
 
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to