diff --git a/python-xmltodict.changes b/python-xmltodict.changes index c396c6c..c866cf8 100644 --- a/python-xmltodict.changes +++ b/python-xmltodict.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Feb 22 10:27:36 UTC 2022 - Steve Kowalik + +- Add patch skip-tests-expat-245.patch: + * Do not run tests that make no sense with a current Expat. + ------------------------------------------------------------------- Fri May 29 10:34:50 UTC 2020 - Marketa Calabkova diff --git a/python-xmltodict.spec b/python-xmltodict.spec index 5863484..df997f4 100644 --- a/python-xmltodict.spec +++ b/python-xmltodict.spec @@ -1,7 +1,7 @@ # # spec file for package python-xmltodict # -# Copyright (c) 2020 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 @@ -22,9 +22,9 @@ Version: 0.12.0 Release: 0 Summary: Module to make XML working resemble JSON License: MIT -Group: Development/Languages/Python URL: https://github.com/martinblech/xmltodict Source: https://files.pythonhosted.org/packages/source/x/xmltodict/xmltodict-%{version}.tar.gz +Patch0: skip-tests-expat-245.patch BuildRequires: %{python_module setuptools} BuildRequires: %{python_module xml} BuildRequires: fdupes @@ -40,7 +40,7 @@ working with json, as in this: http://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html %prep -%setup -q -n xmltodict-%{version} +%autosetup -p1 -n xmltodict-%{version} sed -i '1{\@^#!%{_bindir}/env python@d}' xmltodict.py %build diff --git a/skip-tests-expat-245.patch b/skip-tests-expat-245.patch new file mode 100644 index 0000000..30170bf --- /dev/null +++ b/skip-tests-expat-245.patch @@ -0,0 +1,28 @@ +Index: xmltodict-0.12.0/tests/test_xmltodict.py +=================================================================== +--- xmltodict-0.12.0.orig/tests/test_xmltodict.py ++++ xmltodict-0.12.0/tests/test_xmltodict.py +@@ -8,6 +8,7 @@ except ImportError: + + from xml.parsers.expat import ParserCreate + from xml.parsers import expat ++import pyexpat + + + def _encode(s): +@@ -167,6 +168,7 @@ class XMLToDictTestCase(unittest.TestCas + self.assertEqual(parse(xml), + parse(xml.encode('utf-8'))) + ++ @unittest.skipIf(pyexpat.version_info >= (2, 4, 5), reason="Makes no sense with current Expat") + def test_namespace_support(self): + xml = """ + = (2, 4, 5), reason="Makes no sense with current Expat") + def test_namespace_collapse(self): + xml = """ +