Update to 5.1.0 (rhbz#2256232)
This commit is contained in:
parent
63254d5e35
commit
db11b56656
1
.gitignore
vendored
1
.gitignore
vendored
@ -63,3 +63,4 @@ lxml-2.2.7.tar.gz.asc
|
||||
/lxml-4.9.2-no-isoschematron-rng.tar.gz
|
||||
/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
|
||||
|
||||
@ -1,482 +0,0 @@
|
||||
From 34187968a67151f02db491a56a0037b55319931d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
||||
Date: Mon, 30 Oct 2023 20:21:55 +0100
|
||||
Subject: [PATCH] Avoid usage of unittest.makeSuite(), removed from Python 3.13
|
||||
(GH-385)
|
||||
|
||||
Patch generated by:
|
||||
|
||||
sed -i 's/unittest.makeSuite/unittest.defaultTestLoader.loadTestsFromTestCase/g' $(grep -rl makeSuite)
|
||||
---
|
||||
src/lxml/html/tests/test_clean.py | 2 +-
|
||||
src/lxml/html/tests/test_elementsoup.py | 2 +-
|
||||
src/lxml/tests/test_builder.py | 2 +-
|
||||
src/lxml/tests/test_classlookup.py | 4 ++--
|
||||
src/lxml/tests/test_css.py | 2 +-
|
||||
src/lxml/tests/test_doctestcompare.py | 2 +-
|
||||
src/lxml/tests/test_dtd.py | 2 +-
|
||||
src/lxml/tests/test_elementpath.py | 4 ++--
|
||||
src/lxml/tests/test_elementtree.py | 24 +++++++++++-----------
|
||||
src/lxml/tests/test_errors.py | 2 +-
|
||||
src/lxml/tests/test_etree.py | 14 ++++++-------
|
||||
src/lxml/tests/test_external_document.py | 2 +-
|
||||
src/lxml/tests/test_htmlparser.py | 2 +-
|
||||
src/lxml/tests/test_http_io.py | 2 +-
|
||||
src/lxml/tests/test_incremental_xmlfile.py | 12 +++++------
|
||||
src/lxml/tests/test_io.py | 4 ++--
|
||||
src/lxml/tests/test_isoschematron.py | 2 +-
|
||||
src/lxml/tests/test_nsclasses.py | 2 +-
|
||||
src/lxml/tests/test_objectify.py | 2 +-
|
||||
src/lxml/tests/test_pyclasslookup.py | 2 +-
|
||||
src/lxml/tests/test_relaxng.py | 4 ++--
|
||||
src/lxml/tests/test_sax.py | 4 ++--
|
||||
src/lxml/tests/test_schematron.py | 2 +-
|
||||
src/lxml/tests/test_threading.py | 4 ++--
|
||||
src/lxml/tests/test_unicode.py | 4 ++--
|
||||
src/lxml/tests/test_xmlschema.py | 4 ++--
|
||||
src/lxml/tests/test_xpathevaluator.py | 8 ++++----
|
||||
src/lxml/tests/test_xslt.py | 10 ++++-----
|
||||
28 files changed, 65 insertions(+), 65 deletions(-)
|
||||
|
||||
diff --git a/src/lxml/html/tests/test_clean.py b/src/lxml/html/tests/test_clean.py
|
||||
index ada0969bc..fe79f6d5b 100644
|
||||
--- a/src/lxml/html/tests/test_clean.py
|
||||
+++ b/src/lxml/html/tests/test_clean.py
|
||||
@@ -296,5 +296,5 @@ def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
suite.addTests([make_doctest('test_clean.txt')])
|
||||
suite.addTests([make_doctest('test_clean_embed.txt')])
|
||||
- suite.addTests(unittest.makeSuite(CleanerTest))
|
||||
+ suite.addTests(unittest.defaultTestLoader.loadTestsFromTestCase(CleanerTest))
|
||||
return suite
|
||||
diff --git a/src/lxml/html/tests/test_elementsoup.py b/src/lxml/html/tests/test_elementsoup.py
|
||||
index 553586b9f..1fd9127a4 100644
|
||||
--- a/src/lxml/html/tests/test_elementsoup.py
|
||||
+++ b/src/lxml/html/tests/test_elementsoup.py
|
||||
@@ -118,7 +118,7 @@ def test_doctype_html5(self):
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
if BS_INSTALLED:
|
||||
- suite.addTests([unittest.makeSuite(SoupParserTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(SoupParserTestCase)])
|
||||
if sys.version_info[0] < 3:
|
||||
suite.addTests([make_doctest('../../../../doc/elementsoup.txt')])
|
||||
return suite
|
||||
diff --git a/src/lxml/tests/test_builder.py b/src/lxml/tests/test_builder.py
|
||||
index b1ad4ebf6..15f17dfd5 100644
|
||||
--- a/src/lxml/tests/test_builder.py
|
||||
+++ b/src/lxml/tests/test_builder.py
|
||||
@@ -62,7 +62,7 @@ def test_qname_tag_default_namespace(self):
|
||||
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
- suite.addTests([unittest.makeSuite(BuilderTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(BuilderTestCase)])
|
||||
return suite
|
||||
|
||||
if __name__ == '__main__':
|
||||
diff --git a/src/lxml/tests/test_classlookup.py b/src/lxml/tests/test_classlookup.py
|
||||
index 7c871d511..c88ce2879 100644
|
||||
--- a/src/lxml/tests/test_classlookup.py
|
||||
+++ b/src/lxml/tests/test_classlookup.py
|
||||
@@ -394,8 +394,8 @@ def custom(self):
|
||||
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
- suite.addTests([unittest.makeSuite(ProxyTestCase)])
|
||||
- suite.addTests([unittest.makeSuite(ClassLookupTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ProxyTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ClassLookupTestCase)])
|
||||
return suite
|
||||
|
||||
if __name__ == '__main__':
|
||||
diff --git a/src/lxml/tests/test_css.py b/src/lxml/tests/test_css.py
|
||||
index e2afa65c7..3f1ca8787 100644
|
||||
--- a/src/lxml/tests/test_css.py
|
||||
+++ b/src/lxml/tests/test_css.py
|
||||
@@ -64,5 +64,5 @@ def test_suite():
|
||||
|
||||
import lxml.cssselect
|
||||
suite.addTests(doctest.DocTestSuite(lxml.cssselect))
|
||||
- suite.addTests([unittest.makeSuite(CSSTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(CSSTestCase)])
|
||||
return suite
|
||||
diff --git a/src/lxml/tests/test_doctestcompare.py b/src/lxml/tests/test_doctestcompare.py
|
||||
index 366328124..636e6b5f6 100644
|
||||
--- a/src/lxml/tests/test_doctestcompare.py
|
||||
+++ b/src/lxml/tests/test_doctestcompare.py
|
||||
@@ -125,7 +125,7 @@ def test_missing_attributes(self):
|
||||
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
- suite.addTests([unittest.makeSuite(DoctestCompareTest)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(DoctestCompareTest)])
|
||||
return suite
|
||||
|
||||
|
||||
diff --git a/src/lxml/tests/test_dtd.py b/src/lxml/tests/test_dtd.py
|
||||
index 5c9b1c024..cbb1b402e 100644
|
||||
--- a/src/lxml/tests/test_dtd.py
|
||||
+++ b/src/lxml/tests/test_dtd.py
|
||||
@@ -422,7 +422,7 @@ def test_entity_system_url_none(self):
|
||||
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
- suite.addTests([unittest.makeSuite(ETreeDtdTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeDtdTestCase)])
|
||||
suite.addTests(
|
||||
[make_doctest('../../../doc/validation.txt')])
|
||||
return suite
|
||||
diff --git a/src/lxml/tests/test_elementpath.py b/src/lxml/tests/test_elementpath.py
|
||||
index 1793ff821..0bb481c87 100644
|
||||
--- a/src/lxml/tests/test_elementpath.py
|
||||
+++ b/src/lxml/tests/test_elementpath.py
|
||||
@@ -293,8 +293,8 @@ def test_find(self):
|
||||
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
- suite.addTests([unittest.makeSuite(EtreeElementPathTestCase)])
|
||||
- #suite.addTests([unittest.makeSuite(ElementTreeElementPathTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(EtreeElementPathTestCase)])
|
||||
+ #suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ElementTreeElementPathTestCase)])
|
||||
return suite
|
||||
|
||||
|
||||
diff --git a/src/lxml/tests/test_elementtree.py b/src/lxml/tests/test_elementtree.py
|
||||
index 96426cba5..19c77a879 100644
|
||||
--- a/src/lxml/tests/test_elementtree.py
|
||||
+++ b/src/lxml/tests/test_elementtree.py
|
||||
@@ -4992,22 +4992,22 @@ class CElementTreeElementSlicingTest(_ElementSlicingTest):
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
if etree:
|
||||
- suite.addTests([unittest.makeSuite(ETreeTestCase)])
|
||||
- suite.addTests([unittest.makeSuite(ETreePullTestCase)])
|
||||
- suite.addTests([unittest.makeSuite(ETreeElementSlicingTest)])
|
||||
- suite.addTests([unittest.makeSuite(ETreeC14NTest)])
|
||||
- suite.addTests([unittest.makeSuite(ETreeC14N2WriteTest)])
|
||||
- suite.addTests([unittest.makeSuite(ETreeC14N2TostringTest)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreePullTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeElementSlicingTest)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeC14NTest)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeC14N2WriteTest)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeC14N2TostringTest)])
|
||||
if ElementTree:
|
||||
- suite.addTests([unittest.makeSuite(ElementTreeTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ElementTreeTestCase)])
|
||||
if ElementTreePullTestCase:
|
||||
- suite.addTests([unittest.makeSuite(ElementTreePullTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ElementTreePullTestCase)])
|
||||
if ElementTreeC14NTest:
|
||||
- suite.addTests([unittest.makeSuite(ElementTreeC14NTest)])
|
||||
- suite.addTests([unittest.makeSuite(ElementTreeElementSlicingTest)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ElementTreeC14NTest)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ElementTreeElementSlicingTest)])
|
||||
if cElementTree:
|
||||
- suite.addTests([unittest.makeSuite(CElementTreeTestCase)])
|
||||
- suite.addTests([unittest.makeSuite(CElementTreeElementSlicingTest)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(CElementTreeTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(CElementTreeElementSlicingTest)])
|
||||
return suite
|
||||
|
||||
if __name__ == '__main__':
|
||||
diff --git a/src/lxml/tests/test_errors.py b/src/lxml/tests/test_errors.py
|
||||
index c0aee7449..7b0ad7126 100644
|
||||
--- a/src/lxml/tests/test_errors.py
|
||||
+++ b/src/lxml/tests/test_errors.py
|
||||
@@ -70,7 +70,7 @@ def test_xmlsyntaxerror_has_info(self):
|
||||
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
- suite.addTests([unittest.makeSuite(ErrorTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ErrorTestCase)])
|
||||
return suite
|
||||
|
||||
if __name__ == '__main__':
|
||||
diff --git a/src/lxml/tests/test_etree.py b/src/lxml/tests/test_etree.py
|
||||
index 0118d0fc3..f01f04fcd 100644
|
||||
--- a/src/lxml/tests/test_etree.py
|
||||
+++ b/src/lxml/tests/test_etree.py
|
||||
@@ -5580,13 +5580,13 @@ def end(self, tag):
|
||||
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
- suite.addTests([unittest.makeSuite(ETreeOnlyTestCase)])
|
||||
- suite.addTests([unittest.makeSuite(ETreeXIncludeTestCase)])
|
||||
- suite.addTests([unittest.makeSuite(ElementIncludeTestCase)])
|
||||
- suite.addTests([unittest.makeSuite(ETreeC14NTestCase)])
|
||||
- suite.addTests([unittest.makeSuite(ETreeWriteTestCase)])
|
||||
- suite.addTests([unittest.makeSuite(ETreeErrorLogTest)])
|
||||
- suite.addTests([unittest.makeSuite(XMLPullParserTest)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeOnlyTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeXIncludeTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ElementIncludeTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeC14NTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeWriteTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeErrorLogTest)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(XMLPullParserTest)])
|
||||
|
||||
# add original doctests from ElementTree selftest modules
|
||||
from . import selftest, selftest2
|
||||
diff --git a/src/lxml/tests/test_external_document.py b/src/lxml/tests/test_external_document.py
|
||||
index 0d1d0639b..9826a2781 100644
|
||||
--- a/src/lxml/tests/test_external_document.py
|
||||
+++ b/src/lxml/tests/test_external_document.py
|
||||
@@ -98,7 +98,7 @@ def test_external_document_adoption(self):
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
if sys.platform != 'win32':
|
||||
- suite.addTests([unittest.makeSuite(ExternalDocumentTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ExternalDocumentTestCase)])
|
||||
return suite
|
||||
|
||||
|
||||
diff --git a/src/lxml/tests/test_htmlparser.py b/src/lxml/tests/test_htmlparser.py
|
||||
index 2f3186ff1..53bb8f9d4 100644
|
||||
--- a/src/lxml/tests/test_htmlparser.py
|
||||
+++ b/src/lxml/tests/test_htmlparser.py
|
||||
@@ -679,7 +679,7 @@ def test_xhtml_as_html_as_xml(self):
|
||||
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
- suite.addTests([unittest.makeSuite(HtmlParserTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(HtmlParserTestCase)])
|
||||
return suite
|
||||
|
||||
|
||||
diff --git a/src/lxml/tests/test_http_io.py b/src/lxml/tests/test_http_io.py
|
||||
index 07f274231..652261391 100644
|
||||
--- a/src/lxml/tests/test_http_io.py
|
||||
+++ b/src/lxml/tests/test_http_io.py
|
||||
@@ -117,7 +117,7 @@ def handler(environ, start_response):
|
||||
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
- suite.addTests([unittest.makeSuite(HttpIOTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(HttpIOTestCase)])
|
||||
return suite
|
||||
|
||||
|
||||
diff --git a/src/lxml/tests/test_incremental_xmlfile.py b/src/lxml/tests/test_incremental_xmlfile.py
|
||||
index ddf81652a..f2cca7d6b 100644
|
||||
--- a/src/lxml/tests/test_incremental_xmlfile.py
|
||||
+++ b/src/lxml/tests/test_incremental_xmlfile.py
|
||||
@@ -660,12 +660,12 @@ async def generate(out, close=True, buffered=True):
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
suite.addTests([
|
||||
- unittest.makeSuite(BytesIOXmlFileTestCase),
|
||||
- unittest.makeSuite(TempXmlFileTestCase),
|
||||
- unittest.makeSuite(TempPathXmlFileTestCase),
|
||||
- unittest.makeSuite(SimpleFileLikeXmlFileTestCase),
|
||||
- unittest.makeSuite(HtmlFileTestCase),
|
||||
- unittest.makeSuite(AsyncXmlFileTestCase),
|
||||
+ unittest.defaultTestLoader.loadTestsFromTestCase(BytesIOXmlFileTestCase),
|
||||
+ unittest.defaultTestLoader.loadTestsFromTestCase(TempXmlFileTestCase),
|
||||
+ unittest.defaultTestLoader.loadTestsFromTestCase(TempPathXmlFileTestCase),
|
||||
+ unittest.defaultTestLoader.loadTestsFromTestCase(SimpleFileLikeXmlFileTestCase),
|
||||
+ unittest.defaultTestLoader.loadTestsFromTestCase(HtmlFileTestCase),
|
||||
+ unittest.defaultTestLoader.loadTestsFromTestCase(AsyncXmlFileTestCase),
|
||||
])
|
||||
return suite
|
||||
|
||||
diff --git a/src/lxml/tests/test_io.py b/src/lxml/tests/test_io.py
|
||||
index cbdbcef06..c45ce45a2 100644
|
||||
--- a/src/lxml/tests/test_io.py
|
||||
+++ b/src/lxml/tests/test_io.py
|
||||
@@ -363,9 +363,9 @@ class ElementTreeIOTestCase(_IOTestCaseBase):
|
||||
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
- suite.addTests([unittest.makeSuite(ETreeIOTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeIOTestCase)])
|
||||
if ElementTree:
|
||||
- suite.addTests([unittest.makeSuite(ElementTreeIOTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ElementTreeIOTestCase)])
|
||||
return suite
|
||||
|
||||
|
||||
diff --git a/src/lxml/tests/test_isoschematron.py b/src/lxml/tests/test_isoschematron.py
|
||||
index bf8a7d27f..ccc4baecc 100644
|
||||
--- a/src/lxml/tests/test_isoschematron.py
|
||||
+++ b/src/lxml/tests/test_isoschematron.py
|
||||
@@ -862,7 +862,7 @@ def test_schematron_fail_on_report(self):
|
||||
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
- suite.addTests([unittest.makeSuite(ETreeISOSchematronTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeISOSchematronTestCase)])
|
||||
suite.addTests(doctest.DocTestSuite(isoschematron))
|
||||
suite.addTests(
|
||||
[make_doctest('../../../doc/validation.txt')])
|
||||
diff --git a/src/lxml/tests/test_nsclasses.py b/src/lxml/tests/test_nsclasses.py
|
||||
index a0aa608d7..b9e623f38 100644
|
||||
--- a/src/lxml/tests/test_nsclasses.py
|
||||
+++ b/src/lxml/tests/test_nsclasses.py
|
||||
@@ -203,7 +203,7 @@ class honk(etree.ElementBase):
|
||||
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
- suite.addTests([unittest.makeSuite(ETreeNamespaceClassesTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeNamespaceClassesTestCase)])
|
||||
suite.addTests(
|
||||
[make_doctest('../../../doc/element_classes.txt')])
|
||||
return suite
|
||||
diff --git a/src/lxml/tests/test_objectify.py b/src/lxml/tests/test_objectify.py
|
||||
index 15b1c6887..1f1f93d08 100644
|
||||
--- a/src/lxml/tests/test_objectify.py
|
||||
+++ b/src/lxml/tests/test_objectify.py
|
||||
@@ -2744,7 +2744,7 @@ def space(_choice=random.choice):
|
||||
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
- suite.addTests([unittest.makeSuite(ObjectifyTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ObjectifyTestCase)])
|
||||
suite.addTests(doctest.DocTestSuite(objectify))
|
||||
suite.addTests([make_doctest('../../../doc/objectify.txt')])
|
||||
return suite
|
||||
diff --git a/src/lxml/tests/test_pyclasslookup.py b/src/lxml/tests/test_pyclasslookup.py
|
||||
index d650870a5..c5b161527 100644
|
||||
--- a/src/lxml/tests/test_pyclasslookup.py
|
||||
+++ b/src/lxml/tests/test_pyclasslookup.py
|
||||
@@ -344,7 +344,7 @@ def return_none(*args):
|
||||
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
- suite.addTests([unittest.makeSuite(PyClassLookupTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(PyClassLookupTestCase)])
|
||||
return suite
|
||||
|
||||
if __name__ == '__main__':
|
||||
diff --git a/src/lxml/tests/test_relaxng.py b/src/lxml/tests/test_relaxng.py
|
||||
index 3c589c18a..7e7f1719d 100644
|
||||
--- a/src/lxml/tests/test_relaxng.py
|
||||
+++ b/src/lxml/tests/test_relaxng.py
|
||||
@@ -249,11 +249,11 @@ def test_relaxng_compact_str(self):
|
||||
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
- suite.addTests([unittest.makeSuite(ETreeRelaxNGTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeRelaxNGTestCase)])
|
||||
suite.addTests(
|
||||
[make_doctest('../../../doc/validation.txt')])
|
||||
if rnc2rng is not None:
|
||||
- suite.addTests([unittest.makeSuite(RelaxNGCompactTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(RelaxNGCompactTestCase)])
|
||||
return suite
|
||||
|
||||
if __name__ == '__main__':
|
||||
diff --git a/src/lxml/tests/test_sax.py b/src/lxml/tests/test_sax.py
|
||||
index 2ed1e5135..9a2e08262 100644
|
||||
--- a/src/lxml/tests/test_sax.py
|
||||
+++ b/src/lxml/tests/test_sax.py
|
||||
@@ -405,8 +405,8 @@ def test_element_sax_twin_ns_prefix(self):
|
||||
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
- suite.addTests([unittest.makeSuite(ETreeSaxTestCase)])
|
||||
- suite.addTests([unittest.makeSuite(NSPrefixSaxTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeSaxTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(NSPrefixSaxTestCase)])
|
||||
suite.addTests(
|
||||
[make_doctest('../../../doc/sax.txt')])
|
||||
return suite
|
||||
diff --git a/src/lxml/tests/test_schematron.py b/src/lxml/tests/test_schematron.py
|
||||
index 2096346e3..c1c22e6c7 100644
|
||||
--- a/src/lxml/tests/test_schematron.py
|
||||
+++ b/src/lxml/tests/test_schematron.py
|
||||
@@ -73,7 +73,7 @@ def test_schematron_invalid_schema_namespace(self):
|
||||
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
- suite.addTests([unittest.makeSuite(ETreeSchematronTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeSchematronTestCase)])
|
||||
suite.addTests(
|
||||
[make_doctest('../../../doc/validation.txt')])
|
||||
return suite
|
||||
diff --git a/src/lxml/tests/test_threading.py b/src/lxml/tests/test_threading.py
|
||||
index 2a16858b1..906db7f70 100644
|
||||
--- a/src/lxml/tests/test_threading.py
|
||||
+++ b/src/lxml/tests/test_threading.py
|
||||
@@ -582,8 +582,8 @@ def test_thread_pipeline_global_parse(self):
|
||||
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
- suite.addTests([unittest.makeSuite(ThreadingTestCase)])
|
||||
- suite.addTests([unittest.makeSuite(ThreadPipelineTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ThreadingTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ThreadPipelineTestCase)])
|
||||
return suite
|
||||
|
||||
if __name__ == '__main__':
|
||||
diff --git a/src/lxml/tests/test_unicode.py b/src/lxml/tests/test_unicode.py
|
||||
index 287a0f0f7..6d4ee9c0f 100644
|
||||
--- a/src/lxml/tests/test_unicode.py
|
||||
+++ b/src/lxml/tests/test_unicode.py
|
||||
@@ -207,6 +207,6 @@ def test_utf32BE_fromstring(self):
|
||||
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
- suite.addTests([unittest.makeSuite(UnicodeTestCase)])
|
||||
- suite.addTests([unittest.makeSuite(EncodingsTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(UnicodeTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(EncodingsTestCase)])
|
||||
return suite
|
||||
diff --git a/src/lxml/tests/test_xmlschema.py b/src/lxml/tests/test_xmlschema.py
|
||||
index dbfc251a5..739dde463 100644
|
||||
--- a/src/lxml/tests/test_xmlschema.py
|
||||
+++ b/src/lxml/tests/test_xmlschema.py
|
||||
@@ -499,8 +499,8 @@ def resolve(self, url, id, context):
|
||||
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
- suite.addTests([unittest.makeSuite(ETreeXMLSchemaTestCase)])
|
||||
- suite.addTests([unittest.makeSuite(ETreeXMLSchemaResolversTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeXMLSchemaTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeXMLSchemaResolversTestCase)])
|
||||
suite.addTests(
|
||||
[make_doctest('../../../doc/validation.txt')])
|
||||
return suite
|
||||
diff --git a/src/lxml/tests/test_xpathevaluator.py b/src/lxml/tests/test_xpathevaluator.py
|
||||
index 13ee97ece..ece23095f 100644
|
||||
--- a/src/lxml/tests/test_xpathevaluator.py
|
||||
+++ b/src/lxml/tests/test_xpathevaluator.py
|
||||
@@ -734,11 +734,11 @@ def xpath():
|
||||
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
- suite.addTests([unittest.makeSuite(ETreeXPathTestCase)])
|
||||
- suite.addTests([unittest.makeSuite(ETreeXPathClassTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeXPathTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeXPathClassTestCase)])
|
||||
if etree.LIBXSLT_COMPILED_VERSION >= (1,1,25):
|
||||
- suite.addTests([unittest.makeSuite(ETreeXPathExsltTestCase)])
|
||||
- suite.addTests([unittest.makeSuite(ETreeETXPathClassTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeXPathExsltTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeETXPathClassTestCase)])
|
||||
suite.addTests([doctest.DocTestSuite()])
|
||||
suite.addTests(
|
||||
[make_doctest('../../../doc/xpathxslt.txt')])
|
||||
diff --git a/src/lxml/tests/test_xslt.py b/src/lxml/tests/test_xslt.py
|
||||
index 84c1983fd..7ef0bb783 100644
|
||||
--- a/src/lxml/tests/test_xslt.py
|
||||
+++ b/src/lxml/tests/test_xslt.py
|
||||
@@ -2090,12 +2090,12 @@ def test_xslt_result_memoryview(self):
|
||||
|
||||
def test_suite():
|
||||
suite = unittest.TestSuite()
|
||||
- suite.addTests([unittest.makeSuite(ETreeXSLTTestCase)])
|
||||
- suite.addTests([unittest.makeSuite(ETreeEXSLTTestCase)])
|
||||
- suite.addTests([unittest.makeSuite(ETreeXSLTExtFuncTestCase)])
|
||||
- suite.addTests([unittest.makeSuite(ETreeXSLTExtElementTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeXSLTTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeEXSLTTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeXSLTExtFuncTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(ETreeXSLTExtElementTestCase)])
|
||||
if is_python3:
|
||||
- suite.addTests([unittest.makeSuite(Py3XSLTTestCase)])
|
||||
+ suite.addTests([unittest.defaultTestLoader.loadTestsFromTestCase(Py3XSLTTestCase)])
|
||||
suite.addTests(
|
||||
[make_doctest('../../../doc/extensions.txt')])
|
||||
suite.addTests(
|
||||
24
380.patch
24
380.patch
@ -1,24 +0,0 @@
|
||||
From d18f2f22218ea0e0b5327b5a2bda789afdf16e41 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
||||
Date: Fri, 14 Jul 2023 12:18:25 +0200
|
||||
Subject: [PATCH] Skip test_isoschematron.test_schematron_invalid_schema_empty
|
||||
without the RNG file
|
||||
|
||||
The expected SchematronParseError only happens when validate_schema is true.
|
||||
---
|
||||
src/lxml/tests/test_isoschematron.py | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/lxml/tests/test_isoschematron.py b/src/lxml/tests/test_isoschematron.py
|
||||
index 6d2aa3fb6..900f257c3 100644
|
||||
--- a/src/lxml/tests/test_isoschematron.py
|
||||
+++ b/src/lxml/tests/test_isoschematron.py
|
||||
@@ -55,6 +55,8 @@ def test_schematron_empty_pattern(self):
|
||||
schema = isoschematron.Schematron(schema)
|
||||
self.assertTrue(schema)
|
||||
|
||||
+ @unittest.skipIf(not isoschematron.schematron_schema_valid_supported,
|
||||
+ 'SchematronParseError is risen only when validate_schema is true')
|
||||
def test_schematron_invalid_schema_empty(self):
|
||||
schema = self.parse('''\
|
||||
<schema xmlns="http://purl.oclc.org/dsdl/schematron" />
|
||||
@ -1,47 +0,0 @@
|
||||
From 98025653e182f9203189cbde0ab2d6ebec556db8 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Behnel <stefan_ml@behnel.de>
|
||||
Date: Tue, 31 Oct 2023 12:07:30 +0100
|
||||
Subject: [PATCH] Fix doctest in Py3.13.
|
||||
|
||||
---
|
||||
src/lxml/tests/test_xpathevaluator.py | 14 +++++++-------
|
||||
1 file changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/lxml/tests/test_xpathevaluator.py b/src/lxml/tests/test_xpathevaluator.py
|
||||
index ece23095f..8bc453e50 100644
|
||||
--- a/src/lxml/tests/test_xpathevaluator.py
|
||||
+++ b/src/lxml/tests/test_xpathevaluator.py
|
||||
@@ -687,15 +687,15 @@ def resultTypesTest2(ctxt):
|
||||
(None, 'resultTypesTest2'): resultTypesTest2,}
|
||||
|
||||
def xpath():
|
||||
- """
|
||||
+ u"""
|
||||
Test xpath extension functions.
|
||||
|
||||
>>> root = SAMPLE_XML
|
||||
>>> e = etree.XPathEvaluator(root, extensions=[extension])
|
||||
>>> e("stringTest('you')")
|
||||
'Hello you'
|
||||
- >>> e(_bytes("stringTest('\\\\xe9lan')").decode("unicode_escape"))
|
||||
- u'Hello \\xe9lan'
|
||||
+ >>> print(e(_bytes("stringTest('\\\\xe9lan')").decode("unicode_escape")))
|
||||
+ Hello \xe9lan
|
||||
>>> e("stringTest('you','there')") #doctest: +ELLIPSIS
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
@@ -714,10 +714,10 @@ def xpath():
|
||||
"a, 1.5, True, ['tag', 'tag', 'tag']"
|
||||
>>> list(map(tag, e("argsTest2(/body/tag, /body/section)")))
|
||||
['tag', 'section', 'tag', 'tag']
|
||||
- >>> e("resultTypesTest()")
|
||||
- Traceback (most recent call last):
|
||||
- ...
|
||||
- XPathResultError: This is not a supported node-set result: None
|
||||
+ >>> try: e("resultTypesTest()")
|
||||
+ ... except etree.XPathResultError as exc: print(exc)
|
||||
+ ... else: print("SHOULD HAVE FAILED!")
|
||||
+ This is not a supported node-set result: None
|
||||
>>> try:
|
||||
... e("resultTypesTest2()")
|
||||
... except etree.XPathResultError:
|
||||
@ -1,112 +0,0 @@
|
||||
From 07b3e9915972be02fbe98ab68ac052136ea94e27 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Behnel <stefan_ml@behnel.de>
|
||||
Date: Wed, 20 Dec 2023 12:53:02 +0100
|
||||
Subject: [PATCH] Make the validation of ISO-Schematron files optional in lxml,
|
||||
depending on the availability of the RNG validation file. Some lxml
|
||||
distributions discard the validation schema file due to licensing issues.
|
||||
|
||||
See https://bugs.launchpad.net/lxml/+bug/2024343
|
||||
---
|
||||
CHANGES.txt | 7 +++++++
|
||||
doc/validation.txt | 9 +++++++++
|
||||
src/lxml/isoschematron/__init__.py | 24 +++++++++++++++++++-----
|
||||
3 files changed, 35 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/CHANGES.txt b/CHANGES.txt
|
||||
index 4dd1055..90b3329 100644
|
||||
--- a/CHANGES.txt
|
||||
+++ b/CHANGES.txt
|
||||
@@ -49,6 +49,13 @@ Other changes
|
||||
|
||||
* Built with Cython 0.29.36 to adapt to changes in Python 3.12.
|
||||
|
||||
+* LP#2024343: The validation of the schema file itself is now optional in the
|
||||
+ ISO-Schematron implementation. This was done because some lxml distributions
|
||||
+ discard the RNG validation schema file due to licensing issues. The validation
|
||||
+ can now always be disabled with ``Schematron(..., validate_schema=False)``.
|
||||
+ It is enabled by default if available and disabled otherwise. The module
|
||||
+ constant ``lxml.isoschematron.schematron_schema_valid_supported`` can be used
|
||||
+ to detect whether schema file validation is available.
|
||||
|
||||
4.9.2 (2022-12-13)
|
||||
==================
|
||||
diff --git a/doc/validation.txt b/doc/validation.txt
|
||||
index af9d007..27c0ccd 100644
|
||||
--- a/doc/validation.txt
|
||||
+++ b/doc/validation.txt
|
||||
@@ -615,6 +615,15 @@ The usage of validation phases is a unique feature of ISO-Schematron and can be
|
||||
a very powerful tool e.g. for establishing validation stages or to provide
|
||||
different validators for different "validation audiences".
|
||||
|
||||
+Note: Some lxml distributions exclude the validation schema file due to licensing issues.
|
||||
+Since lxml 4.9.2-8, the validation of the user provided schema can be disabled with
|
||||
+``Schematron(..., validate_schema=False)``.
|
||||
+It is enabled by default if available and disabled otherwise. Previous versions of
|
||||
+lxml always had it enabled and failed at import time if the file was not available.
|
||||
+Thus, some distributions chose to remove the entire ISO-Schematron support.
|
||||
+The module constant ``lxml.isoschematron.schematron_schema_valid_supported`` can be used
|
||||
+since lxml 4.9.2-8 to detect whether schema file validation is available.
|
||||
+
|
||||
(Pre-ISO-Schematron)
|
||||
--------------------
|
||||
|
||||
diff --git a/src/lxml/isoschematron/__init__.py b/src/lxml/isoschematron/__init__.py
|
||||
index 5967b10..2846a66 100644
|
||||
--- a/src/lxml/isoschematron/__init__.py
|
||||
+++ b/src/lxml/isoschematron/__init__.py
|
||||
@@ -61,10 +61,16 @@ iso_svrl_for_xslt1 = _etree.XSLT(_etree.parse(
|
||||
svrl_validation_errors = _etree.XPath(
|
||||
'//svrl:failed-assert', namespaces={'svrl': SVRL_NS})
|
||||
|
||||
-
|
||||
# RelaxNG validator for schematron schemas
|
||||
-schematron_schema_valid = _etree.RelaxNG(
|
||||
- file=os.path.join(_resources_dir, 'rng', 'iso-schematron.rng'))
|
||||
+schematron_schema_valid_supported = False
|
||||
+try:
|
||||
+ schematron_schema_valid = _etree.RelaxNG(
|
||||
+ file=os.path.join(_resources_dir, 'rng', 'iso-schematron.rng'))
|
||||
+ schematron_schema_valid_supported = True
|
||||
+except _etree.RelaxNGParseError:
|
||||
+ # Some distributions delete the file due to licensing issues.
|
||||
+ def schematron_schema_valid(arg):
|
||||
+ raise NotImplementedError("Validating the ISO schematron requires iso-schematron.rng")
|
||||
|
||||
|
||||
def stylesheet_params(**kwargs):
|
||||
@@ -153,6 +159,13 @@ class Schematron(_etree._Validator):
|
||||
report document gets stored and can be accessed as the ``validation_report``
|
||||
property.
|
||||
|
||||
+ If ``validate_schema`` is set to False, the validation of the schema file
|
||||
+ itself is disabled. Validation happens by default after building the full
|
||||
+ schema, unless the schema validation file cannot be found at import time,
|
||||
+ in which case the validation gets disabled. Some lxml distributions exclude
|
||||
+ this file due to licensing issues. ISO-Schematron validation can then still
|
||||
+ be used normally, but the schemas themselves cannot be validated.
|
||||
+
|
||||
Here is a usage example::
|
||||
|
||||
>>> from lxml import etree
|
||||
@@ -234,7 +247,8 @@ class Schematron(_etree._Validator):
|
||||
def __init__(self, etree=None, file=None, include=True, expand=True,
|
||||
include_params={}, expand_params={}, compile_params={},
|
||||
store_schematron=False, store_xslt=False, store_report=False,
|
||||
- phase=None, error_finder=ASSERTS_ONLY):
|
||||
+ phase=None, error_finder=ASSERTS_ONLY,
|
||||
+ validate_schema=schematron_schema_valid_supported):
|
||||
super(Schematron, self).__init__()
|
||||
|
||||
self._store_report = store_report
|
||||
@@ -273,7 +287,7 @@ class Schematron(_etree._Validator):
|
||||
schematron = self._include(schematron, **include_params)
|
||||
if expand:
|
||||
schematron = self._expand(schematron, **expand_params)
|
||||
- if not schematron_schema_valid(schematron):
|
||||
+ if validate_schema and not schematron_schema_valid(schematron):
|
||||
raise _etree.SchematronParseError(
|
||||
"invalid schematron schema: %s" %
|
||||
schematron_schema_valid.error_log)
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@ -1,34 +0,0 @@
|
||||
From 91729cf581f764c3321f644206568f18d0fc92f4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <thrnciar@redhat.com>
|
||||
Date: Thu, 18 May 2023 08:00:48 +0200
|
||||
Subject: [PATCH] Skip failing test test_html_prefix_nsmap
|
||||
|
||||
Upstream issue: https://bugs.launchpad.net/lxml/+bug/2016939
|
||||
---
|
||||
src/lxml/tests/test_etree.py | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/lxml/tests/test_etree.py b/src/lxml/tests/test_etree.py
|
||||
index 0339796..1994a7f 100644
|
||||
--- a/src/lxml/tests/test_etree.py
|
||||
+++ b/src/lxml/tests/test_etree.py
|
||||
@@ -27,6 +27,8 @@ from .common_imports import SillyFileLike, LargeFileLikeUnicode, doctest, make_d
|
||||
from .common_imports import canonicalize, _str, _bytes
|
||||
from .common_imports import SimpleFSPath
|
||||
|
||||
+from unittest import skip
|
||||
+
|
||||
print("""
|
||||
TESTED VERSION: %s""" % etree.__version__ + """
|
||||
Python: %r""" % (sys.version_info,) + """
|
||||
@@ -3067,6 +3069,7 @@ class ETreeOnlyTestCase(HelperTestCase):
|
||||
self.assertEqual(re, e.nsmap)
|
||||
self.assertEqual(r, s.nsmap)
|
||||
|
||||
+ @skip
|
||||
def test_html_prefix_nsmap(self):
|
||||
etree = self.etree
|
||||
el = etree.HTML('<hha:page-description>aa</hha:page-description>').find('.//page-description')
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@ -1,402 +0,0 @@
|
||||
From a03a4b3c6b906d33c5ef1a15f3d5ca5fff600c76 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Behnel <stefan_ml@behnel.de>
|
||||
Date: Fri, 23 Dec 2022 10:46:32 +0100
|
||||
Subject: [PATCH] Use "noexcept" modifiers for callback functions and fix some
|
||||
exception value declaration bugs found by Cython 3.0.
|
||||
|
||||
---
|
||||
src/lxml/extensions.pxi | 6 +++---
|
||||
src/lxml/includes/tree.pxd | 10 +++++-----
|
||||
src/lxml/includes/xmlerror.pxd | 4 ++--
|
||||
src/lxml/includes/xmlparser.pxd | 24 ++++++++++++------------
|
||||
src/lxml/parser.pxi | 10 +++++-----
|
||||
src/lxml/saxparser.pxi | 26 +++++++++++++-------------
|
||||
src/lxml/serializer.pxi | 4 ++--
|
||||
src/lxml/xmlerror.pxi | 14 +++++++-------
|
||||
src/lxml/xpath.pxi | 2 +-
|
||||
9 files changed, 50 insertions(+), 50 deletions(-)
|
||||
|
||||
diff --git a/src/lxml/extensions.pxi b/src/lxml/extensions.pxi
|
||||
index 35a321b7a..80e53d7b5 100644
|
||||
--- a/src/lxml/extensions.pxi
|
||||
+++ b/src/lxml/extensions.pxi
|
||||
@@ -393,7 +393,7 @@ cdef tuple LIBXML2_XPATH_ERROR_MESSAGES = (
|
||||
b"?? Unknown error ??\n",
|
||||
)
|
||||
|
||||
-cdef void _forwardXPathError(void* c_ctxt, xmlerror.xmlError* c_error) with gil:
|
||||
+cdef void _forwardXPathError(void* c_ctxt, xmlerror.xmlError* c_error) noexcept with gil:
|
||||
cdef xmlerror.xmlError error
|
||||
cdef int xpath_code
|
||||
if c_error.message is not NULL:
|
||||
@@ -414,7 +414,7 @@ cdef void _forwardXPathError(void* c_ctxt, xmlerror.xmlError* c_error) with gil:
|
||||
|
||||
(<_BaseContext>c_ctxt)._error_log._receive(&error)
|
||||
|
||||
-cdef void _receiveXPathError(void* c_context, xmlerror.xmlError* error) nogil:
|
||||
+cdef void _receiveXPathError(void* c_context, xmlerror.xmlError* error) noexcept nogil:
|
||||
if not __DEBUG:
|
||||
return
|
||||
if c_context is NULL:
|
||||
@@ -851,7 +851,7 @@ cdef void _extension_function_call(_BaseContext context, function,
|
||||
# lookup the function by name and call it
|
||||
|
||||
cdef void _xpath_function_call(xpath.xmlXPathParserContext* ctxt,
|
||||
- int nargs) with gil:
|
||||
+ int nargs) noexcept with gil:
|
||||
cdef _BaseContext context
|
||||
cdef xpath.xmlXPathContext* rctxt = ctxt.context
|
||||
context = <_BaseContext> rctxt.userData
|
||||
diff --git a/src/lxml/includes/tree.pxd b/src/lxml/includes/tree.pxd
|
||||
index 03d558a33..312537cbd 100644
|
||||
--- a/src/lxml/includes/tree.pxd
|
||||
+++ b/src/lxml/includes/tree.pxd
|
||||
@@ -65,7 +65,7 @@ cdef extern from "libxml/chvalid.h" nogil:
|
||||
|
||||
cdef extern from "libxml/hash.h":
|
||||
ctypedef struct xmlHashTable
|
||||
- ctypedef void (*xmlHashScanner)(void* payload, void* data, const_xmlChar* name) # may require GIL!
|
||||
+ ctypedef void (*xmlHashScanner)(void* payload, void* data, const_xmlChar* name) noexcept # may require GIL!
|
||||
void xmlHashScan(xmlHashTable* table, xmlHashScanner f, void* data) nogil
|
||||
void* xmlHashLookup(xmlHashTable* table, const_xmlChar* name) nogil
|
||||
ctypedef void (*xmlHashDeallocator)(void *payload, xmlChar *name)
|
||||
@@ -411,12 +411,12 @@ cdef extern from "libxml/xmlIO.h":
|
||||
cdef int xmlOutputBufferClose(xmlOutputBuffer* out) nogil
|
||||
|
||||
ctypedef int (*xmlInputReadCallback)(void* context,
|
||||
- char* buffer, int len) nogil
|
||||
- ctypedef int (*xmlInputCloseCallback)(void* context) nogil
|
||||
+ char* buffer, int len) except -1 nogil
|
||||
+ ctypedef int (*xmlInputCloseCallback)(void* context) except -1 nogil
|
||||
|
||||
ctypedef int (*xmlOutputWriteCallback)(void* context,
|
||||
- char* buffer, int len)
|
||||
- ctypedef int (*xmlOutputCloseCallback)(void* context)
|
||||
+ char* buffer, int len) except -1
|
||||
+ ctypedef int (*xmlOutputCloseCallback)(void* context) except -1
|
||||
|
||||
cdef xmlOutputBuffer* xmlAllocOutputBuffer(
|
||||
xmlCharEncodingHandler* encoder) nogil
|
||||
diff --git a/src/lxml/includes/xmlerror.pxd b/src/lxml/includes/xmlerror.pxd
|
||||
index c5ac6a0aa..6967378b7 100644
|
||||
--- a/src/lxml/includes/xmlerror.pxd
|
||||
+++ b/src/lxml/includes/xmlerror.pxd
|
||||
@@ -838,9 +838,9 @@ cdef extern from "libxml/xmlerror.h" nogil:
|
||||
int int2
|
||||
void* node
|
||||
|
||||
- ctypedef void (*xmlGenericErrorFunc)(void* ctxt, char* msg, ...)
|
||||
+ ctypedef void (*xmlGenericErrorFunc)(void* ctxt, char* msg, ...) noexcept
|
||||
ctypedef void (*xmlStructuredErrorFunc)(void* userData,
|
||||
- xmlError* error)
|
||||
+ xmlError* error) noexcept
|
||||
|
||||
cdef void xmlSetGenericErrorFunc(
|
||||
void* ctxt, xmlGenericErrorFunc func)
|
||||
diff --git a/src/lxml/includes/xmlparser.pxd b/src/lxml/includes/xmlparser.pxd
|
||||
index 9f3056248..c94212cee 100644
|
||||
--- a/src/lxml/includes/xmlparser.pxd
|
||||
+++ b/src/lxml/includes/xmlparser.pxd
|
||||
@@ -15,37 +15,37 @@ cdef extern from "libxml/parser.h" nogil:
|
||||
const_xmlChar** namespaces,
|
||||
int nb_attributes,
|
||||
int nb_defaulted,
|
||||
- const_xmlChar** attributes)
|
||||
+ const_xmlChar** attributes) noexcept
|
||||
|
||||
ctypedef void (*endElementNsSAX2Func)(void* ctx,
|
||||
const_xmlChar* localname,
|
||||
const_xmlChar* prefix,
|
||||
- const_xmlChar* URI)
|
||||
+ const_xmlChar* URI) noexcept
|
||||
|
||||
- ctypedef void (*startElementSAXFunc)(void* ctx, const_xmlChar* name, const_xmlChar** atts)
|
||||
+ ctypedef void (*startElementSAXFunc)(void* ctx, const_xmlChar* name, const_xmlChar** atts) noexcept
|
||||
|
||||
- ctypedef void (*endElementSAXFunc)(void* ctx, const_xmlChar* name)
|
||||
+ ctypedef void (*endElementSAXFunc)(void* ctx, const_xmlChar* name) noexcept
|
||||
|
||||
- ctypedef void (*charactersSAXFunc)(void* ctx, const_xmlChar* ch, int len)
|
||||
+ ctypedef void (*charactersSAXFunc)(void* ctx, const_xmlChar* ch, int len) noexcept
|
||||
|
||||
- ctypedef void (*cdataBlockSAXFunc)(void* ctx, const_xmlChar* value, int len)
|
||||
+ ctypedef void (*cdataBlockSAXFunc)(void* ctx, const_xmlChar* value, int len) noexcept
|
||||
|
||||
- ctypedef void (*commentSAXFunc)(void* ctx, const_xmlChar* value)
|
||||
+ ctypedef void (*commentSAXFunc)(void* ctx, const_xmlChar* value) noexcept
|
||||
|
||||
ctypedef void (*processingInstructionSAXFunc)(void* ctx,
|
||||
const_xmlChar* target,
|
||||
- const_xmlChar* data)
|
||||
+ const_xmlChar* data) noexcept
|
||||
|
||||
ctypedef void (*internalSubsetSAXFunc)(void* ctx,
|
||||
const_xmlChar* name,
|
||||
const_xmlChar* externalID,
|
||||
- const_xmlChar* systemID)
|
||||
+ const_xmlChar* systemID) noexcept
|
||||
|
||||
- ctypedef void (*endDocumentSAXFunc)(void* ctx)
|
||||
+ ctypedef void (*endDocumentSAXFunc)(void* ctx) noexcept
|
||||
|
||||
- ctypedef void (*startDocumentSAXFunc)(void* ctx)
|
||||
+ ctypedef void (*startDocumentSAXFunc)(void* ctx) noexcept
|
||||
|
||||
- ctypedef void (*referenceSAXFunc)(void * ctx, const_xmlChar* name)
|
||||
+ ctypedef void (*referenceSAXFunc)(void * ctx, const_xmlChar* name) noexcept
|
||||
|
||||
cdef int XML_SAX2_MAGIC
|
||||
|
||||
diff --git a/src/lxml/parser.pxi b/src/lxml/parser.pxi
|
||||
index f0c8c6b64..e1e9da9f0 100644
|
||||
--- a/src/lxml/parser.pxi
|
||||
+++ b/src/lxml/parser.pxi
|
||||
@@ -402,10 +402,10 @@ cdef class _FileReaderContext:
|
||||
finally:
|
||||
return c_byte_count # swallow any exceptions
|
||||
|
||||
-cdef int _readFilelikeParser(void* ctxt, char* c_buffer, int c_size) with gil:
|
||||
+cdef int _readFilelikeParser(void* ctxt, char* c_buffer, int c_size) except -1 with gil:
|
||||
return (<_FileReaderContext>ctxt).copyToBuffer(c_buffer, c_size)
|
||||
|
||||
-cdef int _readFileParser(void* ctxt, char* c_buffer, int c_size) nogil:
|
||||
+cdef int _readFileParser(void* ctxt, char* c_buffer, int c_size) except -1 nogil:
|
||||
return stdio.fread(c_buffer, 1, c_size, <stdio.FILE*>ctxt)
|
||||
|
||||
############################################################
|
||||
@@ -626,10 +626,10 @@ cdef _initParserContext(_ParserContext context,
|
||||
if c_ctxt is not NULL:
|
||||
context._initParserContext(c_ctxt)
|
||||
|
||||
-cdef void _forwardParserError(xmlparser.xmlParserCtxt* _parser_context, xmlerror.xmlError* error) with gil:
|
||||
+cdef void _forwardParserError(xmlparser.xmlParserCtxt* _parser_context, xmlerror.xmlError* error) noexcept with gil:
|
||||
(<_ParserContext>_parser_context._private)._error_log._receive(error)
|
||||
|
||||
-cdef void _receiveParserError(void* c_context, xmlerror.xmlError* error) nogil:
|
||||
+cdef void _receiveParserError(void* c_context, xmlerror.xmlError* error) noexcept nogil:
|
||||
if __DEBUG:
|
||||
if c_context is NULL or (<xmlparser.xmlParserCtxt*>c_context)._private is NULL:
|
||||
_forwardError(NULL, error)
|
||||
@@ -1207,7 +1207,7 @@ cdef class _BaseParser:
|
||||
context.cleanup()
|
||||
|
||||
|
||||
-cdef void _initSaxDocument(void* ctxt) with gil:
|
||||
+cdef void _initSaxDocument(void* ctxt) noexcept with gil:
|
||||
xmlparser.xmlSAX2StartDocument(ctxt)
|
||||
c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
|
||||
c_doc = c_ctxt.myDoc
|
||||
diff --git a/src/lxml/saxparser.pxi b/src/lxml/saxparser.pxi
|
||||
index 49e72beaf..1737f0801 100644
|
||||
--- a/src/lxml/saxparser.pxi
|
||||
+++ b/src/lxml/saxparser.pxi
|
||||
@@ -294,7 +294,7 @@ cdef void _handleSaxStart(
|
||||
const_xmlChar* c_namespace, int c_nb_namespaces,
|
||||
const_xmlChar** c_namespaces,
|
||||
int c_nb_attributes, int c_nb_defaulted,
|
||||
- const_xmlChar** c_attributes) with gil:
|
||||
+ const_xmlChar** c_attributes) noexcept with gil:
|
||||
cdef int i
|
||||
cdef size_t c_len
|
||||
c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
|
||||
@@ -336,7 +336,7 @@ cdef void _handleSaxTargetStart(
|
||||
const_xmlChar* c_namespace, int c_nb_namespaces,
|
||||
const_xmlChar** c_namespaces,
|
||||
int c_nb_attributes, int c_nb_defaulted,
|
||||
- const_xmlChar** c_attributes) with gil:
|
||||
+ const_xmlChar** c_attributes) noexcept with gil:
|
||||
cdef int i
|
||||
cdef size_t c_len
|
||||
c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
|
||||
@@ -407,7 +407,7 @@ cdef void _handleSaxTargetStart(
|
||||
|
||||
|
||||
cdef void _handleSaxStartNoNs(void* ctxt, const_xmlChar* c_name,
|
||||
- const_xmlChar** c_attributes) with gil:
|
||||
+ const_xmlChar** c_attributes) noexcept with gil:
|
||||
c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
|
||||
if c_ctxt._private is NULL or c_ctxt.disableSAX:
|
||||
return
|
||||
@@ -426,7 +426,7 @@ cdef void _handleSaxStartNoNs(void* ctxt, const_xmlChar* c_name,
|
||||
|
||||
|
||||
cdef void _handleSaxTargetStartNoNs(void* ctxt, const_xmlChar* c_name,
|
||||
- const_xmlChar** c_attributes) with gil:
|
||||
+ const_xmlChar** c_attributes) noexcept with gil:
|
||||
c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
|
||||
if c_ctxt._private is NULL or c_ctxt.disableSAX:
|
||||
return
|
||||
@@ -483,7 +483,7 @@ cdef int _pushSaxStartEvent(_SaxParserContext context,
|
||||
|
||||
cdef void _handleSaxEnd(void* ctxt, const_xmlChar* c_localname,
|
||||
const_xmlChar* c_prefix,
|
||||
- const_xmlChar* c_namespace) with gil:
|
||||
+ const_xmlChar* c_namespace) noexcept with gil:
|
||||
c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
|
||||
if c_ctxt._private is NULL or c_ctxt.disableSAX:
|
||||
return
|
||||
@@ -506,7 +506,7 @@ cdef void _handleSaxEnd(void* ctxt, const_xmlChar* c_localname,
|
||||
return # swallow any further exceptions
|
||||
|
||||
|
||||
-cdef void _handleSaxEndNoNs(void* ctxt, const_xmlChar* c_name) with gil:
|
||||
+cdef void _handleSaxEndNoNs(void* ctxt, const_xmlChar* c_name) noexcept with gil:
|
||||
c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
|
||||
if c_ctxt._private is NULL or c_ctxt.disableSAX:
|
||||
return
|
||||
@@ -558,7 +558,7 @@ cdef int _pushSaxEndEvent(_SaxParserContext context,
|
||||
return 0
|
||||
|
||||
|
||||
-cdef void _handleSaxData(void* ctxt, const_xmlChar* c_data, int data_len) with gil:
|
||||
+cdef void _handleSaxData(void* ctxt, const_xmlChar* c_data, int data_len) noexcept with gil:
|
||||
# can only be called if parsing with a target
|
||||
c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
|
||||
if c_ctxt._private is NULL or c_ctxt.disableSAX:
|
||||
@@ -575,7 +575,7 @@ cdef void _handleSaxData(void* ctxt, const_xmlChar* c_data, int data_len) with g
|
||||
|
||||
cdef void _handleSaxTargetDoctype(void* ctxt, const_xmlChar* c_name,
|
||||
const_xmlChar* c_public,
|
||||
- const_xmlChar* c_system) with gil:
|
||||
+ const_xmlChar* c_system) noexcept with gil:
|
||||
# can only be called if parsing with a target
|
||||
c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
|
||||
if c_ctxt._private is NULL or c_ctxt.disableSAX:
|
||||
@@ -592,7 +592,7 @@ cdef void _handleSaxTargetDoctype(void* ctxt, const_xmlChar* c_name,
|
||||
return # swallow any further exceptions
|
||||
|
||||
|
||||
-cdef void _handleSaxStartDocument(void* ctxt) with gil:
|
||||
+cdef void _handleSaxStartDocument(void* ctxt) noexcept with gil:
|
||||
c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
|
||||
if c_ctxt._private is NULL or c_ctxt.disableSAX:
|
||||
return
|
||||
@@ -608,7 +608,7 @@ cdef void _handleSaxStartDocument(void* ctxt) with gil:
|
||||
|
||||
|
||||
cdef void _handleSaxTargetPI(void* ctxt, const_xmlChar* c_target,
|
||||
- const_xmlChar* c_data) with gil:
|
||||
+ const_xmlChar* c_data) noexcept with gil:
|
||||
# can only be called if parsing with a target
|
||||
c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
|
||||
if c_ctxt._private is NULL or c_ctxt.disableSAX:
|
||||
@@ -627,7 +627,7 @@ cdef void _handleSaxTargetPI(void* ctxt, const_xmlChar* c_target,
|
||||
|
||||
|
||||
cdef void _handleSaxPIEvent(void* ctxt, const_xmlChar* target,
|
||||
- const_xmlChar* data) with gil:
|
||||
+ const_xmlChar* data) noexcept with gil:
|
||||
# can only be called when collecting pi events
|
||||
c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
|
||||
if c_ctxt._private is NULL or c_ctxt.disableSAX:
|
||||
@@ -645,7 +645,7 @@ cdef void _handleSaxPIEvent(void* ctxt, const_xmlChar* target,
|
||||
return # swallow any further exceptions
|
||||
|
||||
|
||||
-cdef void _handleSaxTargetComment(void* ctxt, const_xmlChar* c_data) with gil:
|
||||
+cdef void _handleSaxTargetComment(void* ctxt, const_xmlChar* c_data) noexcept with gil:
|
||||
# can only be called if parsing with a target
|
||||
c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
|
||||
if c_ctxt._private is NULL or c_ctxt.disableSAX:
|
||||
@@ -661,7 +661,7 @@ cdef void _handleSaxTargetComment(void* ctxt, const_xmlChar* c_data) with gil:
|
||||
return # swallow any further exceptions
|
||||
|
||||
|
||||
-cdef void _handleSaxComment(void* ctxt, const_xmlChar* text) with gil:
|
||||
+cdef void _handleSaxComment(void* ctxt, const_xmlChar* text) noexcept with gil:
|
||||
# can only be called when collecting comment events
|
||||
c_ctxt = <xmlparser.xmlParserCtxt*>ctxt
|
||||
if c_ctxt._private is NULL or c_ctxt.disableSAX:
|
||||
diff --git a/src/lxml/serializer.pxi b/src/lxml/serializer.pxi
|
||||
index 79a02829e..e1c76e1ba 100644
|
||||
--- a/src/lxml/serializer.pxi
|
||||
+++ b/src/lxml/serializer.pxi
|
||||
@@ -699,10 +699,10 @@ cdef class _FilelikeWriter:
|
||||
finally:
|
||||
return retval # and swallow any further exceptions
|
||||
|
||||
-cdef int _writeFilelikeWriter(void* ctxt, char* c_buffer, int length):
|
||||
+cdef int _writeFilelikeWriter(void* ctxt, char* c_buffer, int length) except -1:
|
||||
return (<_FilelikeWriter>ctxt).write(c_buffer, length)
|
||||
|
||||
-cdef int _closeFilelikeWriter(void* ctxt):
|
||||
+cdef int _closeFilelikeWriter(void* ctxt) except -1:
|
||||
return (<_FilelikeWriter>ctxt).close()
|
||||
|
||||
cdef _tofilelike(f, _Element element, encoding, doctype, method,
|
||||
diff --git a/src/lxml/xmlerror.pxi b/src/lxml/xmlerror.pxi
|
||||
index 1b50444fb..793e1d923 100644
|
||||
--- a/src/lxml/xmlerror.pxi
|
||||
+++ b/src/lxml/xmlerror.pxi
|
||||
@@ -634,7 +634,7 @@ def use_global_python_log(PyErrorLog log not None):
|
||||
|
||||
|
||||
# local log functions: forward error to logger object
|
||||
-cdef void _forwardError(void* c_log_handler, xmlerror.xmlError* error) with gil:
|
||||
+cdef void _forwardError(void* c_log_handler, xmlerror.xmlError* error) noexcept with gil:
|
||||
cdef _BaseErrorLog log_handler
|
||||
if c_log_handler is not NULL:
|
||||
log_handler = <_BaseErrorLog>c_log_handler
|
||||
@@ -645,27 +645,27 @@ cdef void _forwardError(void* c_log_handler, xmlerror.xmlError* error) with gil:
|
||||
log_handler._receive(error)
|
||||
|
||||
|
||||
-cdef void _receiveError(void* c_log_handler, xmlerror.xmlError* error) nogil:
|
||||
+cdef void _receiveError(void* c_log_handler, xmlerror.xmlError* error) noexcept nogil:
|
||||
# no Python objects here, may be called without thread context !
|
||||
if __DEBUG:
|
||||
_forwardError(c_log_handler, error)
|
||||
|
||||
|
||||
-cdef void _receiveXSLTError(void* c_log_handler, char* msg, ...) nogil:
|
||||
+cdef void _receiveXSLTError(void* c_log_handler, char* msg, ...) noexcept nogil:
|
||||
# no Python objects here, may be called without thread context !
|
||||
cdef cvarargs.va_list args
|
||||
cvarargs.va_start(args, msg)
|
||||
_receiveGenericError(c_log_handler, xmlerror.XML_FROM_XSLT, msg, args)
|
||||
cvarargs.va_end(args)
|
||||
|
||||
-cdef void _receiveRelaxNGParseError(void* c_log_handler, char* msg, ...) nogil:
|
||||
+cdef void _receiveRelaxNGParseError(void* c_log_handler, char* msg, ...) noexcept nogil:
|
||||
# no Python objects here, may be called without thread context !
|
||||
cdef cvarargs.va_list args
|
||||
cvarargs.va_start(args, msg)
|
||||
_receiveGenericError(c_log_handler, xmlerror.XML_FROM_RELAXNGP, msg, args)
|
||||
cvarargs.va_end(args)
|
||||
|
||||
-cdef void _receiveRelaxNGValidationError(void* c_log_handler, char* msg, ...) nogil:
|
||||
+cdef void _receiveRelaxNGValidationError(void* c_log_handler, char* msg, ...) noexcept nogil:
|
||||
# no Python objects here, may be called without thread context !
|
||||
cdef cvarargs.va_list args
|
||||
cvarargs.va_start(args, msg)
|
||||
@@ -673,7 +673,7 @@ cdef void _receiveRelaxNGValidationError(void* c_log_handler, char* msg, ...) no
|
||||
cvarargs.va_end(args)
|
||||
|
||||
# dummy function: no log output at all
|
||||
-cdef void _nullGenericErrorFunc(void* ctxt, char* msg, ...) nogil:
|
||||
+cdef void _nullGenericErrorFunc(void* ctxt, char* msg, ...) noexcept nogil:
|
||||
pass
|
||||
|
||||
|
||||
@@ -694,7 +694,7 @@ cdef void _connectGenericErrorLog(log, int c_domain=-1):
|
||||
|
||||
|
||||
cdef void _receiveGenericError(void* c_log_handler, int c_domain,
|
||||
- char* msg, cvarargs.va_list args) nogil:
|
||||
+ char* msg, cvarargs.va_list args) noexcept nogil:
|
||||
# no Python objects here, may be called without thread context !
|
||||
cdef xmlerror.xmlError c_error
|
||||
cdef char* c_text
|
||||
diff --git a/src/lxml/xpath.pxi b/src/lxml/xpath.pxi
|
||||
index a7cae4bff..704338e89 100644
|
||||
--- a/src/lxml/xpath.pxi
|
||||
+++ b/src/lxml/xpath.pxi
|
||||
@@ -99,7 +99,7 @@ cdef class _XPathContext(_BaseContext):
|
||||
|
||||
|
||||
cdef void _registerExsltFunctionsForNamespaces(
|
||||
- void* _c_href, void* _ctxt, const_xmlChar* c_prefix):
|
||||
+ void* _c_href, void* _ctxt, const_xmlChar* c_prefix) noexcept:
|
||||
c_href = <const_xmlChar*> _c_href
|
||||
ctxt = <xpath.xmlXPathContext*> _ctxt
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
Name: python-lxml
|
||||
Version: 4.9.4
|
||||
Version: 5.1.0
|
||||
Release: 1%{?dist}
|
||||
Summary: XML processing library combining libxml2/libxslt with the ElementTree API
|
||||
|
||||
@ -16,25 +16,6 @@ URL: https://github.com/lxml/lxml
|
||||
Source0: lxml-%{version}-no-isoschematron-rng.tar.gz
|
||||
Source1: get-lxml-source.sh
|
||||
|
||||
# Make the validation of ISO-Schematron files optional in lxml,
|
||||
# depending on the availability of the RNG validation file
|
||||
# Rebased from https://github.com/lxml/lxml/commit/4bfab2c821961fb4c5ed8a04e329778c9b09a1df
|
||||
# Will be included in lxml 5.0
|
||||
Patch: Make-the-validation-of-ISO-Schematron-files-optional.patch
|
||||
# Skip test_isoschematron.test_schematron_invalid_schema_empty without the RNG file
|
||||
Patch: https://github.com/lxml/lxml/pull/380.patch
|
||||
|
||||
# Upstream issue: https://bugs.launchpad.net/lxml/+bug/2016939
|
||||
Patch: Skip-failing-test-test_html_prefix_nsmap.patch
|
||||
|
||||
# Cython 3 support backported from future lxml 5.0
|
||||
Patch: https://github.com/lxml/lxml/commit/dcbc0cc1cb0cedf8019184aaca805d2a649cd8de.patch
|
||||
Patch: https://github.com/lxml/lxml/commit/a03a4b3c6b906d33c5ef1a15f3d5ca5fff600c76.patch
|
||||
|
||||
# Python 3.13 compatibility
|
||||
Patch: https://github.com/lxml/lxml/commit/34187968a67151f02db491a56a0037b55319931d.patch
|
||||
Patch: https://github.com/lxml/lxml/commit/98025653e182f9203189cbde0ab2d6ebec556db8.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: libxslt-devel
|
||||
@ -79,6 +60,7 @@ Python 3 version.
|
||||
|
||||
# Remove limit for version of Cython
|
||||
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}
|
||||
@ -107,6 +89,9 @@ cp -a build/lib.%{python3_platform}-*/* src/
|
||||
%doc README.rst
|
||||
|
||||
%changelog
|
||||
* Mon Jan 08 2024 Lumír Balhar <lbalhar@redhat.com> - 5.1.0-1
|
||||
- Update to 5.1.0 (rhbz#2256232)
|
||||
|
||||
* Wed Dec 20 2023 Lumír Balhar <lbalhar@redhat.com> - 4.9.4-1
|
||||
- Update to 4.9.4 (rhbz#2255267)
|
||||
|
||||
|
||||
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (lxml-4.9.4-no-isoschematron-rng.tar.gz) = 0519d6d58537d870fd862fa9f9256cca85162720eb417e2f532d000ab0faf25121b947746517c0a5df56c9d89e5cf5069a3a90f0fe116b2e6378329f2330c8ac
|
||||
SHA512 (lxml-5.1.0-no-isoschematron-rng.tar.gz) = f4b65c0189c89742fb4be6a3e73b08e7e7338272b71482e64be75dc8d53cebc769c0520a86a46579328fa0ec4377bb2bd860338550b1098d26c8f509fcedc664
|
||||
|
||||
Loading…
Reference in New Issue
Block a user