-
-
Notifications
You must be signed in to change notification settings - Fork 407
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
sopel: don't use bot.search_url_callbacks internally #2635
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At a glance from my phone, this looks sane. TIL GitHub only shows the "Viewed" checkbox on files in landscape orientation. :/
Thank you for your service,
register_url_callback
, but I can't wait to remove you and your sister methods!
I was pretty excited about that too… #2436 is biding its time since early last year (but obviously will need a rebase to move out of draft status; I knew the risks going in!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I wish I knew why it took me this long to re-review. 😅
In order to emit warnings, the method Sopel.search_url_callbacks must not be used internally or through a built-in plugin. As a result, and until removal in Sopel 9, both coretasks and url are going to access bot._url_callbacks directly. Also, the method `bot.call` is now deprecated and will be removed in Sopel 9.0, following a short deprecation cycle. This method should have been deprecated since Sopel 8 but was kept in order to keep the old URL callbacks system working. When it is gone, this method won't be needed anymore.
0e3f2bf
to
7e46a77
Compare
I squashed against itself, so let's see if the test suite pass properly before merging. I'm still not sure about that whole "don't rebase on master" thing, it feels wrong to me. 🙃 |
Ah, GitHub runs pull request jobs on the merge result of This one's checks passed and it's now ready to merge when I get back to my PC in a few days (to do the (Edit: No backporting, it's for 8.1. See? Hard to notice all the details on my phone!) |
Description
Both
coretasks
andurl
usedbot.search_url_callbacks
, that was deprecated some time ago and wants to emit warning in Sopel 8.1. Because it was used, we didn't bump Sopel's version to 8.1.0.dev0 yet, and that was annoying.Therefore, I replaced that by a direct access to the private attribute
_url_callbacks
, and then bumped to Sopel 8.1.0.dev0. And by the way, we should be able to removebot.call
in Sopel 9.Thank you for your service,
register_url_callback
, but I can't wait to remove you and your sister methods!Checklist
make qa
(runsmake lint
andmake test
)