jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/933442 )
Change subject: [cleanup] Remove -test option in favour of -simulate ......................................................................
[cleanup] Remove -test option in favour of -simulate
Bug: T336095 Change-Id: I2835b2dfca0771008fe76352a6f4f9d1b1dc7741 --- M scripts/transwikiimport.py 1 file changed, 11 insertions(+), 13 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/transwikiimport.py b/scripts/transwikiimport.py index aa531fe..3c16a09 100755 --- a/scripts/transwikiimport.py +++ b/scripts/transwikiimport.py @@ -143,11 +143,10 @@ # Distributed under the terms of the MIT license. # import pywikibot -from pywikibot import config, pagegenerators +from pywikibot import pagegenerators from pywikibot.backports import Dict from pywikibot.bot import suggest_help from pywikibot.data import api -from pywikibot.tools import issue_deprecation_warning
docuReplacements = {'¶ms;': pagegenerators.parameterHelp} # noqa: N816 @@ -175,7 +174,6 @@ rootpage = '' tags = '' summary = 'Importing page from ' - test = False overwrite = False target = False fullhistory = False @@ -195,8 +193,6 @@ tags = arg[len('-tags:'):] elif arg.startswith('-summary'): summary = arg[len('-summary:'):] - elif arg == '-test': - test = True elif arg == '-overwrite': overwrite = True elif arg == '-target': @@ -303,14 +299,6 @@ continue
params['interwikipage'] = fromtitle - if test: - # -simulate may be given as an int to indicate waiting seconds - if not config.simulate: - config.simulate = True - - # since 8.2.0; no deprecation period - issue_deprecation_warning('-test option', '-simulate') - api_query(tosite, params) pywikibot.info(f'{fromtitle} → {targetpage}')
pywikibot-commits@lists.wikimedia.org