-
Notifications
You must be signed in to change notification settings - Fork 29
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
Comments
@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. |
@rcritten, yes, I have such a bad habit :-) 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 |
@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. |
@rcritten, could you please clarify the purpose of namespace packages in this project? Is it still needed or can be dropped? |
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. |
The usage of
pkg_resources
(subpackage ofsetuptools
distribution) is discouraged.https://setuptools.pypa.io/en/latest/pkg_resources.html:
ipa healthcheck uses several points of pkg_resources:
pkg_resources.iter_entry_points
to access entry points.migration: https://importlib-metadata.readthedocs.io/en/latest/migration.html#pkg-resources-iter-entry-points
pkg_resources.get_distribution
to access a distribution.migration: https://importlib-metadata.readthedocs.io/en/latest/migration.html#pkg-resources-get-distribution
__import__('pkg_resources').declare_namespace
https://packaging.python.org/en/latest/guides/packaging-namespace-packages/#creating-a-namespace-package
I'm not sure about the purpose of namespace packages here, since the plugin system is build on top of entry points.
Compatibility note:
importlib.metadata
is in stdlib since Python 3.8:https://docs.python.org/3/library/importlib.metadata.html
The text was updated successfully, but these errors were encountered: