From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/files/, dev-python/lxml/
Date: Thu, 25 May 2023 03:18:04 +0000 (UTC) [thread overview]
Message-ID: <1684984462.6e26f683b520a7dc58601ec1cffc4f2655ed34dc.sam@gentoo> (raw)
commit: 6e26f683b520a7dc58601ec1cffc4f2655ed34dc
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu May 25 03:07:48 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu May 25 03:14:22 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e26f683
dev-python/lxml: enable py3.12
Same failures as with other Pythons (new libxslt/libxml2).
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../lxml-4.9.2-py3.12-drop-deprecated-imp.patch | 49 ++++++++++++++++++++++
dev-python/lxml/lxml-4.9.2.ebuild | 3 +-
2 files changed, 51 insertions(+), 1 deletion(-)
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() {
next reply other threads:[~2023-05-25 3:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-25 3:18 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-03-01 7:11 [gentoo-commits] repo/gentoo:master commit in: dev-python/lxml/files/, dev-python/lxml/ Michał Górny
2024-07-02 5:00 Michał Górny
2024-01-09 8:09 Michał Górny
2023-11-16 18:25 Michał Górny
2023-10-25 5:54 Michał Górny
2023-06-06 5:34 Sam James
2021-12-11 23:24 Michał Górny
2020-11-27 8:43 Michał Górny
2020-10-17 19:01 Michał Górny
2019-11-27 2:18 Patrick McLean
2016-12-22 22:46 Lars Wendler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1684984462.6e26f683b520a7dc58601ec1cffc4f2655ed34dc.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox