Skip to content

Commit

Permalink
bot: properly deprecate search_url_callbacks() method
Browse files Browse the repository at this point in the history
That decorator is the only thing wot *might* actually get people to
notice that they're still using a deprecated feature...
  • Loading branch information
dgw committed Dec 6, 2023
1 parent 120477f commit 4614f59
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sopel/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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``.
Expand Down

0 comments on commit 4614f59

Please sign in to comment.