jenkins-bot submitted this change.

View Change

Approvals: Hazard-SJ: Looks good to me, but someone else must approve Mpaa: Looks good to me, approved jenkins-bot: Verified
[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(-)

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 change 633304. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I3f0018543a549c3dc952eb5da74de78ba12de4d2
Gerrit-Change-Number: 633304
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Hazard-SJ <hazardsjwiki@gmail.com>
Gerrit-Reviewer: Isaacandy <isaac@iznd.xyz>
Gerrit-Reviewer: Mpaa <mpaa.wiki@gmail.com>
Gerrit-Reviewer: Siebrand <siebrand@kitano.nl>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged