Search before asking
Description
We are using pkg_resources in our project:
https://github.com/apache/skywalking-python/blob/f8c5063402dcea354458a23f1f74561b6bea98b6/skywalking/plugins/__init__.py#L23C1-L23C1
https://github.com/apache/skywalking-python/blob/f8c5063402dcea354458a23f1f74561b6bea98b6/tools/grpc_code_gen.py#L21
And the usage of pkg_resources is deprecated with warning(which can be reproduced by run import pkg_resources in REPL) as fellows:
DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
As the doc https://setuptools.pypa.io/en/latest/pkg_resources.html shows:
Use of pkg_resources is deprecated in favor of importlib.resources, importlib.metadata and their backports (importlib_resources, importlib_metadata)
So, I think it's better to do this replacement.
Use case
Replace the usage of pkg_resources to importlib.metadata to remove the warning message
Related issues
No response
Are you willing to submit a pull request to implement this on your own?
Code of Conduct
Search before asking
Description
We are using
pkg_resourcesin our project:https://github.com/apache/skywalking-python/blob/f8c5063402dcea354458a23f1f74561b6bea98b6/skywalking/plugins/__init__.py#L23C1-L23C1
https://github.com/apache/skywalking-python/blob/f8c5063402dcea354458a23f1f74561b6bea98b6/tools/grpc_code_gen.py#L21
And the usage of
pkg_resourcesis deprecated with warning(which can be reproduced by runimport pkg_resourcesin REPL) as fellows:As the doc https://setuptools.pypa.io/en/latest/pkg_resources.html shows:
So, I think it's better to do this replacement.
Use case
Replace the usage of
pkg_resourcestoimportlib.metadatato remove the warning messageRelated issues
No response
Are you willing to submit a pull request to implement this on your own?
Code of Conduct