jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/692928 )
Change subject: [cleanup] Suppress FutureWarning when deprecating availableOptions
......................................................................
[cleanup] Suppress FutureWarning when deprecating availableOptions
Change-Id: I28c072ea9205db8ab47152ba37b1e2d8725fb223
---
M pywikibot/bot.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index 711525a..94cc473 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -1112,12 +1112,12 @@
"""Set the instance options."""
warning = 'pywikibot.bot.OptionHandler.availableOptions'
with suppress_warnings(warning.replace('.', r'\.') + ' is
deprecated',
- category=DeprecationWarning):
+ category=FutureWarning):
old_options = self.availableOptions is not self.available_options
if old_options: # old options were set and not updated
self.available_options = self.availableOptions
issue_deprecation_warning(warning, 'available_options',
- since='20201006')
+ since='20201006', future_warning=True)
valid_options = set(self.available_options)
received_options = set(options)
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/692928
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I28c072ea9205db8ab47152ba37b1e2d8725fb223
Gerrit-Change-Number: 692928
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged