jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/462461 )
Change subject: [IMPR] use issue_deprecation_warning for deprecated -autonomous option
......................................................................
[IMPR] use issue_deprecation_warning for deprecated -autonomous option
Change-Id: I356c047c184af72e5f55accee7be2af88fa81497
---
M scripts/nowcommons.py
1 file changed, 6 insertions(+), 5 deletions(-)
Approvals:
D3r1ck01: Looks good to me, approved
Dvorapa: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/scripts/nowcommons.py b/scripts/nowcommons.py
index 3add65c..3e7935b 100755
--- a/scripts/nowcommons.py
+++ b/scripts/nowcommons.py
@@ -59,10 +59,10 @@
import sys
import pywikibot
-
-from pywikibot import i18n, Bot
+from pywikibot import Bot, i18n
+from pywikibot.exceptions import ArgumentDeprecationWarning
from pywikibot import pagegenerators as pg
-from pywikibot.tools import filter_unique
+from pywikibot.tools import filter_unique, issue_deprecation_warning
from pywikibot.tools.formatter import color_format
from scripts.image import ImageRobot as ImageBot
@@ -391,8 +391,9 @@
raise NotImplementedError(
"The '-hash' argument is not implemented anymore.")
elif arg == '-autonomous':
- pywikibot.warning("The '-autonomous' argument is
DEPRECATED,"
- " use '-always' instead.")
+ issue_deprecation_warning('-autonomous', '-always', 2,
+ ArgumentDeprecationWarning,
+ since='20140724')
options['always'] = True
elif arg.startswith('-'):
if arg[1:] in ('always', 'replace', 'replaceloose',
'replaceonly'):
--
To view, visit
https://gerrit.wikimedia.org/r/462461
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I356c047c184af72e5f55accee7be2af88fa81497
Gerrit-Change-Number: 462461
Gerrit-PatchSet: 4
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: D3r1ck01 <alangiderick(a)gmail.com>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: jenkins-bot (75)