You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2025/06/11 12:42:47 UTC
(skywalking-python) branch master updated: fix(plugin): add exec_module to execute to module code (#377)
This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-python.git
The following commit(s) were added to refs/heads/master by this push:
new 99434d4 fix(plugin): add exec_module to execute to module code (#377)
99434d4 is described below
commit 99434d4bb305de4a98a96b11c5bad2f7df6df8c9
Author: Mathew Shen <da...@gmail.com>
AuthorDate: Wed Jun 11 20:42:43 2025 +0800
fix(plugin): add exec_module to execute to module code (#377)
---
skywalking/plugins/__init__.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/skywalking/plugins/__init__.py b/skywalking/plugins/__init__.py
index ead7a83..6801966 100644
--- a/skywalking/plugins/__init__.py
+++ b/skywalking/plugins/__init__.py
@@ -59,7 +59,9 @@ def install():
if sys.version_info < (3, 12):
plugin = importer.find_module(modname).load_module(modname)
else:
- plugin = importlib.util.module_from_spec(importer.find_spec(modname))
+ spec = importer.find_spec(modname)
+ plugin = importlib.util.module_from_spec(spec)
+ spec.loader.exec_module(plugin)
# todo: refactor the version checker, currently it doesn't really work as intended
supported = pkg_version_check(plugin)