Skip to content

Commit 8e3a535

Browse files
author
Henrique Brito
committed
fix: python import module incompatibility
1 parent 320ef70 commit 8e3a535

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ gen-basic:
6363
.PHONY: install
6464
install: gen-basic
6565
python3 -m pip install --upgrade pip
66-
python3 -m pip install .[all]
66+
python3 -m pip install -e .[all]
6767

6868
.PHONY: lint
6969
# flake8 configurations should go to the file setup.cfg

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ sw-python = 'skywalking.bootstrap.cli.sw_python:start'
6969

7070

7171
[tool.poetry.dependencies]
72-
python = ">=3.8, <3.12"
72+
python = ">=3.8, <=3.13"
7373
grpcio = '*'
7474
grpcio-tools = '*'
7575
packaging = '*'

skywalking/plugins/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ def install():
5656
logger.info("plugin %s is disabled and thus won't be installed", modname)
5757
continue
5858
logger.debug('installing plugin %s', modname)
59-
plugin = importer.find_module(modname).load_module(modname)
59+
if sys.version_info < (3, 12):
60+
plugin = importer.find_module(modname).load_module(modname)
61+
else:
62+
plugin = importlib.util.module_from_spec(importer.find_spec(modname))
6063

6164
# todo: refactor the version checker, currently it doesn't really work as intended
6265
supported = pkg_version_check(plugin)

0 commit comments

Comments
 (0)