python-Genshi/python-genshi-py3-escape-sequence-doctest.patch
Tomáš Chvátal 074c446797 - Add patches to build on python 3.7:
* python-genshi-py3-escape-sequence-doctest.patch
  * python-genshi-py37-stopiteration.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Genshi?expand=0&rev=13
2018-08-07 07:49:55 +00:00

33 lines
1.0 KiB
Diff

From 7891f1dc0a35a1c790a20b73c8d4c84ed12c1077 Mon Sep 17 00:00:00 2001
From: Felix Schwarz <felix.schwarz@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