summaryrefslogtreecommitdiff
path: root/dev-python/soupsieve
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/soupsieve')
-rw-r--r--dev-python/soupsieve/Manifest3
-rw-r--r--dev-python/soupsieve/files/soupsieve-2.2.1-lxml-libxml2-tests.patch64
-rw-r--r--dev-python/soupsieve/soupsieve-2.2.1-r1.ebuild (renamed from dev-python/soupsieve/soupsieve-2.2.1.ebuild)9
3 files changed, 74 insertions, 2 deletions
diff --git a/dev-python/soupsieve/Manifest b/dev-python/soupsieve/Manifest
index 74aa5bb17065..61d36fd9b6bd 100644
--- a/dev-python/soupsieve/Manifest
+++ b/dev-python/soupsieve/Manifest
@@ -1,3 +1,4 @@
+AUX soupsieve-2.2.1-lxml-libxml2-tests.patch 2208 BLAKE2B 3948099554c06afe5b57b68bdaa52157311b15941f62f02256131a8b4f7189347b5754d3ea5c73372503362f3444dc3b6c63c04c52f0fbdad8506920b9f2557c SHA512 5725d0425e64b7150bef62ef81c2de06cb452554b18f4191a056f0c776f5955ddb572d939bc1a2f5e9d265a0e8a8d9eab17953896d9dfe288c59464cee66d9d9
DIST soupsieve-2.2.1.tar.gz 99298 BLAKE2B 94532421f3b8e49d6ab75a54a60ac861a78eee9f6792ded096e39a8a43d46d195cff9b7d8feab918b0f2debc8a6dd35226ab714384fa7f4d795176e269b6c4cb SHA512 c1339cfca237af7f8915b6d644b8271f769f9a37aa68f8acf536236551baaf9bb44a2f2a736f9168a7649cde14d37b8c24614c9491acbf81e3f4fdaea96b4928
-EBUILD soupsieve-2.2.1.ebuild 733 BLAKE2B 0d0bf38be91b79cd7a050325e55fa366cb791df14ad4cb38e03c812da43f8fcc6bd10c598b1d074f49960189caa51923678b8b42c6ae7358c8e9832b70cd15f5 SHA512 2d9f7d09f11957fec0a1d3a19ac1eca7e7dbb8d66a49735df5f3b64cf48798499798592292331356abd11b070f06428f4dd8d1fca2640c3bc3acbac2b63d36ef
+EBUILD soupsieve-2.2.1-r1.ebuild 936 BLAKE2B a0b67ccc68d0451f748e4c5bbdbc3270ec72c1d93c4b6b26ca736d30de11ecf4aa2f1af629d2b5b72ddede34f080fb4ac7e2ef12f0e3903ed79e13b8ce267e87 SHA512 5b10c61147f821b5c348783598acf51dfbc68448c8871c942264f1441f687dd89a276db91344f86f5d815b3266245ed061022b200f9d6d79829207482f9f32ae
MISC metadata.xml 399 BLAKE2B de09909e906d138c664a0926eca614abf7953e16d5fb0bb0babed691906360cdb8c87b9a79ea5ddd2492b4e8cee561e5433d02ba47be5cf670fbde9e70dfed9f SHA512 0ca6cbc294f232ae9d0f5f0de3cb1c133f5742435d523a0481bd7449dd9a75aa950f08a668b4e1900e520461410e0eb864dc913361204909524805f1cb9e0a2c
diff --git a/dev-python/soupsieve/files/soupsieve-2.2.1-lxml-libxml2-tests.patch b/dev-python/soupsieve/files/soupsieve-2.2.1-lxml-libxml2-tests.patch
new file mode 100644
index 000000000000..a7075fa6fb6d
--- /dev/null
+++ b/dev-python/soupsieve/files/soupsieve-2.2.1-lxml-libxml2-tests.patch
@@ -0,0 +1,64 @@
+https://sources.debian.org/data/main/s/soupsieve/2.2.1-2/debian/patches/libxml2-2.9.11
+https://github.com/facelessuser/soupsieve/issues/220
+
+Apply Debian patch to skip tests which expose a lxml bug that's
+already being handled elsewhere.
+
+From: Stefano Rivera <stefanor@debian.org>
+Date: Sat, 2 Oct 2021 12:05:17 -0700
+Subject: Mark test_contains_cdata_html tests XFAIL for libxml2 >= 2.9.11
+
+libxml2 changed CDATA handling in 2.9.11.
+Beautifulsoup supports this change, but lxml upstream has pinned on an
+older version so the behaviour change isn't standardised upstream, yet.
+
+Bug-upstream: https://github.com/facelessuser/soupsieve/issues/220
+Bug-lxml: https://bugs.launchpad.net/lxml/+bug/1928795
+Bug-beautifulsoup: https://bugs.launchpad.net/beautifulsoup/+bug/1930164
+Bug-Debian: https://bugs.debian.org/995459
+
+Forwarded: no
+--- a/tests/test_extra/test_soup_contains.py
++++ b/tests/test_extra/test_soup_contains.py
+@@ -3,6 +3,9 @@ from .. import util
+ import warnings
+ import soupsieve as sv
+
++import pytest
++from lxml.etree import LIBXML_VERSION
++
+
+ class TestSoupContains(util.TestCase):
+ """Test soup-contains selectors."""
+@@ -144,6 +147,9 @@ class TestSoupContains(util.TestCase):
+ flags=util.HTML
+ )
+
++ @pytest.mark.xfail(LIBXML_VERSION >= (2, 9, 11),
++ reason='lxml parser changed CDATA handling, see '
++ 'https://github.com/facelessuser/soupsieve/issues/220')
+ def test_contains_cdata_html(self):
+ """Test contains CDATA in HTML5."""
+
+--- a/tests/test_extra/test_soup_contains_own.py
++++ b/tests/test_extra/test_soup_contains_own.py
+@@ -1,6 +1,9 @@
+ """Test contains selectors."""
+ from .. import util
+
++import pytest
++from lxml.etree import LIBXML_VERSION
++
+
+ class TestSoupContainsOwn(util.TestCase):
+ """Test soup-contains-own selectors."""
+@@ -35,6 +38,9 @@ class TestSoupContainsOwn(util.TestCase):
+ flags=util.HTML
+ )
+
++ @pytest.mark.xfail(LIBXML_VERSION >= (2, 9, 11),
++ reason='lxml parser changed CDATA handling, see '
++ 'https://github.com/facelessuser/soupsieve/issues/220')
+ def test_contains_own_cdata_html(self):
+ """Test contains CDATA in HTML5."""
+
diff --git a/dev-python/soupsieve/soupsieve-2.2.1.ebuild b/dev-python/soupsieve/soupsieve-2.2.1-r1.ebuild
index c7f078edb7b3..02ac9fda95fc 100644
--- a/dev-python/soupsieve/soupsieve-2.2.1.ebuild
+++ b/dev-python/soupsieve/soupsieve-2.2.1-r1.ebuild
@@ -19,9 +19,16 @@ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 s
BDEPEND="
test? (
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
- <dev-python/lxml-4.6.3-r1[${PYTHON_USEDEP}]
+ dev-python/lxml[${PYTHON_USEDEP}]
dev-python/html5lib[${PYTHON_USEDEP}]
)
"
+PATCHES=(
+ # Needed for now until something is figured out either at lxml
+ # upstream or libxml2?
+ # See https://github.com/facelessuser/soupsieve/issues/220
+ "${FILESDIR}"/${PN}-2.2.1-lxml-libxml2-tests.patch
+)
+
distutils_enable_tests pytest