From f7961fa66a7b435da398af2241363fb8f477f755ef21eb0782f216688f2fda34 Mon Sep 17 00:00:00 2001 From: Daniel Garcia Date: Thu, 15 Feb 2024 10:27:06 +0000 Subject: [PATCH] Accepting request 1146776 from home:dgarcia:branches:devel:languages:python:Factory - Add skip-test-under-libexpat-2.6.0.patch to skip broken test with expat 2.6.0, gh#python/cpython#115133 OBS-URL: https://build.opensuse.org/request/show/1146776 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-lxml?expand=0&rev=198 --- python-lxml.changes | 6 ++++++ python-lxml.spec | 3 +++ skip-test-under-libexpat-2.6.0.patch | 16 ++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 skip-test-under-libexpat-2.6.0.patch diff --git a/python-lxml.changes b/python-lxml.changes index 332c77c..4c1aa16 100644 --- a/python-lxml.changes +++ b/python-lxml.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 15 08:59:28 UTC 2024 - Daniel Garcia + +- Add skip-test-under-libexpat-2.6.0.patch to skip broken test with + expat 2.6.0, gh#python/cpython#115133 + ------------------------------------------------------------------- Wed Jan 24 10:53:21 UTC 2024 - ecsos diff --git a/python-lxml.spec b/python-lxml.spec index b48f4bf..4c01571 100644 --- a/python-lxml.spec +++ b/python-lxml.spec @@ -33,6 +33,9 @@ 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 +# PATCH-FIX-OPENSUSE Skip a test under libexpat 2.6.0+ +# Same test gh#python/cpython#115133 +Patch3: skip-test-under-libexpat-2.6.0.patch BuildRequires: %{python_module Cython >= 3.0.7} BuildRequires: %{python_module base} BuildRequires: %{python_module cssselect >= 0.9.1} diff --git a/skip-test-under-libexpat-2.6.0.patch b/skip-test-under-libexpat-2.6.0.patch new file mode 100644 index 0000000..183374b --- /dev/null +++ b/skip-test-under-libexpat-2.6.0.patch @@ -0,0 +1,16 @@ +Index: lxml-5.1.0/src/lxml/tests/test_elementtree.py +=================================================================== +--- lxml-5.1.0.orig/src/lxml/tests/test_elementtree.py ++++ lxml-5.1.0/src/lxml/tests/test_elementtree.py +@@ -4383,8 +4383,10 @@ class _XMLPullParserTest(unittest.TestCa + self.assertEqual([(action, elem.tag) for action, elem in events], + expected) + ++ # Fails with chunk_size in [1, 5], so replacing with 22, ++ # gh#python/cpython#115289 + def test_simple_xml(self): +- for chunk_size in (None, 1, 5): ++ for chunk_size in (None, 22): + #with self.subTest(chunk_size=chunk_size): + parser = self.etree.XMLPullParser() + self.assert_event_tags(parser, [])