Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-Pweave for openSUSE:Factory 
checked in at 2022-10-16 16:09:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Pweave (Old)
 and      /work/SRC/openSUSE:Factory/.python-Pweave.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Pweave"

Sun Oct 16 16:09:18 2022 rev:8 rq:1011214 version:0.30.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-Pweave/python-Pweave.changes      
2021-02-15 23:19:25.927676464 +0100
+++ /work/SRC/openSUSE:Factory/.python-Pweave.new.2275/python-Pweave.changes    
2022-10-16 16:09:22.726777635 +0200
@@ -1,0 +2,10 @@
+Sat Oct 15 23:41:37 UTC 2022 - Matej Cepl <mc...@suse.com>
+
+- Skip failing test testFIR_FilterExampleTex (gh#mpastell/Pweave#168)
+
+-------------------------------------------------------------------
+Thu Oct  6 14:02:25 UTC 2022 - Mark??ta Machov?? <mmach...@suse.com>
+
+- Add markdown.patch to fix the tests
+
+-------------------------------------------------------------------

New:
----
  markdown.patch

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

Other differences:
------------------
++++++ python-Pweave.spec ++++++
--- /var/tmp/diff_new_pack.j79y9q/_old  2022-10-16 16:09:23.330779052 +0200
+++ /var/tmp/diff_new_pack.j79y9q/_new  2022-10-16 16:09:23.334779061 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-Pweave
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -26,6 +26,8 @@
 License:        BSD-3-Clause
 URL:            https://github.com/mpastell/Pweave
 Source:         
https://files.pythonhosted.org/packages/source/P/Pweave/Pweave-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM https://github.com/mpastell/Pweave/pull/167 Adjust for 
API changes in Python-Markdown 3.0
+Patch0:         markdown.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
@@ -70,6 +72,7 @@
 
 %prep
 %setup -q -n Pweave-%{version}
+%autopatch -p1
 
 %build
 %python_build
@@ -97,7 +100,8 @@
 %check
 # tests.test_readers.test_url - online
 # Formatters/publish Layout changes with updates in jupyter
-%pytest -k 'not (test_url or testFormatters or test_publish)'
+# Failing test for testFIR_FilterExampleTex is gh#mpastell/Pweave#168
+%pytest -k 'not (test_url or testFormatters or test_publish or 
testFIR_FilterExampleTex)'
 
 %files %{python_files}
 %doc CHANGELOG.txt README.rst

++++++ markdown.patch ++++++
>From d956f7d02105a4ae734a8713f5e10a956fbbe5c8 Mon Sep 17 00:00:00 2001
From: Dmitry Shachnev <mity...@gmail.com>
Date: Mon, 18 Jul 2022 13:50:12 +0300
Subject: [PATCH] Adjust for API changes in Python-Markdown 3.0

Support for old deprecated API was removed in Python-Markdown 3.4.
---
 pweave/formatters/markdownmath.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/pweave/formatters/markdownmath.py 
b/pweave/formatters/markdownmath.py
index 5a9c629..f665160 100644
--- a/pweave/formatters/markdownmath.py
+++ b/pweave/formatters/markdownmath.py
@@ -1,3 +1,4 @@
+from xml.etree.ElementTree import Element
 import markdown
 
 
@@ -6,7 +7,7 @@ def __init__(self):
         markdown.inlinepatterns.Pattern.__init__(self, 
r'(?<!\\)(\$\$?)(.+?)\2')
 
     def handleMatch(self, m):
-        node = markdown.util.etree.Element('span class="math"')
+        node = Element('span class="math"')
         # node.text = markdown.util.AtomicString(m.group(2) + m.group(3) + 
m.group(2))
         if m.group(2) == "$$":
             node.text = markdown.util.AtomicString("\[" + m.group(3) + "\]")
@@ -17,5 +18,5 @@ def handleMatch(self, m):
 
 class MathExtension(markdown.Extension):
 
-    def extendMarkdown(self, md, md_globals):
-        md.inlinePatterns.add('math', MathPattern(), '<escape')
\ No newline at end of file
+    def extendMarkdown(self, md):
+        md.inlinePatterns.register(MathPattern(), 'math', 185)

Reply via email to