jenkins-bot has submitted this change and it was merged.
Change subject: move userlib to pywikibot.compat, bugfix for interwiki.py ......................................................................
move userlib to pywikibot.compat, bugfix for interwiki.py
compat folder contains compatibility libraries from compat like query and catlib.userlib is part of page.py and this deprecated library should also placed here.
Change-Id: If697c3e294e3e69fb7224db76742906908cdb7a2 --- M README-conversion.txt R pywikibot/compat/userlib.py M scripts/interwiki.py 3 files changed, 3 insertions(+), 3 deletions(-)
Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified
diff --git a/README-conversion.txt b/README-conversion.txt index f70e7f2..b193c36 100644 --- a/README-conversion.txt +++ b/README-conversion.txt @@ -30,6 +30,7 @@ change "import config" to "from pywikibot import config" change "import catlib" to "from pywikibot.compat import catlib" change "import query" to "from pywikibot.compat import query" + change "import userlib" to "from pywikibot.compat import userlib" change "wikipedia." to "pywikibot."
wikipedia.setAction() no longer works; you must revise the script to pass an diff --git a/pywikibot/userlib.py b/pywikibot/compat/userlib.py similarity index 100% rename from pywikibot/userlib.py rename to pywikibot/compat/userlib.py diff --git a/scripts/interwiki.py b/scripts/interwiki.py index 3edaa55..96f4fe7 100755 --- a/scripts/interwiki.py +++ b/scripts/interwiki.py @@ -1727,7 +1727,7 @@ continue mods, mcomment, adding, removing, modifying \ = compareLanguages(old, new, insite=site) - #cannot create userlib.User with IP + #cannot create pywikibot.User with IP smallWikiAllowed = ( page.isIpEdit() or len(removing) > 0 or @@ -1739,8 +1739,7 @@ ) ) if not smallWikiAllowed: - import userlib - user = userlib.User(page.site, page.userName()) + user = pywikibot.User(page.site, page.userName()) # erstmal auch keine namen mit bot if 'bot' not in user.groups() \ and 'bot' not in page.userName().lower():