From 7b1e5f9aab9336324a1e6234b8664cc131db1ffa Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Wed, 14 Dec 2022 17:59:24 +0100 Subject: [PATCH] Update to 4.9.2 (rhbz#2153063) --- .gitignore | 1 + fix-namespace-count.patch | 53 --------------------------------------- python-lxml.spec | 10 +++----- sources | 2 +- 4 files changed, 6 insertions(+), 60 deletions(-) delete mode 100644 fix-namespace-count.patch diff --git a/.gitignore b/.gitignore index 4917099..8ae519b 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,4 @@ lxml-2.2.7.tar.gz.asc /lxml-4.6.3.tar.gz /lxml-4.7.1.tar.gz /lxml-4.9.1.tar.gz +/lxml-4.9.2.tar.gz diff --git a/fix-namespace-count.patch b/fix-namespace-count.patch deleted file mode 100644 index 9a524b6..0000000 --- a/fix-namespace-count.patch +++ /dev/null @@ -1,53 +0,0 @@ -From c742576c105f40fc8b754fcae56fee4aa35840a3 Mon Sep 17 00:00:00 2001 -From: Stefan Behnel -Date: Tue, 19 Jul 2022 08:25:20 +0200 -Subject: [PATCH] Work around libxml2 bug in affected versions that failed to - reset the namespace count in the parser context. - -See https://gitlab.gnome.org/GNOME/libxml2/-/issues/378 ---- - src/lxml/includes/xmlparser.pxd | 1 + - src/lxml/parser.pxi | 3 +++ - src/lxml/tests/test_etree.py | 3 +-- - 3 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/src/lxml/includes/xmlparser.pxd b/src/lxml/includes/xmlparser.pxd -index a196e34bd..45acfc846 100644 ---- a/src/lxml/includes/xmlparser.pxd -+++ b/src/lxml/includes/xmlparser.pxd -@@ -144,6 +144,7 @@ cdef extern from "libxml/parser.h": - void* userData - int* spaceTab - int spaceMax -+ int nsNr - bint html - bint progressive - int inSubset -diff --git a/src/lxml/parser.pxi b/src/lxml/parser.pxi -index f5baf29b9..f0c8c6b64 100644 ---- a/src/lxml/parser.pxi -+++ b/src/lxml/parser.pxi -@@ -569,6 +569,9 @@ cdef class _ParserContext(_ResolverContext): - self._c_ctxt.disableSAX = 0 # work around bug in libxml2 - else: - xmlparser.xmlClearParserCtxt(self._c_ctxt) -+ # work around bug in libxml2 [2.9.10 .. 2.9.14]: -+ # https://gitlab.gnome.org/GNOME/libxml2/-/issues/378 -+ self._c_ctxt.nsNr = 0 - - cdef int prepare(self, bint set_document_loader=True) except -1: - cdef int result -diff --git a/src/lxml/tests/test_etree.py b/src/lxml/tests/test_etree.py -index 8bf82c084..0339796d6 100644 ---- a/src/lxml/tests/test_etree.py -+++ b/src/lxml/tests/test_etree.py -@@ -1491,8 +1491,7 @@ def test_walk_after_parse_failure(self): - # This would be the expected result, because there was no namespace - pass - else: -- # This is a bug in libxml2 -- assert not ns, repr(ns) -+ assert False, "Found unexpected namespace '%s'" % ns - - def test_itertext_comment_pi(self): - # https://bugs.launchpad.net/lxml/+bug/1844674 diff --git a/python-lxml.spec b/python-lxml.spec index 7170e82..40464a7 100644 --- a/python-lxml.spec +++ b/python-lxml.spec @@ -1,5 +1,5 @@ Name: python-lxml -Version: 4.9.1 +Version: 4.9.2 Release: 1%{?dist} Summary: XML processing library combining libxml2/libxslt with the ElementTree API @@ -11,11 +11,6 @@ License: BSD-3-Clause AND MIT-CMU AND MIT URL: https://github.com/lxml/lxml Source: %{pypi_source lxml} -# Work around libxml2 bug in affected versions that failed to reset the -# namespace count in the parser context. -# Resolved upstream: https://github.com/lxml/lxml/commit/c742576c105f40fc8b754fcae56fee4aa35840a3 -Patch: fix-namespace-count.patch - BuildRequires: gcc BuildRequires: libxml2-devel BuildRequires: libxslt-devel @@ -81,6 +76,9 @@ cp -a build/lib.%{python3_platform}-*/* src/ %doc README.rst src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt %changelog +* Wed Dec 14 2022 Lumír Balhar - 4.9.2-1 +- Update to 4.9.2 (rhbz#2153063) + * Wed Sep 14 2022 Charalampos Stratakis - 4.9.1-1 - Update to 4.9.1 - Fix for CVE-2022-2309 diff --git a/sources b/sources index b5e3cd2..ff93acf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (lxml-4.9.1.tar.gz) = d7ec55c7db2c63a716ca5f4d833706d90fc76c944885e010fcdb96786bcfe796994e438450cf4e8e6e75d702e21fb16971f28f854d7a1f76c34e4ae315414d84 +SHA512 (lxml-4.9.2.tar.gz) = 4597784c96219145fef30607f257097ad312264a6796e65b3dc74463853cd29f55379b6a903b401c1120750126b57f58dd9fc459dd453e57030883fc76b87ea3