Hello community,

here is the log from the commit of package python-Genshi for openSUSE:Factory 
checked in at 2018-08-15 10:32:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Genshi (Old)
 and      /work/SRC/openSUSE:Factory/.python-Genshi.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Genshi"

Wed Aug 15 10:32:06 2018 rev:13 rq:627811 version:0.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Genshi/python-Genshi.changes      
2017-04-19 18:08:37.120574044 +0200
+++ /work/SRC/openSUSE:Factory/.python-Genshi.new/python-Genshi.changes 
2018-08-15 10:32:08.691611110 +0200
@@ -1,0 +2,7 @@
+Tue Aug  7 07:48:29 UTC 2018 - tchva...@suse.com
+
+- Add patches to build on python 3.7:
+  * python-genshi-py3-escape-sequence-doctest.patch
+  * python-genshi-py37-stopiteration.patch
+
+-------------------------------------------------------------------

New:
----
  python-genshi-py3-escape-sequence-doctest.patch
  python-genshi-py37-stopiteration.patch

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

Other differences:
------------------
++++++ python-Genshi.spec ++++++
--- /var/tmp/diff_new_pack.KLjj4Z/_old  2018-08-15 10:32:10.083613625 +0200
+++ /var/tmp/diff_new_pack.KLjj4Z/_new  2018-08-15 10:32:10.083613625 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-Genshi
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX 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,13 +17,14 @@
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define oldpython python
 Name:           python-Genshi
 Version:        0.7
 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
+URL:            http://genshi.edgewall.org/
 Source:         
https://files.pythonhosted.org/packages/source/G/Genshi/Genshi-%{version}.tar.gz
 # PATCH-FIX-UPSTREAM http://genshi.edgewall.org/ticket/566
 Patch1:         changeset_r1242.diff
@@ -39,6 +40,9 @@
 Patch6:         %{name}-bug-602-python35-support.patch
 # PATCH-FIX-UPSTREAM python-Genshi-python35-support-python27-fix.patch 
http://genshi.edgewall.org/ticket/602
 Patch7:         %{name}-bug-602-python35-support-python27-fix.patch
+# PATCH-FIX-UPSTREAM build for python3.7
+Patch8:         python-genshi-py3-escape-sequence-doctest.patch
+Patch9:         python-genshi-py37-stopiteration.patch
 BuildRequires:  %{python_module Babel}
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module setuptools}
@@ -48,12 +52,10 @@
 BuildRequires:  python-rpm-macros
 Requires:       python-Babel
 Requires:       python-xml
-%define oldpython python
 %ifpython2
 Obsoletes:      %{oldpython}-genshi < %{version}
 Provides:       %{oldpython}-genshi = %{version}
 %endif
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 %python_subpackages
 
 %description
@@ -63,7 +65,6 @@
 feature is a template language, which is heavily inspired by Kid.
 
 %package -n %{name}-doc
-
 Summary:        A toolkit for generation of output for the web - Documentation
 Group:          Development/Libraries/Python
 Requires:       %{name} = %{version}
@@ -87,6 +88,8 @@
 %patch5
 %patch6 -p1
 %patch7 -p1
+%patch8 -p1
+%patch9 -p1
 sed -i "1d" examples/{basic/run,basic/kidrun,tutorial/geddit/controller}.py # 
Fix non-excutable bits
 %fdupes -s doc
 pushd examples/bench/clearsilver
@@ -109,13 +112,12 @@
 %python_exec setup.py test
 
 %files %{python_files}
-%defattr(-,root,root,-)
-%doc COPYING ChangeLog README.txt
+%license COPYING
+%doc ChangeLog README.txt
 %{python_sitearch}/genshi/
 %{python_sitearch}/Genshi-%{version}-py%{python_version}.egg-info
 
 %files -n %{name}-doc
-%defattr(-,root,root,-)
 %doc doc examples
 
 %changelog

++++++ python-genshi-py3-escape-sequence-doctest.patch ++++++
>From 7891f1dc0a35a1c790a20b73c8d4c84ed12c1077 Mon Sep 17 00:00:00 2001
From: Felix Schwarz <felix.schw...@oss.schwarz.eu>
Date: Fri, 29 Jun 2018 09:01:09 +0200
Subject: [PATCH] prevent deprecation warning due to invalid escape sequence in
 NewTextTemplate doc test

Previously the running the test suite triggered a deprecation warning:

NewTextTemplate (genshi.template.text)
Doctest: genshi.template.text.NewTextTemplate ... <doctest 
genshi.template.text.NewTextTemplate[4]>:8: DeprecationWarning: invalid escape 
sequence \{
  ''')
ok
---
 genshi/template/text.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/genshi/template/text.py b/genshi/template/text.py
index e2342c7..15e3bbd 100644
--- a/genshi/template/text.py
+++ b/genshi/template/text.py
@@ -100,7 +100,7 @@ class NewTextTemplate(Template):
 
     >>> tmpl = NewTextTemplate('''Dear $name,
     ... 
-    ... \{# This is a comment #}
+    ... \\{# This is a comment #}
     ... We have the following items for you:
     ... {% for item in items %}\
     ...  * $item
-- 
2.17.1

++++++ python-genshi-py37-stopiteration.patch ++++++
>From 6fed7cdbf1b9f35fa085e22fc0d87d0614625313 Mon Sep 17 00:00:00 2001
From: Felix Schwarz <felix.schw...@oss.schwarz.eu>
Date: Fri, 29 Jun 2018 08:58:18 +0200
Subject: [PATCH 1/2] catch StopIteration and use plain "return" (Python 3.7
 compatibility)

In Python 3.7 StopIteration exceptions are transformed to RuntimeErrors (PEP 
479).

Probably we need to do this in more places but this gets the test suite passing
at least.
---
 genshi/core.py              | 5 ++++-
 genshi/filters/transform.py | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/genshi/core.py b/genshi/core.py
index 8c4c93d..d0e8ff6 100644
--- a/genshi/core.py
+++ b/genshi/core.py
@@ -270,7 +270,10 @@ COMMENT = Stream.COMMENT
 def _ensure(stream):
     """Ensure that every item on the stream is actually a markup event."""
     stream = iter(stream)
-    event = stream.next()
+    try:
+        event = stream.next()
+    except StopIteration:
+        return
 
     # Check whether the iterable is a real markup event stream by examining the
     # first item it yields; if it's not we'll need to do some conversion
diff --git a/genshi/filters/transform.py b/genshi/filters/transform.py
index 569fc05..d7475db 100644
--- a/genshi/filters/transform.py
+++ b/genshi/filters/transform.py
@@ -119,7 +119,7 @@ class PushBackStream(object):
                     yield event
                 except StopIteration:
                     if self.peek is None:
-                        raise
+                        return
 
 
 class Transformer(object):
-- 
2.17.1


Reply via email to