diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2023-05-25 13:24:13 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2023-05-25 13:24:13 +0000 |
| commit | 019598ba87c343a17fc9a4ba5759cbc13861413b (patch) | |
| tree | 4163607cf19a86bbbdbb0ed46c124911561a2ed2 /dev-python/lxml | |
| parent | 6cf4102d4df215ae151484a7bab79516a56d2b65 (diff) | |
| download | baldeagleos-repo-019598ba87c343a17fc9a4ba5759cbc13861413b.tar.gz baldeagleos-repo-019598ba87c343a17fc9a4ba5759cbc13861413b.tar.xz baldeagleos-repo-019598ba87c343a17fc9a4ba5759cbc13861413b.zip | |
Adding metadata
Diffstat (limited to 'dev-python/lxml')
| -rw-r--r-- | dev-python/lxml/files/lxml-4.9.2-py3.12-drop-deprecated-imp.patch | 49 | ||||
| -rw-r--r-- | dev-python/lxml/lxml-4.9.2.ebuild | 1 |
2 files changed, 50 insertions, 0 deletions
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 f202106ef1d9..bb31eb438f7f 100644 --- a/dev-python/lxml/lxml-4.9.2.ebuild +++ b/dev-python/lxml/lxml-4.9.2.ebuild @@ -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() { |
