From 364711776d3d6624363adce273b92b7253dc12eba710408ab34795ac1b188026 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 4 May 2023 16:51:26 +0000 Subject: [PATCH] Accepting request 1084794 from home:david.anes:home:libxml2 - Add patch skip-test-under-libxml2-2.11.1.patch: * Skip a test if using libxml2 >= 2.11.1 OBS-URL: https://build.opensuse.org/request/show/1084794 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-lxml?expand=0&rev=181 --- python-lxml.changes | 6 ++++++ python-lxml.spec | 3 +++ skip-test-under-libxml2-2.11.1.patch | 20 ++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 skip-test-under-libxml2-2.11.1.patch diff --git a/python-lxml.changes b/python-lxml.changes index 6f684c6..ef2dfec 100644 --- a/python-lxml.changes +++ b/python-lxml.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu May 4 14:52:53 UTC 2023 - David Anes + +- Add patch skip-test-under-libxml2-2.11.1.patch: + * Skip a test if using libxml2 >= 2.11.1 + ------------------------------------------------------------------- Sun Apr 23 23:11:01 UTC 2023 - Matej Cepl diff --git a/python-lxml.spec b/python-lxml.spec index e861c88..0bb6a4b 100644 --- a/python-lxml.spec +++ b/python-lxml.spec @@ -33,6 +33,9 @@ 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 +# PATCH-FIX-OPENSUSE Skip a test under libxml2 2.11.1+ +# https://bugs.launchpad.net/lxml/+bug/2018522 +Patch2: skip-test-under-libxml2-2.11.1.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.11.1.patch b/skip-test-under-libxml2-2.11.1.patch new file mode 100644 index 0000000..1139722 --- /dev/null +++ b/skip-test-under-libxml2-2.11.1.patch @@ -0,0 +1,20 @@ +Index: lxml-4.9.2/src/lxml/tests/test_io.py +=================================================================== +--- lxml-4.9.2.orig/src/lxml/tests/test_io.py ++++ lxml-4.9.2/src/lxml/tests/test_io.py +@@ -15,6 +15,7 @@ from .common_imports import ( + read_file, write_to_file, BytesIO, tmpfile + ) + ++import lxml + + class _IOTestCaseBase(HelperTestCase): + """(c)ElementTree compatibility for IO functions/methods +@@ -304,6 +305,7 @@ class _IOTestCaseBase(HelperTestCase): + os.unlink(f.name) + self.assertEqual(utext, root.text) + ++ @unittest.skipIf(lxml.etree.LIBXML_VERSION >= (2, 11, 1), "libxml2 regression has issues with utf16") + def test_iterparse_utf16_bom(self): + utext = _str('Søk på nettet') + uxml = '

%s

' % utext