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: emit warning when memory['url_callbacks'] is used manually in a plugin's setup #2033

Merged
merged 1 commit into from
Mar 29, 2021

Conversation

Exirel
Copy link
Contributor

@Exirel Exirel commented Mar 1, 2021

Description

Tin. Replace #1809
I had to mark callbacks to prevent raising the same warning more than once.

I accept the trade-off: this won't cover 100% of cases and I'm fine with that. It'll cover the most common one, when it was common to declare URL callbacks in the setup hook because @url didn't work well.

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

@Exirel Exirel added the Tweak label Mar 1, 2021
@Exirel Exirel added this to the 7.1.0 milestone Mar 1, 2021
@Exirel Exirel requested review from dgw and half-duplex March 1, 2021 15:01
Copy link
Member

@half-duplex half-duplex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sound, unless we want to deprecate register_url_callback() too as discussed in IRC.

sopel/bot.py Show resolved Hide resolved
We are deprecating ALL manual management of URL callbacks, and so any
plugins that still do it should generate warnings.

Co-Authored-By: dgw <dgw@technobabbl.es>
Copy link
Member

@dgw dgw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going along with @half-duplex's nitpick, which I'll just apply manually.

sopel/bot.py Show resolved Hide resolved
@dgw dgw force-pushed the bot-warning-url-callbacks branch from d67484c to e221bbc Compare March 29, 2021 21:07
@dgw dgw merged commit 99fae49 into sopel-irc:master Mar 29, 2021
@Exirel Exirel deleted the bot-warning-url-callbacks branch May 1, 2021 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants