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: remove bot.memory['url_callbacks'] and use internal state #2121

Merged
merged 3 commits into from
Jul 4, 2021

Conversation

dgw
Copy link
Member

@dgw dgw commented Jun 27, 2021

Description

Plugins doing this will receive warnings through the entire remaining lifetime of 7.x (at least several months, perhaps up to a year-ish), and it's high time to push plugin devs away from using anything but the plugin.url and plugin.url_lazy decorators.

As pointed out in a comment below, also deprecates bot.search_url_callbacks() (which should have been deprecated along with its register/unregister siblings).

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 quality and make test)
  • I have tested the functionality of the things this change touches
    • Or rather, we have already tested that the functionality replacing it works as intended.

Notes

Sopel 9.0 will drop the (un)register_url_callback functions, finally ending the era of plugins manually managing their own URL callbacks. That will feel almost as good as dumping Python 2. 😁

This could have been one commit, and I didn't test the intermediate state. Initially I was only going to remove the stuff that said it could be removed in 8.0, then remembered that there was more to that story.

dgw added 2 commits June 27, 2021 17:36
Plugins doing this will receive warnings through the entire remaining
lifetime of 7.x (at least several months, perhaps up to a year or two),
and it's high time to push plugin devs away from using anything but the
`plugin.url` and `plugin.url_lazy` decorators.

Sopel 9.0 will drop the `(un)register_url_callback` functions, finally
ending the era of plugins manually managing their own URL callbacks.
Removed test checking that manually registered callbacks still work, and
replaced it with one that makes sure they do NOT work any more.
@dgw dgw added Medium Priority Tweak Breaking Change Stuff that probably should be mentioned in a migration guide labels Jun 27, 2021
@dgw dgw added this to the 8.0.0 milestone Jun 27, 2021
@dgw dgw requested a review from a team June 27, 2021 23:11
Missed the boat on being deprecated in 7.1, and semver principles say it
will have to wait until 8.0 for "official" deprecation.

It's fine. Nobody uses this stuff anyway. There's no reason to.
@dgw dgw requested a review from Exirel June 28, 2021 16:03
@dgw dgw merged commit 5737ad3 into master Jul 4, 2021
@dgw dgw deleted the remove-manual-url_callbacks branch July 4, 2021 23:28
@dgw
Copy link
Member Author

dgw commented Jul 18, 2021

Note: 3986227 had unwanted side effects: some parts of core still use it, making the deprecation warning spammy. See #2156.

@SnoopJ SnoopJ changed the title bot: remove bot.memory['url_callbacks] and use internal state bot: remove bot.memory['url_callbacks'] and use internal state Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking Change Stuff that probably should be mentioned in a migration guide Medium Priority Tweak
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants