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

Migrate from pkg_resources #273

Open
stanislavlevin opened this issue Jun 27, 2022 · 5 comments
Open

Migrate from pkg_resources #273

stanislavlevin opened this issue Jun 27, 2022 · 5 comments

Comments

@stanislavlevin
Copy link
Contributor

The usage of pkg_resources (subpackage of setuptools distribution) is discouraged.

https://setuptools.pypa.io/en/latest/pkg_resources.html:

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.

ipa healthcheck uses several points of pkg_resources:

Compatibility note: importlib.metadata is in stdlib since Python 3.8:
https://docs.python.org/3/library/importlib.metadata.html

@rcritten
Copy link
Collaborator

@stanislavlevin are you going to work on this or just reporting the issue? I ask because sometimes you file an issue and an hour later drop a huge patch :-)

healthcheck is still used on some older python versions, 3.6.8, in RHEL 8. So this may be a reason to do the first branch.

@stanislavlevin
Copy link
Contributor Author

@rcritten, yes, I have such a bad habit :-)
But this maybe the breaking change, that's why I asked first.

So, if you say ipa-healthcheck must support Python 3.6.8 this issue maybe postponed to the Python3.8 times or as an alternative solution the external importlib_metadata package can be used as a fallback.

@rcritten
Copy link
Collaborator

@stanislavlevin I think it's a good idea to keep up with current standards. It just might make backports a bit more tricky. I'll be supporting RHEL 8 for another few years but I don't want that to stop progress.

So I think it's worth looking into and we'll see what ramifications there are. Thanks for bringing this up.

@stanislavlevin
Copy link
Contributor Author

@rcritten, could you please clarify the purpose of namespace packages in this project? Is it still needed or can be dropped?

@rcritten
Copy link
Collaborator

It is to support the cluster checking as a separate namespace. The intention was to share the healthcheck core but keep the cluster plugins separate. The cluster checking never really went anywhere and was de-prioritized. I'm not sure if that work is going to pick up again but the idea was to check things that could only be done when examining the entire IPA topology.

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

No branches or pull requests

2 participants