diff options
author | Sam James <sam@gentoo.org> | 2021-10-29 16:06:31 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-10-29 16:06:31 +0100 |
commit | d13eae5e5e10ef534833303d8a84cda4b2d81340 (patch) | |
tree | 2d720e43e71de64f8b617d60ecf4c8673c68f27c /dev-python/lxml | |
parent | dev-python/lxml: drop 4.6.3 (diff) | |
download | gentoo-d13eae5e5e10ef534833303d8a84cda4b2d81340.tar.gz gentoo-d13eae5e5e10ef534833303d8a84cda4b2d81340.tar.bz2 gentoo-d13eae5e5e10ef534833303d8a84cda4b2d81340.zip |
dev-python/lxml: fix tests with newer libxml2
Backport of upstream commit.
Closes: https://bugs.gentoo.org/791190
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/lxml')
-rw-r--r-- | dev-python/lxml/files/lxml-4.6.3-tests-libxml2.patch | 22 | ||||
-rw-r--r-- | dev-python/lxml/lxml-4.6.3-r1.ebuild | 1 |
2 files changed, 23 insertions, 0 deletions
diff --git a/dev-python/lxml/files/lxml-4.6.3-tests-libxml2.patch b/dev-python/lxml/files/lxml-4.6.3-tests-libxml2.patch new file mode 100644 index 000000000000..4c682add3a2d --- /dev/null +++ b/dev-python/lxml/files/lxml-4.6.3-tests-libxml2.patch @@ -0,0 +1,22 @@ +https://github.com/lxml/lxml/commit/852ed1092bd80b6b9a51db24371047ec88843031 +https://bugs.gentoo.org/791190 + +From: Stefan Behnel <stefan_ml@behnel.de> +Date: Tue, 18 May 2021 22:02:02 +0200 +Subject: [PATCH] Adapt a test to a behavioural change in libxml2 2.9.11+. + +--- a/src/lxml/tests/test_etree.py ++++ b/src/lxml/tests/test_etree.py +@@ -3036,7 +3036,10 @@ def test_subelement_nsmap(self): + def test_html_prefix_nsmap(self): + etree = self.etree + el = etree.HTML('<hha:page-description>aa</hha:page-description>').find('.//page-description') +- self.assertEqual({'hha': None}, el.nsmap) ++ if etree.LIBXML_VERSION < (2, 9, 11): ++ self.assertEqual({'hha': None}, el.nsmap) ++ else: ++ self.assertEqual({}, el.nsmap) + + def test_getchildren(self): + Element = self.etree.Element + diff --git a/dev-python/lxml/lxml-4.6.3-r1.ebuild b/dev-python/lxml/lxml-4.6.3-r1.ebuild index e0ce5bad3a36..cf132e427473 100644 --- a/dev-python/lxml/lxml-4.6.3-r1.ebuild +++ b/dev-python/lxml/lxml-4.6.3-r1.ebuild @@ -41,6 +41,7 @@ DISTUTILS_IN_SOURCE_BUILD=1 PATCHES=( "${FILESDIR}"/${PN}-4.6.0-tests-pypy.patch + "${FILESDIR}"/${P}-tests-libxml2.patch ) python_check_deps() { |