bot, plugins: deprecate bot.{add|remove}_plugin #2636
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
make qa
(runsmake lint
andmake test
)