From 4614f59ad9d3f1289a9ca8189c294ffe860fbf59 Mon Sep 17 00:00:00 2001 From: dgw Date: Wed, 6 Dec 2023 01:05:45 -0600 Subject: [PATCH] bot: properly deprecate `search_url_callbacks()` method That decorator is the only thing wot *might* actually get people to notice that they're still using a deprecated feature... --- sopel/bot.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sopel/bot.py b/sopel/bot.py index 11b5c25c2..cc908f247 100644 --- a/sopel/bot.py +++ b/sopel/bot.py @@ -1221,6 +1221,14 @@ def unregister_url_callback(self, pattern, callback): except KeyError: pass + @deprecated( + reason=( + 'URL handling has been unified in the Rules system via the @url ' + 'decorator. Use RuleManager.check_url_callbacks() if needed.'), + version='8.0', + warning_in='8.1', + removed_in='9.0', + ) def search_url_callbacks(self, url): """Yield callbacks whose regex pattern matches the ``url``.