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

bot, plugins: deprecate bot.{add|remove}_plugin #2636

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Exirel
Copy link
Contributor

@Exirel Exirel commented Oct 19, 2024

Description

Related to #2425 (first two tasks).

Both methods to add/remove plugins rely on values direct from loader.clean_module, which is inconvenient at time. In order to rework smoothly this interface, these methods are now deprecated and they will be removed in Sopel 9.0.

We still need methods to record the plugin handler to the plugin name in bot.plugins, but they don't do more than that. Everything else is now directly handled and controlled by the plugin handler.

For good measure, I've fully type check sopel.plugins.handlers. This will create merge conflict with #2634 and I'm sorry about that, yet it was too good an opportunity to miss it.

Checklist

  • I have read CONTRIBUTING.md
  • I can and do license this contribution under the EFLv2
  • No issues are reported by make qa (runs make lint and make test)
  • I have tested the functionality of the things this change touches

Both methods to add/remove plugins rely on values direct from
`loader.clean_module`, which is inconvenient at time. In order to rework
smoothly this interface, these methods are now deprecated and they will
be removed in Sopel 9.0.

We still need methods to record the plugin handler to the plugin name in
`bot.plugins`, but they don't do more than that. Everything else is now
directly handled and controlled by the plugin handler.

For good measure, I've fully type check `sopel.plugins.handlers`.
@Exirel Exirel added Housekeeping Code cleanup, removal of deprecated stuff, etc. Core/Plugin Handling labels Oct 19, 2024
@Exirel Exirel added this to the 8.1.0 milestone Oct 19, 2024
@Exirel Exirel requested a review from dgw October 19, 2024 17:56
@Exirel Exirel linked an issue Oct 21, 2024 that may be closed by this pull request
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core/Plugin Handling Housekeeping Code cleanup, removal of deprecated stuff, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Direct call to bot.register_* methods by plugin handler
1 participant