Skip to content

[Bug] Can not install all the plugins with python >= 3.12 #13310

@shenxiangzhuang

Description

@shenxiangzhuang

Search before asking

  • I had searched in the issues and found no similar issues.

Apache SkyWalking Component

Python Agent (apache/skywalking-python)

What happened

After the changes in apache/skywalking-python#366 to #13030), we can not install any plugin with python version >= 3.12:

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))

https://github.com/shenxiangzhuang/skywalking-python/blob/6ff93cb4ef815535babe729426a38eda39980194/skywalking/plugins/__init__.py#L59-L62

What you expected to happen

Install plugins normally.

How to reproduce

Start a simple fastapi app with sw-python run, we can find that the fastapi won't be installed.

Anything else

No response

Are you willing to submit a pull request to fix on your own?

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

Metadata

Metadata

Labels

agentLanguage agent related.bugSomething isn't working and you are sure it's a bug!pythonPython agent related

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions