Compare commits

..

21 commits

Author SHA1 Message Date
Lumir Balhar
11da0f3a63 Update to 6.0.2 (rhbz#2397231) 2025-09-22 12:49:34 +02:00
Python Maint
b2351e3e34 Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 13:41:18 +02:00
Lumir Balhar
1fd88c3632 Update to 6.0.1 (rhbz#2390283) 2025-08-24 22:22:09 +02:00
Python Maint
86d492aea6 Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 14:04:47 +02:00
Lumir Balhar
d4c3d0bb6c Fix test_wrap_html with Python 3.14rc1 2025-08-05 13:50:20 +02:00
Fedora Release Engineering
cd4ee3066f Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 08:42:31 +00:00
Lumir Balhar
adc8d24589 Update to 6.0.0 (rhbz#2374994) 2025-06-30 11:19:42 +02:00
Python Maint
544488770a Rebuilt for Python 3.14 2025-06-03 12:25:50 +02:00
Python Maint
6df45dce8b Bootstrap for Python 3.14 2025-06-02 21:23:03 +02:00
Lumir Balhar
b9a077ae03 Update to 5.4.0 (rhbz#2361809) 2025-04-23 13:59:36 +02:00
Robert-André Mauchin
b928096276 Update to 5.3.2
Close: rhbz#2357632
2025-04-06 18:29:44 +02:00
Lumir Balhar
c1103ff3c3 Update to 5.3.1 (rhbz#2344609) 2025-02-11 12:10:25 +01:00
Fedora Release Engineering
f75dd54e14 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-18 15:53:28 +00:00
Miro Hrončok
b52ea727c7 Fix build with Python 3.14
- Fixes: rhbz#2335830
2025-01-06 16:21:46 +01:00
Lumir Balhar
afcfecf47d Update to 5.3.0 (rhbz#2303963) 2024-08-12 14:59:25 +02:00
Lumir Balhar
61d79bae8d Fix doctest failing with the latest libxslt (rhbz#2301176) 2024-07-31 11:18:55 +02:00
Fedora Release Engineering
27c594a8e2 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-19 12:55:35 +00:00
Python Maint
58ac417c3e Rebuilt for Python 3.13 2024-06-07 23:20:38 +02:00
Python Maint
39e20da595 Rebuilt for Python 3.13 2024-06-07 20:41:48 +02:00
Python Maint
9579799168 Bootstrap for Python 3.13 2024-06-07 09:50:04 +02:00
Lumir Balhar
dbf7e6096c Update to 5.2.1 (rhbz#2272165) 2024-04-04 15:26:12 +02:00
4 changed files with 15 additions and 106 deletions

9
.gitignore vendored
View file

@ -64,3 +64,12 @@ lxml-2.2.7.tar.gz.asc
/lxml-4.9.3-no-isoschematron-rng.tar.gz
/lxml-4.9.4-no-isoschematron-rng.tar.gz
/lxml-5.1.0-no-isoschematron-rng.tar.gz
/lxml-5.2.0-no-isoschematron-rng.tar.gz
/lxml-5.2.1-no-isoschematron-rng.tar.gz
/lxml-5.3.0-no-isoschematron-rng.tar.gz
/lxml-5.3.1-no-isoschematron-rng.tar.gz
/lxml-5.3.2-no-isoschematron-rng.tar.gz
/lxml-5.4.0-no-isoschematron-rng.tar.gz
/lxml-6.0.0-no-isoschematron-rng.tar.gz
/lxml-6.0.1-no-isoschematron-rng.tar.gz
/lxml-6.0.2-no-isoschematron-rng.tar.gz

View file

@ -1,98 +0,0 @@
From e3012a702dea2b03830fe00a5e8f7a429bbc3f42 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Tue, 27 Feb 2024 18:43:45 +0100
Subject: [PATCH] Fix test_elementtree with Expat 2.6.0
Feeding the parser by too small chunks defers parsing to prevent
CVE-2023-52425. Future versions of Expat may be more reactive.
Heavily inspired by https://github.com/python/cpython/commit/4a08e7b3431cd32a0daf22a33421cd3035343dc4
We cannot use a @fails_with_expat_2_6_0 decorator
because the test passes in ETreePullTestCase.
Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
---
src/lxml/tests/test_elementtree.py | 62 +++++++++++++++++++-----------
1 file changed, 39 insertions(+), 23 deletions(-)
diff --git a/src/lxml/tests/test_elementtree.py b/src/lxml/tests/test_elementtree.py
index 8ccf4442a..ef923c5ce 100644
--- a/src/lxml/tests/test_elementtree.py
+++ b/src/lxml/tests/test_elementtree.py
@@ -10,6 +10,7 @@
import io
import operator
import os
+import pyexpat
import re
import sys
import textwrap
@@ -4383,29 +4384,44 @@ def assert_event_tags(self, parser, expected, max_events=None):
self.assertEqual([(action, elem.tag) for action, elem in events],
expected)
- def test_simple_xml(self):
- for chunk_size in (None, 1, 5):
- #with self.subTest(chunk_size=chunk_size):
- parser = self.etree.XMLPullParser()
- self.assert_event_tags(parser, [])
- self._feed(parser, "<!-- comment -->\n", chunk_size)
- self.assert_event_tags(parser, [])
- self._feed(parser,
- "<root>\n <element key='value'>text</element",
- chunk_size)
- self.assert_event_tags(parser, [])
- self._feed(parser, ">\n", chunk_size)
- self.assert_event_tags(parser, [('end', 'element')])
- self._feed(parser, "<element>text</element>tail\n", chunk_size)
- self._feed(parser, "<empty-element/>\n", chunk_size)
- self.assert_event_tags(parser, [
- ('end', 'element'),
- ('end', 'empty-element'),
- ])
- self._feed(parser, "</root>\n", chunk_size)
- self.assert_event_tags(parser, [('end', 'root')])
- root = self._close_and_return_root(parser)
- self.assertEqual(root.tag, 'root')
+ def test_simple_xml(self, chunk_size=None):
+ parser = self.etree.XMLPullParser()
+ self.assert_event_tags(parser, [])
+ self._feed(parser, "<!-- comment -->\n", chunk_size)
+ self.assert_event_tags(parser, [])
+ self._feed(parser,
+ "<root>\n <element key='value'>text</element",
+ chunk_size)
+ self.assert_event_tags(parser, [])
+ self._feed(parser, ">\n", chunk_size)
+ self.assert_event_tags(parser, [('end', 'element')])
+ self._feed(parser, "<element>text</element>tail\n", chunk_size)
+ self._feed(parser, "<empty-element/>\n", chunk_size)
+ self.assert_event_tags(parser, [
+ ('end', 'element'),
+ ('end', 'empty-element'),
+ ])
+ self._feed(parser, "</root>\n", chunk_size)
+ self.assert_event_tags(parser, [('end', 'root')])
+ root = self._close_and_return_root(parser)
+ self.assertEqual(root.tag, 'root')
+
+ def test_simple_xml_chunk_1(self):
+ if self.etree is not etree and pyexpat.version_info >= (2, 6, 0):
+ raise unittest.SkipTest(
+ "Feeding the parser by too small chunks defers parsing"
+ )
+ self.test_simple_xml(chunk_size=1)
+
+ def test_simple_xml_chunk_5(self):
+ if self.etree is not etree and pyexpat.version_info >= (2, 6, 0):
+ raise unittest.SkipTest(
+ "Feeding the parser by too small chunks defers parsing"
+ )
+ self.test_simple_xml(chunk_size=5)
+
+ def test_simple_xml_chunk_22(self):
+ self.test_simple_xml(chunk_size=22)
def test_feed_while_iterating(self):
parser = self.etree.XMLPullParser()

View file

@ -1,5 +1,5 @@
Name: python-lxml
Version: 5.1.0
Version: 6.0.2
Release: %autorelease
Summary: XML processing library combining libxml2/libxslt with the ElementTree API
@ -16,10 +16,6 @@ URL: https://github.com/lxml/lxml
Source0: lxml-%{version}-no-isoschematron-rng.tar.gz
Source1: get-lxml-source.sh
# Fix test_elementtree with Expat 2.6.0
# Merged upstream
Patch: https://github.com/lxml/lxml/pull/407.patch
BuildRequires: gcc
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
@ -29,6 +25,7 @@ BuildRequires: python3-devel
# - [cssselect] Requires cssselect BuildRequires lxml
# - [html5] Requires html5lib BuildRequires lxml
# - [htmlsoup] Requires beautifulsoup4 Requires lxml
# - [html_clean] Requires lxml-html-clean Requires lxml
# Hence we provide a bcond to disable the extras altogether.
# By default, the extras are disabled in RHEL, to avoid dependencies.
%bcond extras %{undefined rhel}
@ -47,6 +44,7 @@ Summary: %{summary}
Suggests: python3-lxml+cssselect
Suggests: python3-lxml+html5
Suggests: python3-lxml+htmlsoup
Suggests: python3-lxml+html_clean
%endif
%description -n python3-lxml %{_description}
@ -54,7 +52,7 @@ Suggests: python3-lxml+htmlsoup
Python 3 version.
%if %{with extras}
%pyproject_extras_subpkg -n python3-lxml cssselect html5 htmlsoup
%pyproject_extras_subpkg -n python3-lxml cssselect html5 htmlsoup html_clean
%endif
%prep
@ -67,7 +65,7 @@ sed -i "s/Cython.*/Cython/" requirements.txt
sed -i 's/"Cython.*",/"Cython",/' pyproject.toml
%generate_buildrequires
%pyproject_buildrequires -x source%{?with_extras:,cssselect,html5,htmlsoup}
%pyproject_buildrequires -x source%{?with_extras:,cssselect,html5,htmlsoup,html_clean}
%build
# Remove pregenerated Cython C sources

View file

@ -1 +1 @@
SHA512 (lxml-5.1.0-no-isoschematron-rng.tar.gz) = f4b65c0189c89742fb4be6a3e73b08e7e7338272b71482e64be75dc8d53cebc769c0520a86a46579328fa0ec4377bb2bd860338550b1098d26c8f509fcedc664
SHA512 (lxml-6.0.2-no-isoschematron-rng.tar.gz) = dc89f75c3a3c828a46bcb2eefbebe8f98ce8072b9fb66f8ef81edbf2babed74e4c54e26392603319d60ab3bfab6a4795eedc85b28efba815797d43d53aae4060