jenkins-bot has submitted this change and it was merged.
Change subject: Re-add featured script to the auto run list ......................................................................
Re-add featured script to the auto run list
It was removed in 38ac044 when featured was moved into scripts/archive.
Also tidy other parts of that commit, including adding a deprecation warning to the featured.py script.
Bug: T128955 Change-Id: I1e373b9229b479227e3df30b51cb20915d1f0c47 --- M scripts/archive/README M scripts/archive/featured.py M tests/script_tests.py M tox.ini 4 files changed, 16 insertions(+), 3 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/archive/README b/scripts/archive/README index 92d5958..1e70cad 100644 --- a/scripts/archive/README +++ b/scripts/archive/README @@ -1 +1,6 @@ -This folder consists scripts that will not maintened but we keep them for historical reasons. +This folder consists scripts that will not be improved, but are kept for +backwards compatibility with a deprecation notice. + +featured.py is no longer compatible with Wikimedia sites, and no other wiki +online could be found that is compatible with this script. +See https://phabricator.wikimedia.org/T128955 for more information. diff --git a/scripts/archive/featured.py b/scripts/archive/featured.py index a29b05f..a6a661f 100755 --- a/scripts/archive/featured.py +++ b/scripts/archive/featured.py @@ -76,6 +76,7 @@
from pywikibot.pagegenerators import PreloadingGenerator from pywikibot.tools.formatter import color_format +from pywikibot.tools import issue_deprecation_warning
if sys.version_info[0] > 2: unichr = chr @@ -620,7 +621,13 @@ @type args: list of unicode """ options = {} - for arg in pywikibot.handle_args(args): + local_args = pywikibot.handle_args(args) + + issue_deprecation_warning( + 'featured.py script', 'Wikibase Client extension', + 0, UserWarning) + + for arg in local_args: if arg.startswith('-fromlang:'): options[arg[1:9]] = arg[10:].split(",") elif arg.startswith('-after:'): diff --git a/tests/script_tests.py b/tests/script_tests.py index c0bb625..4fdd9ec 100644 --- a/tests/script_tests.py +++ b/tests/script_tests.py @@ -122,6 +122,7 @@ 'checkimages', 'clean_sandbox', 'disambredir', + 'featured', 'imagerecat', 'login', 'lonelypages', diff --git a/tox.ini b/tox.ini index b01f51a..b3f567d 100644 --- a/tox.ini +++ b/tox.ini @@ -128,7 +128,7 @@ tests/pwb/ : +T001, T003 scripts/casechecker.py,scripts/imagetransfer.py : +T001, T003 scripts/maintenance/make_i18n_dict.py : +T001, T003 - scripts/archive/ : +D102, D103 + scripts/archive/featured.py : +D102, D103 scripts/script_wui.py : +D102 scripts/makecat.py : +D103 scripts/interwiki.py,/""/ : +P102
pywikibot-commits@lists.wikimedia.org