jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] Don't use deprecated parameter of redirect()
......................................................................
[FIX] Don't use deprecated parameter of redirect()
With 7aa43ba4a0c8e12bda4a62e32e062672ec8851fa the default parameter from
compat was deprecated. Because the decorator only supports deprecating
keyword arguments, all calls which add the default parameter via a
positional argument will fail.
This removes all usages of the default parameter in the code base.
Because only redirect() was used, only those method calls were fixed.
Bug: 73489
Change-Id: Ie91063b48a599b737d67a624d79532daecd23dc6
---
M scripts/redirect.py
M scripts/solve_disambiguation.py
2 files changed, 2 insertions(+), 2 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/redirect.py b/scripts/redirect.py
index 5524483..c39a931 100755
--- a/scripts/redirect.py
+++ b/scripts/redirect.py
@@ -662,7 +662,7 @@
targetlink = targetPage.title(asLink=True, textlink=True)
text = self.site.redirectRegex().sub(
- '#%s %s' % (self.site.redirect(True),
+ '#%s %s' % (self.site.redirect(),
targetlink),
oldText, 1)
if redir.title() == targetPage.title() or text == oldText:
diff --git a/scripts/solve_disambiguation.py b/scripts/solve_disambiguation.py
index b32e0ef..e29b618 100644
--- a/scripts/solve_disambiguation.py
+++ b/scripts/solve_disambiguation.py
@@ -574,7 +574,7 @@
'to %s?' % (refPage.title(), target),
default=False, automatic_quit=False):
redir_text = '#%s [[%s]]' \
- % (self.mysite.redirect(default=True), target)
+ % (self.mysite.redirect(), target)
try:
refPage.put_async(redir_text, comment=self.comment)
except pywikibot.PageNotSaved as error:
--
To view, visit
https://gerrit.wikimedia.org/r/173659
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie91063b48a599b737d67a624d79532daecd23dc6
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot <>