jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/462138 )
Change subject: Use FutureWarning for warnings intended for end users ......................................................................
Use FutureWarning for warnings intended for end users
- this could replace some important deprecation warnings which aren't shown by default - show FutureWarnings only once - as first FutureWarning use dropping warning fpr Python 2.7.2/3
Bug: T191192 Change-Id: I79a375e9bc8754a79cd68b04c48353f74cd3f90d --- M pywikibot/__init__.py M pywikibot/bot.py 2 files changed, 2 insertions(+), 1 deletion(-)
Approvals: Framawiki: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py index 76fa14c..c9230c0 100644 --- a/pywikibot/__init__.py +++ b/pywikibot/__init__.py @@ -137,7 +137,7 @@ warn( 'Pywikibot will soon drop support for Python 2.7.2 and 2.7.3, ' 'please update your Python.', - DeprecationWarning, + FutureWarning, )
diff --git a/pywikibot/bot.py b/pywikibot/bot.py index 9721ded..4c4d95b 100644 --- a/pywikibot/bot.py +++ b/pywikibot/bot.py @@ -312,6 +312,7 @@ warnings.filterwarnings("always") elif config.verbose_output: warnings.filterwarnings("module") + warnings.filterwarnings('once', category=FutureWarning)
root_logger.handlers = [] # remove any old handlers
pywikibot-commits@lists.wikimedia.org