From d75b03c219414cc0f0567d1ce46b15d4326387c68da4b831669251c09e3e26e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Thu, 6 Oct 2022 14:04:27 +0000 Subject: [PATCH] Accepting request 1008411 from home:mcalabkova:branches:devel:languages:python - Add markdown.patch to fix the tests OBS-URL: https://build.opensuse.org/request/show/1008411 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Pweave?expand=0&rev=15 --- markdown.patch | 37 +++++++++++++++++++++++++++++++++++++ python-Pweave.changes | 5 +++++ python-Pweave.spec | 5 ++++- 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 markdown.patch diff --git a/markdown.patch b/markdown.patch new file mode 100644 index 0000000..752a43e --- /dev/null +++ b/markdown.patch @@ -0,0 +1,37 @@ +From d956f7d02105a4ae734a8713f5e10a956fbbe5c8 Mon Sep 17 00:00:00 2001 +From: Dmitry Shachnev +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'(? + +- Add markdown.patch to fix the tests + ------------------------------------------------------------------- Fri Feb 12 15:04:56 UTC 2021 - Dirk Müller diff --git a/python-Pweave.spec b/python-Pweave.spec index 63ca16d..c7bff00 100644 --- a/python-Pweave.spec +++ b/python-Pweave.spec @@ -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 @@ Summary: Scientific reports with embedded python computations 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 @@ with e.g. Sphinx or rest2web. %prep %setup -q -n Pweave-%{version} +%autopatch -p1 %build %python_build