* [1.50][PATCH 0/1] Patch review
@ 2022-01-25 3:41 Anuj Mittal
2022-01-25 3:41 ` [1.50][PATCH 1/1] utils: Update to use exec_module() instead of load_module() Anuj Mittal
0 siblings, 1 reply; 2+ messages in thread
From: Anuj Mittal @ 2022-01-25 3:41 UTC (permalink / raw)
To: bitbake-devel
Please review this change for 1.50. Tested on autobuilder and no
problems seen.
Thanks,
Anuj
The following changes since commit 598ea8584f792b30799231c4d3151d40852fc43c:
tests/fetch: Drop gnu urls from wget connectivity test (2021-12-28 12:39:02 +0800)
are available in the Git repository at:
git://push.openembedded.org/bitbake-contrib stable/1.50-next
Richard Purdie (1):
utils: Update to use exec_module() instead of load_module()
lib/bb/utils.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [1.50][PATCH 1/1] utils: Update to use exec_module() instead of load_module()
2022-01-25 3:41 [1.50][PATCH 0/1] Patch review Anuj Mittal
@ 2022-01-25 3:41 ` Anuj Mittal
0 siblings, 0 replies; 2+ messages in thread
From: Anuj Mittal @ 2022-01-25 3:41 UTC (permalink / raw)
To: bitbake-devel
From: Richard Purdie <richard.purdie@linuxfoundation.org>
This is deprecated in python 3.12 and Fedora 35 is throwing warnings so
move to the new functions.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 68a18fbcb5959e334cf307d7fa8dc63832edb942)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
lib/bb/utils.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/bb/utils.py b/lib/bb/utils.py
index 40b5006f..2a150fe9 100644
--- a/lib/bb/utils.py
+++ b/lib/bb/utils.py
@@ -16,7 +16,8 @@ import bb.msg
import multiprocessing
import fcntl
import importlib
-from importlib import machinery
+import importlib.machinery
+import importlib.util
import itertools
import subprocess
import glob
@@ -1620,7 +1621,9 @@ def load_plugins(logger, plugins, pluginpath):
logger.debug('Loading plugin %s' % name)
spec = importlib.machinery.PathFinder.find_spec(name, path=[pluginpath] )
if spec:
- return spec.loader.load_module()
+ mod = importlib.util.module_from_spec(spec)
+ spec.loader.exec_module(mod)
+ return mod
logger.debug('Loading plugins from %s...' % pluginpath)
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-25 3:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-25 3:41 [1.50][PATCH 0/1] Patch review Anuj Mittal
2022-01-25 3:41 ` [1.50][PATCH 1/1] utils: Update to use exec_module() instead of load_module() Anuj Mittal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.