jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[cleanup] Remove deprecated availableOptions

Change-Id: I1e90512bc762865ae32735df424b025f8d9e62a6
---
M pywikibot/bot.py
1 file changed, 0 insertions(+), 16 deletions(-)

diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index 3197e60..903ff4b 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -178,7 +178,6 @@
issue_deprecation_warning,
redirect_func,
remove_last_args,
- suppress_warnings,
)
from pywikibot.tools._logging import LoggingFormatter
from pywikibot.tools.formatter import color_format
@@ -1193,12 +1192,6 @@
"""
self.set_options(**kwargs)

- @property # type: ignore[misc]
- @deprecated('available_options', since='20201006')
- def availableOptions(self) -> Dict[str, Any]:
- """DEPRECATED. Options that are available."""
- return self.available_options
-
@deprecated('set_options', since='20201006')
def setOptions(self, **options: Any) -> None: # pragma: no cover
"""DEPRECATED. Set the instance options."""
@@ -1206,15 +1199,6 @@

def set_options(self, **options: Any) -> None:
"""Set the instance options."""
- warning = 'pywikibot.bot.OptionHandler.availableOptions'
- with suppress_warnings(warning.replace('.', r'\.') + ' is deprecated',
- 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')
-
valid_options = set(self.available_options)
received_options = set(options)


To view, visit change 721988. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I1e90512bc762865ae32735df424b025f8d9e62a6
Gerrit-Change-Number: 721988
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged