Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use importlib.resources instead of pkg_resources #235

Merged
merged 2 commits into from
Aug 5, 2022

Conversation

S4mw1s3
Copy link
Contributor

@S4mw1s3 S4mw1s3 commented Aug 2, 2022

This also removes the runtime dependency to setuptools.

From the setuptools website [1]:

Use of pkg_resources is discouraged in favor of importlib.resources,
importlib.metadata, and their backports (importlib_resources,
importlib_metadata). Please consider using those libraries instead of
pkg_resources.

[1]: https://setuptools.pypa.io/en/latest/pkg_resources.html

Signed-off-by: Sam Van Den Berge <[email protected]>
@bcb
Copy link
Member

bcb commented Aug 4, 2022

Thanks, i will merge this after fixing the CI issue, which I think is unrelated to your PR.

@bcb bcb merged commit f0eb6b1 into explodinglabs:main Aug 5, 2022
@bcb
Copy link
Member

bcb commented Aug 5, 2022

Merged thanks @S4mw1s3

kraj pushed a commit to YoeDistro/meta-openembedded that referenced this pull request Aug 6, 2022
…f pkg_resources

Currently jsonrpcserver has a runtime dependency to setuptools because
it uses pkg_resources. Setuptools however is not listed in the RDEPENDS
of python3-jsonrpcserver. We could add setuptools to RDEPENDS but since
pkg_resources is discouraged anyway [1], I posted a patch upstream to
replace pkg_resources by importlib.resources.

Until the upstream patch is accepted and released, add it here as a
patch so python3-jsonrpcserver is usable without the setuptools
dependency.

Upstream-Status: Submitted [explodinglabs/jsonrpcserver#235]
Signed-off-by: Sam Van Den Berge <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
daregit pushed a commit to daregit/yocto-combined that referenced this pull request May 22, 2024
…ib.resources instead of pkg_resources

Currently jsonrpcserver has a runtime dependency to setuptools because
it uses pkg_resources. Setuptools however is not listed in the RDEPENDS
of python3-jsonrpcserver. We could add setuptools to RDEPENDS but since
pkg_resources is discouraged anyway [1], I posted a patch upstream to
replace pkg_resources by importlib.resources.

Until the upstream patch is accepted and released, add it here as a
patch so python3-jsonrpcserver is usable without the setuptools
dependency.

Upstream-Status: Submitted [explodinglabs/jsonrpcserver#235]
Signed-off-by: Sam Van Den Berge <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
daregit pushed a commit to daregit/yocto-combined that referenced this pull request May 22, 2024
…ib.resources instead of pkg_resources

Currently jsonrpcserver has a runtime dependency to setuptools because
it uses pkg_resources. Setuptools however is not listed in the RDEPENDS
of python3-jsonrpcserver. We could add setuptools to RDEPENDS but since
pkg_resources is discouraged anyway [1], I posted a patch upstream to
replace pkg_resources by importlib.resources.

Until the upstream patch is accepted and released, add it here as a
patch so python3-jsonrpcserver is usable without the setuptools
dependency.

Upstream-Status: Submitted [explodinglabs/jsonrpcserver#235]
Signed-off-by: Sam Van Den Berge <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants