Skip to content

Commit

Permalink
python3-lxml: update to 4.9.3
Browse files Browse the repository at this point in the history
Patch for python3-Cython-3.0.0.
  • Loading branch information
tornaria authored and ahesford committed Jul 21, 2023
1 parent d5f9225 commit 510b4d4
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 2 deletions.
32 changes: 32 additions & 0 deletions srcpkgs/python3-lxml/patches/cython3-fix-test.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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)

12 changes: 12 additions & 0 deletions srcpkgs/python3-lxml/patches/cython3-legacy.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
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
17 changes: 17 additions & 0 deletions srcpkgs/python3-lxml/patches/libxml-2.10.4.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
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
14 changes: 14 additions & 0 deletions srcpkgs/python3-lxml/patches/libxml-2.11.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
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:
4 changes: 2 additions & 2 deletions srcpkgs/python3-lxml/template
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Template file for 'python3-lxml'
pkgname=python3-lxml
version=4.9.2
version=4.9.3
revision=1
build_style=python3-module
make_build_args="--with-cython"
Expand All @@ -13,7 +13,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="BSD-3-Clause, custom:ElementTree"
homepage="https://lxml.de/"
distfiles="https://github.com/lxml/lxml/archive/lxml-${version}.tar.gz"
checksum=c057e334efc357fc88eb71b888d2df3a44cf3c7aaac56a8753e92090c5217050
checksum=42b9ab83cb8739d817c7fff41c20f31aa61625bb6f6ab333873a5f3406b139ac

do_check() {
make test3
Expand Down

0 comments on commit 510b4d4

Please sign in to comment.