mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
python3-lxml: update to 5.3.0.
This commit is contained in:
parent
255a8dd97b
commit
ad8e979527
6 changed files with 13 additions and 85 deletions
|
@ -1,32 +0,0 @@
|
||||||
diff --git a/src/lxml/tests/test_errors.py b/src/lxml/tests/test_errors.py
|
|
||||||
index c0aee744..4875f298 100644
|
|
||||||
--- a/src/lxml/tests/test_errors.py
|
|
||||||
+++ b/src/lxml/tests/test_errors.py
|
|
||||||
@@ -28,7 +28,6 @@ class ErrorTestCase(HelperTestCase):
|
|
||||||
def test_element_cyclic_gc_none(self):
|
|
||||||
# test if cyclic reference can crash etree
|
|
||||||
Element = self.etree.Element
|
|
||||||
- getrefcount = sys.getrefcount
|
|
||||||
|
|
||||||
# must disable tracing as it could change the refcounts
|
|
||||||
trace_func = sys.gettrace()
|
|
||||||
@@ -36,16 +35,16 @@ class ErrorTestCase(HelperTestCase):
|
|
||||||
sys.settrace(None)
|
|
||||||
gc.collect()
|
|
||||||
|
|
||||||
- count = getrefcount(None)
|
|
||||||
+ count1 = gc.get_count()
|
|
||||||
|
|
||||||
l = [Element('name'), Element('name')]
|
|
||||||
l.append(l)
|
|
||||||
|
|
||||||
del l
|
|
||||||
gc.collect()
|
|
||||||
- count = getrefcount(None) - count
|
|
||||||
+ count2 = gc.get_count()
|
|
||||||
|
|
||||||
- self.assertEqual(count, 0)
|
|
||||||
+ self.assertEqual(count1, count2)
|
|
||||||
finally:
|
|
||||||
sys.settrace(trace_func)
|
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
diff --git a/setupinfo.py b/setupinfo.py
|
|
||||||
index 5feb13bf..ea1b391c 100644
|
|
||||||
--- a/setupinfo.py
|
|
||||||
+++ b/setupinfo.py
|
|
||||||
@@ -148,6 +148,7 @@ def ext_modules(static_include_dirs, static_library_dirs,
|
|
||||||
|
|
||||||
cythonize_directives = {
|
|
||||||
'binding': True,
|
|
||||||
+ 'legacy_implicit_noexcept': True,
|
|
||||||
}
|
|
||||||
if OPTION_WITH_COVERAGE:
|
|
||||||
cythonize_directives['linetrace'] = True
|
|
|
@ -1,16 +1,19 @@
|
||||||
from alpine: https://gitlab.alpinelinux.org/alpine/aports/-/commit/369de77b6197a5d04beb551537533fc82141a516
|
from alpine: https://gitlab.alpinelinux.org/alpine/aports/-/blob/3f64a63298ac78f5f2a50a52e3e3f01eef1b51ce/main/py3-lxml/tests-fix-encoding-name.patch
|
||||||
|
|
||||||
From: Patrycja Rosa <alpine@ptrcnull.me>
|
|
||||||
Date: Thu, 10 Feb 2022 14:09:24 +0100
|
|
||||||
Subject: test_incremental_xmlfile: fix encoding name
|
|
||||||
|
|
||||||
diff --git a/src/lxml/tests/test_incremental_xmlfile.py b/src/lxml/tests/test_incremental_xmlfile.py
|
diff --git a/src/lxml/tests/test_incremental_xmlfile.py b/src/lxml/tests/test_incremental_xmlfile.py
|
||||||
|
index 3162155..43b79d7 100644
|
||||||
--- a/src/lxml/tests/test_incremental_xmlfile.py
|
--- a/src/lxml/tests/test_incremental_xmlfile.py
|
||||||
+++ b/src/lxml/tests/test_incremental_xmlfile.py
|
+++ b/src/lxml/tests/test_incremental_xmlfile.py
|
||||||
@@ -173,4 +173,4 @@
|
@@ -177,10 +177,10 @@ class _XmlFileTestCaseBase(HelperTestCase):
|
||||||
|
'<test>Comments: <!-- text -->\nEntities: &amp;</test>')
|
||||||
|
|
||||||
|
def test_encoding(self):
|
||||||
- with etree.xmlfile(self._file, encoding='utf16') as xf:
|
- with etree.xmlfile(self._file, encoding='utf16') as xf:
|
||||||
+ with etree.xmlfile(self._file, encoding='utf-16') as xf:
|
+ with etree.xmlfile(self._file, encoding='utf-16') as xf:
|
||||||
with xf.element('test'):
|
with xf.element('test'):
|
||||||
xf.write('toast')
|
xf.write('toast')
|
||||||
- self.assertXml('<test>toast</test>', encoding='utf16')
|
- self.assertXml('<test>toast</test>', encoding='utf16')
|
||||||
+ self.assertXml('<test>toast</test>', encoding='utf-16')
|
+ self.assertXml('<test>toast</test>', encoding='utf-16')
|
||||||
|
|
||||||
|
def test_buffering(self):
|
||||||
|
with etree.xmlfile(self._file, buffered=False) as xf:
|
|
@ -1,17 +0,0 @@
|
||||||
From alpine: https://gitlab.alpinelinux.org/alpine/aports/-/tree/master/main/py3-lxml
|
|
||||||
|
|
||||||
the find above returns None with this version
|
|
||||||
--
|
|
||||||
diff --git a/src/lxml/tests/test_etree.py b/src/lxml/tests/test_etree.py
|
|
||||||
index 0339796..790c57a 100644
|
|
||||||
--- a/src/lxml/tests/test_etree.py
|
|
||||||
+++ b/src/lxml/tests/test_etree.py
|
|
||||||
@@ -3073,7 +3073,7 @@ class ETreeOnlyTestCase(HelperTestCase):
|
|
||||||
if etree.LIBXML_VERSION < (2, 9, 11):
|
|
||||||
self.assertEqual({'hha': None}, el.nsmap)
|
|
||||||
else:
|
|
||||||
- self.assertEqual({}, el.nsmap)
|
|
||||||
+ self.assertEqual(None, el)
|
|
||||||
|
|
||||||
def test_getchildren(self):
|
|
||||||
Element = self.etree.Element
|
|
|
@ -1,14 +0,0 @@
|
||||||
From alpine: https://gitlab.alpinelinux.org/alpine/aports/-/tree/master/main/py3-lxml
|
|
||||||
|
|
||||||
diff --git a/src/lxml/tests/test_io.py b/src/lxml/tests/test_io.py
|
|
||||||
index cbdbcef..efbd3fd 100644
|
|
||||||
--- a/src/lxml/tests/test_io.py
|
|
||||||
+++ b/src/lxml/tests/test_io.py
|
|
||||||
@@ -312,6 +312,7 @@ class _IOTestCaseBase(HelperTestCase):
|
|
||||||
self.assertEqual(5, len(boms))
|
|
||||||
xml = uxml.encode("utf-16")
|
|
||||||
self.assertTrue(xml[:2] in boms, repr(xml[:2]))
|
|
||||||
+ return True
|
|
||||||
|
|
||||||
f = tempfile.NamedTemporaryFile(delete=False)
|
|
||||||
try:
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'python3-lxml'
|
# Template file for 'python3-lxml'
|
||||||
pkgname=python3-lxml
|
pkgname=python3-lxml
|
||||||
version=4.9.3
|
version=5.3.0
|
||||||
revision=3
|
revision=1
|
||||||
build_style=python3-module
|
build_style=python3-module
|
||||||
make_build_args="--with-cython"
|
make_build_args="--with-cython"
|
||||||
hostmakedepends="python3-Cython python3-setuptools"
|
hostmakedepends="python3-Cython python3-setuptools"
|
||||||
|
@ -14,10 +14,10 @@ license="BSD-3-Clause, custom:ElementTree"
|
||||||
homepage="https://lxml.de/"
|
homepage="https://lxml.de/"
|
||||||
changelog="https://raw.githubusercontent.com/lxml/lxml/master/CHANGES.txt"
|
changelog="https://raw.githubusercontent.com/lxml/lxml/master/CHANGES.txt"
|
||||||
distfiles="https://github.com/lxml/lxml/archive/lxml-${version}.tar.gz"
|
distfiles="https://github.com/lxml/lxml/archive/lxml-${version}.tar.gz"
|
||||||
checksum=42b9ab83cb8739d817c7fff41c20f31aa61625bb6f6ab333873a5f3406b139ac
|
checksum=eb22f7ceb319c29247cfa398435d00e6286d19a32b4870b67a8e9a38d72f2ebd
|
||||||
|
|
||||||
do_check() {
|
do_check() {
|
||||||
make test3
|
make test
|
||||||
}
|
}
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue