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

managers, meta: migrate off of pkg_resources to importlib_metadata #12

Merged
merged 1 commit into from
Oct 20, 2024

Conversation

dgw
Copy link
Member

@dgw dgw commented Oct 19, 2024

This fixes installing sopel (which depends on this package) from scratch on a new environment that does not ship with pkg_resources as part of the Python stdlib (py3.12+) and also omits setuptools (some distros, fresh venvs, probably others).

Also includes slight cleanup of comments, log messages, and imports, but I think not enough to be worth a separate commit or pull request.

Progresses #11, but not all the way to completion (it asks for importlib.metadata, which we can't use for this purpose in its stdlib flavor until Python 3.10 is the minimum version required).

@dgw
Copy link
Member Author

dgw commented Oct 19, 2024

************* Module sopel_help.managers
sopel_help/managers.py:3:1: W0511: TODO: use stdlib importlib.metadata when possible, after dropping py3.9. (fixme)

pylint doesn't allow the TODO comment, but I think it's important to include the context and future steps. What would you like me to write there instead?

************* Module sopel_help.providers
sopel_help/providers.py:123:4: R0917: Too many positional arguments (7/5) (too-many-positional-arguments)

I didn't touch this, though I think it's a "warning" and not an error.

This fixes installing `sopel` (which depends on this package) from
scratch on a new environment that does not ship with `pkg_resources` as
part of the Python stdlib (py3.12+) and also omits `setuptools` (some
distros, fresh venvs, probably others).

Includes slight cleanup of comments, log messages, and imports, but I
think not enough to be worth a separate commit or pull request.
@Exirel
Copy link
Collaborator

Exirel commented Oct 19, 2024

@dgw You should be able to rebase on master now and that would fix all the issues with the CI.

@dgw
Copy link
Member Author

dgw commented Oct 20, 2024

Hurrah! Passes CI now.

@Exirel Exirel added this to the 0.5.2 milestone Oct 20, 2024
@Exirel Exirel merged commit 67954a3 into master Oct 20, 2024
3 checks passed
@dgw dgw deleted the rm-pkg_resources branch October 20, 2024 18:03
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