jenkins-bot has submitted this change and it was merged.
Change subject: convert page.get(get_redirect=True) to page.text, ......................................................................
convert page.get(get_redirect=True) to page.text,
anchor for site.encoding()
Change-Id: Iffa5784ab5277e1064cad82b267a35ca0db5aa7c --- M scripts/maintenance/compat2core.py 1 file changed, 3 insertions(+), 1 deletion(-)
Approvals: John Vandenberg: Looks good to me, but someone else must approve Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/maintenance/compat2core.py b/scripts/maintenance/compat2core.py index a6a0c0c..cad299f 100644 --- a/scripts/maintenance/compat2core.py +++ b/scripts/maintenance/compat2core.py @@ -71,7 +71,9 @@ ('.sectionFreeTitle\s*(\s*)', '.title(withSection=False)'), ('.aslink\s*(\s*)', '.title(asLink=True)'), # other deprecated methods - ('.encoding\s*(\s*)', '.site.encoding()'), + ('(?<!site).encoding\s*(\s*)', '.site.encoding()'), + # new core methods + ('.get\s*(\s*get_redirect\s*=\s*True\s*)', '.text'), # stopme() is doen by the framework itself ('(\s*)try:\s*\r?\n\s+main()\s*\r?\n\s*finally:\s*\r?\n\s+pywikibot.stopme()', r'\1main()'),