summaryrefslogtreecommitdiff
path: root/dev-python/lxml
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-05-25 09:05:36 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-05-25 09:05:36 +0100
commit070db046876f2e8d5f83cb7b380ae857d06e493a (patch)
tree81c82d9b296b94b64dd8aea6ad369ea43f40bc14 /dev-python/lxml
parent4bc145ba9c79d57abcafc9b97c72bd5addd3e833 (diff)
gentoo auto-resync : 25:05:2023 - 09:05:36
Diffstat (limited to 'dev-python/lxml')
-rw-r--r--dev-python/lxml/Manifest3
-rw-r--r--dev-python/lxml/files/lxml-4.9.2-py3.12-drop-deprecated-imp.patch49
-rw-r--r--dev-python/lxml/lxml-4.9.2.ebuild3
3 files changed, 53 insertions, 2 deletions
diff --git a/dev-python/lxml/Manifest b/dev-python/lxml/Manifest
index 3bb093338c87..2da3d2ae601e 100644
--- a/dev-python/lxml/Manifest
+++ b/dev-python/lxml/Manifest
@@ -1,4 +1,5 @@
AUX lxml-4.6.0-tests-pypy.patch 18051 BLAKE2B 99d97fa2e874c9bec4a866c3303b54ea2ab1e6abddf148d142cb66ee035b1eab1e05eed924d34451c5db38dc37f77104539cbfc2fe45815c17445b6359dcb857 SHA512 f6c6c2b00a49e6ca19d8b9123c364003a682c2e8df0c42d8600085d1cb094ba5cedd162bfc794e7d9acfff93aac771953dca5a879c3b957af1e2e8bd1db05515
+AUX lxml-4.9.2-py3.12-drop-deprecated-imp.patch 1985 BLAKE2B af705cb2092d6468ae556d79c14ca96d8491cf7a96dc1699d0f3e70113637f724876adaa051545c6a434ee9f54a1784ab5e24eefcf7eef61edfdca88980c0f62 SHA512 088428b9a9e103b4476f8bb45f318032126571f518cbeeb2e04e78289f5bd69ce59b7b058abe3957b59b5077160ef4e67cbb5005da92572437f1c27a6e497d83
DIST lxml-4.9.2.gh.tar.gz 957365 BLAKE2B 201b3977da90386e413f1b89a4b7ee1e44d6bbea05e622e92feb1d67c637ce46ebf746f0648f034ed3bccd609233ccf7d8a7ee456f13b8d9ca8587ddf1ebd32a SHA512 816b2fe2eef2a97a0df66cbc39850c6dc3d6470e4033cc73edb40c80c0afbbe6c084d042d7c98b29497926e76f648caa42e1ebe5d83060af08af6972316077b0
-EBUILD lxml-4.9.2.ebuild 2897 BLAKE2B c7240964f193e4ab4452ddca0a9d51574fc63938a1081a0cb4f55dec8f5f0c9bf67bd0815414d8fcf37610a01b268864cfa118a4bfa55e8b68f1e0b1f1d4060e SHA512 b18d3732a9a6849e1be3726dc1a0273882b70d4341de521237c89416519d2050fa6a3e287f64556e4130a54d48be670ec79637833aea119267e15f51396c8096
+EBUILD lxml-4.9.2.ebuild 2951 BLAKE2B 46254e287ba600118fd7a24e64ffab54bca80e807ba5a5727b6b241350cd6dcf3c4ce91a6357b7ce5c4bd32412a799ea4deb261c53e9e7fd9bbccd1571d42e01 SHA512 a414622312e60d90d22496badcbbd37b9c7802e6439c6932a2d275807d77c38d6791c581f880c29bad850da87bea33b5dab8c4ad498d12766c907cdb6bd4f004
MISC metadata.xml 463 BLAKE2B 9bcd092b61568f5d467230617b101f36245c41078e6a66c7ff63b22a6b4095de2ba3a59e48ce8b7842ce58d1255fa293995652daa3fab4c3af988498eaa30e97 SHA512 2ba5e340b59e0de4e472380e9c19b1f6f573e86e5c3c2e075f6151d369e94eea70e3ce36bfb5ece4da3fa69459e3ff83368f1df8302aa5754ae52f13c8f2312e
diff --git a/dev-python/lxml/files/lxml-4.9.2-py3.12-drop-deprecated-imp.patch b/dev-python/lxml/files/lxml-4.9.2-py3.12-drop-deprecated-imp.patch
new file mode 100644
index 000000000000..a59a60e74822
--- /dev/null
+++ b/dev-python/lxml/files/lxml-4.9.2-py3.12-drop-deprecated-imp.patch
@@ -0,0 +1,49 @@
+https://github.com/lxml/lxml/commit/07db761f9f027d1814a43686cda6fca26e37a931
+https://github.com/lxml/lxml/commit/c6b7e621e4696c02bf8f6ea423ffbbf2109748ab
+
+From 07db761f9f027d1814a43686cda6fca26e37a931 Mon Sep 17 00:00:00 2001
+From: Stefan Behnel <stefan_ml@behnel.de>
+Date: Thu, 11 May 2023 10:29:02 +0200
+Subject: [PATCH] Avoid using the deprecated "imp" module.
+
+Closes https://bugs.launchpad.net/lxml/+bug/2018137
+--- a/src/lxml/html/tests/test_html5parser.py
++++ b/src/lxml/html/tests/test_html5parser.py
+@@ -1,5 +1,4 @@
+ import os
+-import imp
+ try:
+ from StringIO import StringIO
+ except ImportError: # python 3
+@@ -45,7 +44,10 @@ def find_module(self, fullname, path=None):
+ return None
+
+ def load_module(self, fullname):
+- mod = sys.modules.setdefault(fullname, imp.new_module(fullname))
++ fake_module = object()
++ fake_module.__qualname__ = fullname
++ fake_module.__name__ = fullname.rsplit('.', 1)[-1]
++ mod = sys.modules.setdefault(fullname, fake_module)
+ mod.__file__, mod.__loader__, mod.__path__ = "<dummy>", self, []
+ mod.__dict__.update(self.mocks[fullname])
+ return mod
+
+From c6b7e621e4696c02bf8f6ea423ffbbf2109748ab Mon Sep 17 00:00:00 2001
+From: Stefan Behnel <stefan_ml@behnel.de>
+Date: Thu, 11 May 2023 10:30:15 +0200
+Subject: [PATCH] Avoid using the deprecated "imp" module.
+
+Closes https://bugs.launchpad.net/lxml/+bug/2018137
+--- a/src/lxml/html/tests/test_html5parser.py
++++ b/src/lxml/html/tests/test_html5parser.py
+@@ -44,7 +44,8 @@ def find_module(self, fullname, path=None):
+ return None
+
+ def load_module(self, fullname):
+- fake_module = object()
++ class Cls: pass
++ fake_module = Cls()
+ fake_module.__qualname__ = fullname
+ fake_module.__name__ = fullname.rsplit('.', 1)[-1]
+ mod = sys.modules.setdefault(fullname, fake_module)
+
diff --git a/dev-python/lxml/lxml-4.9.2.ebuild b/dev-python/lxml/lxml-4.9.2.ebuild
index b7b3efc9de22..aed3280a3b2c 100644
--- a/dev-python/lxml/lxml-4.9.2.ebuild
+++ b/dev-python/lxml/lxml-4.9.2.ebuild
@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{9..11} pypy3 )
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
inherit distutils-r1 optfeature toolchain-funcs
@@ -54,6 +54,7 @@ BDEPEND="
PATCHES=(
"${FILESDIR}"/${PN}-4.6.0-tests-pypy.patch
+ "${FILESDIR}"/${P}-py3.12-drop-deprecated-imp.patch
)
python_check_deps() {