reddit: extract to external package #2444
Merged
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.
The writing's on the wall: https://old.reddit.com/r/reddit/comments/12qwagm/an_update_regarding_reddits_api/
It's reasonable to guess that these changes to rate-limit enforcement (however vague they might be now) will eventually affect Sopel bots running with the default, shared, OAuth app ID.
A plugin that no longer works (reliably) without the bot owner having to acquire an API key of some kind fails our number-one criterion for inclusion in the base Sopel package. While the reddit plugin hasn't yet reached that point, we are also trying to extract a lot of the built-ins anyway for maintenance reasons.
That transition is much easier to make on our own schedule, right before a major release. And a major release is a doubly great time for this particular change, because we can drop
praw
as a core requirement.Extracted plugin now lives at https://github.com/sopel-irc/sopel-reddit and a version equivalent to what was removed in this PR has been (as of April 21) published to PyPI.
Checklist
make qa
(runsmake quality
andmake test
)Notes
I considered, but ultimately decided against, adding the newly extracted plugin as an installation requirement. We did it for
sopel-help
in #2332, but that's basically still a core plugin; without it, Sopel doesn't come with any interactive help functionality, or even a way to list the available commands.Handling reddit links isn't on the same level as offering help functionality, so I think it's fine to just mention the removal in our changelog & upgrade guide. Getting the
reddit
plugin back—along with any others we've removed that the user wants to keep—will be a matter of one shell command.