jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/633304 )
Change subject: [cleanup] show a FutureWarning for deprecation warnings in
i18n.py
......................................................................
[cleanup] show a FutureWarning for deprecation warnings in i18n.py
show a FutureWarning with 5 years old
issue_deprecation_warning in i18n.py
Change-Id: I3f0018543a549c3dc952eb5da74de78ba12de4d2
---
M pywikibot/i18n.py
1 file changed, 4 insertions(+), 1 deletion(-)
Approvals:
Hazard-SJ: Looks good to me, but someone else must approve
Mpaa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/i18n.py b/pywikibot/i18n.py
index 287a86c..f5df2b2 100644
--- a/pywikibot/i18n.py
+++ b/pywikibot/i18n.py
@@ -464,7 +464,8 @@
issue_deprecation_warning(
'type {0} for value {1} ({2})'
.format(type(num), selector, num),
- 'an int', 1, since='20151009')
+ 'an int', 1,
+ warning_class=FutureWarning, since='20151009')
num = int(num)
plural_entries = []
@@ -619,6 +620,7 @@
if not isinstance(parameters, Mapping):
issue_deprecation_warning('parameters not being a mapping',
+ warning_class=FutureWarning,
since='20151008')
plural_parameters = _PluralMappingAlias(parameters)
else:
@@ -765,6 +767,7 @@
if parameters is not None and not isinstance(parameters, Mapping):
issue_deprecation_warning('parameters not being a Mapping',
+ warning_class=FutureWarning,
since='20151008')
if not only_plural and parameters:
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/633304
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I3f0018543a549c3dc952eb5da74de78ba12de4d2
Gerrit-Change-Number: 633304
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Hazard-SJ <[email protected]>
Gerrit-Reviewer: Isaacandy <[email protected]>
Gerrit-Reviewer: Mpaa <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits