Xqt added a comment.
I could reproduce it as follows:
D:\pwb\GIT\core>pwb basic -simulate -use_redirects -page:User:Xqt
WARNING: D:\pwb\GIT\core\pywikibot\bot.py:1826: FutureWarning:
RedirectPageBot is deprecated since release 7.2.0; use BaseBot attribute
'use_redirects = False' instead.
super().__init__(**kwargs)
WARNING: use_redirects is not a valid option. It was ignored.
The deprecation warning intends no longer use NoRedirectPageBot class but the
`no_redirect` **attribute**; this is not meant as an `-no_redirect` option. An
example how this works can be seen at basic.py
<https://doc.wikimedia.org/pywikibot/master/library_usage.html#basic-script>:
Basic bot is declared as
class BasicBot(
# Refer pywikobot.bot for generic bot classes
SingleSiteBot, # A bot only working on one site
ConfigParserBot, # A bot which reads options from scripts.ini setting
file
# CurrentPageBot, # Sets 'current_page'. Process it in treat_page
method.
# # Not needed here because we have subclasses
ExistingPageBot, # CurrentPageBot which only treats existing pages
AutomaticTWSummaryBot, # Automatically defines summary; needs
summary_key
):
use_redirects = False # treats non-redirects only
The `use_redirects = False` is the important part which ensures that
redirects are skipped.
Anyway there is a remaining issue due to the deprecation warning message
which should be //FutureWarning: **No**RedirectPageBot is deprecated... //
TASK DETAIL
https://phabricator.wikimedia.org/T325912
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt
Cc: Xqt, Aklapper, pywikibot-bugs-list, Shalomori123, PotsdamLamb, Jyoo1011,
JohnsonLee01, SHEKH, Dijkstra, Khutuck, Zkhalido, Viztor, Wenyi, Tbscho, MayS,
Mdupont, JJMC89, Dvorapa, Altostratus, Avicennasis, mys_721tx, jayvdb, Masti,
Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]