[Python-modules-commits] r34212 - in packages/genshi/trunk/debian (3 files)

barry at users.alioth.debian.org barry at users.alioth.debian.org
Tue Sep 8 22:46:16 UTC 2015


    Date: Tuesday, September 8, 2015 @ 22:46:14
  Author: barry
Revision: 34212

* debian/patches:
  - issue602.patch: Upstream patch for Python 3.5 compatibility.
    (Closes: #798030)
  - issue566.patch: Fix IndexError when uploading attachments in Trac
    for users with non-English language settings (Closes: #775746)

Added:
  packages/genshi/trunk/debian/patches/issue566.patch
Modified:
  packages/genshi/trunk/debian/changelog
  packages/genshi/trunk/debian/patches/series

Modified: packages/genshi/trunk/debian/changelog
===================================================================
--- packages/genshi/trunk/debian/changelog	2015-09-08 22:30:37 UTC (rev 34211)
+++ packages/genshi/trunk/debian/changelog	2015-09-08 22:46:14 UTC (rev 34212)
@@ -1,7 +1,10 @@
 genshi (0.7-4) unstable; urgency=medium
 
-  * debian/patches/issue602.patch: Upstream patch for Python 3.5
-    compatibility.  (Closes: #798030)
+  * debian/patches:
+    - issue602.patch: Upstream patch for Python 3.5 compatibility.
+      (Closes: #798030)
+    - issue566.patch: Fix IndexError when uploading attachments in Trac
+      for users with non-English language settings (Closes: #775746)
   * debian/control: Bump Standards-Version with no other changes needed.
   * debian/tests: Add simple DEP-8 tests for both Python 2 and 3.
   * debian/python3-genshi.pyremove: Removed.

Added: packages/genshi/trunk/debian/patches/issue566.patch
===================================================================
--- packages/genshi/trunk/debian/patches/issue566.patch	                        (rev 0)
+++ packages/genshi/trunk/debian/patches/issue566.patch	2015-09-08 22:46:14 UTC (rev 34212)
@@ -0,0 +1,43 @@
+Description: Fix an IndexError preventing Genshi for uploading attachments in
+ Trac for users with non-English language settings.
+Origin: http://genshi.edgewall.org/changeset/1243?format=diff&new=1243
+Bug: http://genshi.edgewall.org/ticket/566
+
+--- a/genshi/filters/i18n.py
++++ b/genshi/filters/i18n.py
+@@ -1048,7 +1048,13 @@
+ 
+         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()
+ 
+             for event in events:
+--- a/genshi/filters/tests/i18n.py
++++ b/genshi/filters/tests/i18n.py
+@@ -928,6 +928,18 @@
+           """</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())
++
+ 
+ class ChooseDirectiveTestCase(unittest.TestCase):
+ 

Modified: packages/genshi/trunk/debian/patches/series
===================================================================
--- packages/genshi/trunk/debian/patches/series	2015-09-08 22:30:37 UTC (rev 34211)
+++ packages/genshi/trunk/debian/patches/series	2015-09-08 22:46:14 UTC (rev 34212)
@@ -1,3 +1,4 @@
 issue602.patch
 fix_tests_failure_with_python27.patch
 issue582.patch
+issue566.patch




More information about the Python-modules-commits mailing list