From 7816ca56598e0f7148f5929bbf181244da3e0b06178406a793646f0d1bdbe4ac Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 19 Apr 2023 04:53:05 +0000 Subject: [PATCH] - Add patch skip-test-under-libxml2-2.10.4.patch: * Skip a test if using libxml2 >= 2.10.4 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-lxml?expand=0&rev=175 --- python-lxml.changes | 6 ++++++ python-lxml.spec | 3 +++ skip-test-under-libxml2-2.10.4.patch | 12 ++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 skip-test-under-libxml2-2.10.4.patch diff --git a/python-lxml.changes b/python-lxml.changes index fe20daf..cb857ed 100644 --- a/python-lxml.changes +++ b/python-lxml.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Apr 19 04:52:01 UTC 2023 - Steve Kowalik + +- Add patch skip-test-under-libxml2-2.10.4.patch: + * Skip a test if using libxml2 >= 2.10.4 + ------------------------------------------------------------------- Thu Feb 16 20:17:22 UTC 2023 - Dirk Müller diff --git a/python-lxml.spec b/python-lxml.spec index 852cf35..c4928ed 100644 --- a/python-lxml.spec +++ b/python-lxml.spec @@ -29,6 +29,9 @@ Source99: python-lxml.rpmlintrc # PATCH-FIX-UPSTREAM close_file_before_test.patch bsc#1206555 mcepl@suse.com # make sure the testing data are flushed to the file Patch0: close_file_before_test.patch +# PATCH-FIX-OPENSUSE Skip a test under libxml2 2.10.4+ +# https://bugs.launchpad.net/lxml/+bug/2016939 +Patch1: skip-test-under-libxml2-2.10.4.patch BuildRequires: %{python_module Cython >= 0.29.7} BuildRequires: %{python_module base} BuildRequires: %{python_module cssselect >= 0.9.1} diff --git a/skip-test-under-libxml2-2.10.4.patch b/skip-test-under-libxml2-2.10.4.patch new file mode 100644 index 0000000..d3fb77d --- /dev/null +++ b/skip-test-under-libxml2-2.10.4.patch @@ -0,0 +1,12 @@ +Index: lxml-4.9.2/src/lxml/tests/test_etree.py +=================================================================== +--- lxml-4.9.2.orig/src/lxml/tests/test_etree.py ++++ lxml-4.9.2/src/lxml/tests/test_etree.py +@@ -3068,6 +3068,7 @@ class ETreeOnlyTestCase(HelperTestCase): + self.assertEqual(re, e.nsmap) + self.assertEqual(r, s.nsmap) + ++ @unittest.skipIf(etree.LIBXML_VERSION >= (2, 10, 4), "libxml2 regression ignores namespaces") + def test_html_prefix_nsmap(self): + etree = self.etree + el = etree.HTML('aa').find('.//page-description')