diff --git a/Skip-test_feedparser_data-if-lxml_html_clean-is-not-available.patch b/Skip-test_feedparser_data-if-lxml_html_clean-is-not-available.patch new file mode 100644 index 0000000000000000000000000000000000000000..c748c0ac8f1b56233de039ceb5f169ea847dff5c --- /dev/null +++ b/Skip-test_feedparser_data-if-lxml_html_clean-is-not-available.patch @@ -0,0 +1,40 @@ +From f5f64df808b35969794ba3ea8c19079276aa0cb0 Mon Sep 17 00:00:00 2001 +From: Lumir Balhar +Date: Thu, 4 Apr 2024 11:11:38 +0200 +Subject: [PATCH] Skip test_feedparser_data if lxml_html_clean is not available + +This is useful mostly for distributors shipping lxml without +lxml_html_clean. +--- + src/lxml/html/tests/test_feedparser_data.py | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/src/lxml/html/tests/test_feedparser_data.py b/src/lxml/html/tests/test_feedparser_data.py +index 36fba1acb..264c0d4b5 100644 +--- a/src/lxml/html/tests/test_feedparser_data.py ++++ b/src/lxml/html/tests/test_feedparser_data.py +@@ -9,7 +9,11 @@ + from lxml.tests.common_imports import doctest + from lxml.doctestcompare import LHTMLOutputChecker + +-from lxml.html.clean import clean, Cleaner ++try: ++ from lxml.html.clean import clean, Cleaner ++ html_clean_available = True ++except ImportError: ++ html_clean_available = False + + feed_dirs = [ + os.path.join(os.path.dirname(__file__), 'feedparser-data'), +@@ -80,6 +84,11 @@ def shortDescription(self): + + def test_suite(): + suite = unittest.TestSuite() ++ ++ if not html_clean_available: ++ print("Skipping tests in feedparser_data - external lxml_html_clean package is not installed") ++ return suite ++ + for dir in feed_dirs: + for fn in os.listdir(dir): + fn = os.path.join(dir, fn) diff --git a/lxml-5.1.0.tar.gz b/lxml-5.2.1.tar.gz similarity index 34% rename from lxml-5.1.0.tar.gz rename to lxml-5.2.1.tar.gz index d43cdef635556f8ac67d4e7c6fb5adc8c1ba2329..c36f33709d310e780e37f9613d44a25aa57f7878 100644 Binary files a/lxml-5.1.0.tar.gz and b/lxml-5.2.1.tar.gz differ diff --git a/python-lxml.spec b/python-lxml.spec index 429bc185aba865f040e4ac615fd30f5f5554031e..e564d44f282bcc059bda29322beaece6e37f8885 100644 --- a/python-lxml.spec +++ b/python-lxml.spec @@ -6,15 +6,16 @@ the simplicity of a native Python API, mostly compatible but superior to the wel The latest release works with all CPython versions from 2.7 to 3.7. Name: python-lxml -Version: 5.1.0 -Release: 2 +Version: 5.2.1 +Release: 1 Summary: XML processing library combining libxml2/libxslt with the ElementTree API License: BSD URL: https://github.com/lxml/lxml -Source0: https://files.pythonhosted.org/packages/2b/b4/bbccb250adbee490553b6a52712c46c20ea1ba533a643f1424b27ffc6845/lxml-5.1.0.tar.gz +Source0: https://files.pythonhosted.org/packages/ea/e2/3834472e7f18801e67a3cd6f3c203a5456d6f7f903cfb9a990e62098a2f3/lxml-5.2.1.tar.gz -Patch0: Skip-failing-test_iterparse_utf16_bom.patch -Patch1: Fix-test_elementtree-with-Expat-2.6.0.patch +Patch0: Skip-failing-test_iterparse_utf16_bom.patch +# Skip some tests if lxml_html_clean is not available +Patch1: Skip-test_feedparser_data-if-lxml_html_clean-is-not-available.patch %description %{_description} @@ -78,6 +79,14 @@ make test %doc README.rst src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt %changelog +* Fri May 10 2024 wangxiaomeng - 5.2.1-1 +- upgrade version to 5.2.1 + - LP#2059910: The minimum CPU architecture for the Linux x86 binary wheels was set back to "core2", but with SSE 4.2 enabled + - LP#2059977: "Element.iterfind("//absolute_path")" failed with a "SyntaxError" where it should have issued a warning + - GH#416: The documentation build was using the non-standard ``which`` command. Patch by Michał Górny. + - The minimum CPU architecture for the Linux x86 binary wheels was upgraded to "sandybridge" (launched 2011), and glibc 2.28 / gcc 12 (manylinux_2_28) wheels were added. + - Built with Cython 3.0.10 + * Tue Apr 23 2024 zhangzikang - 5.1.0-2 - Fix test_elementtree with Expat-2.6.0, resolve check error