jenkins-bot submitted this change.
[IMPR] Rewrite pywikibot scripts to support Python 3.5+ only
Bug: T257399
Change-Id: Ib855930136bc8a5e09444fee182725f39c604450
---
M tests/data/fixes.py
M tests/data/set-fixes.py
M tests/i18n/pywikibot.py
M tests/pwb/print_env.py
M tests/pwb/print_locals.py
M tests/pwb/print_unicode.py
M tests/template_bot_tests.py
7 files changed, 6 insertions(+), 20 deletions(-)
diff --git a/tests/data/fixes.py b/tests/data/fixes.py
index 3f04424..b69c00c 100644
--- a/tests/data/fixes.py
+++ b/tests/data/fixes.py
@@ -1,12 +1,10 @@
# -*- coding: utf-8 -*-
"""Collection of fixes for tests."""
#
-# (C) Pywikibot team, 2015-2018
+# (C) Pywikibot team, 2015-2020
#
# Distributed under the terms of the MIT license.
#
-from __future__ import absolute_import, division, unicode_literals
-
# flake8 cannot detect that fixes is defined via pywikibot.fixes
if 'fixes' not in globals():
fixes = {}
diff --git a/tests/data/set-fixes.py b/tests/data/set-fixes.py
index 3911506..f626b7c 100644
--- a/tests/data/set-fixes.py
+++ b/tests/data/set-fixes.py
@@ -1,11 +1,9 @@
# -*- coding: utf-8 -*-
"""Fixes implementation which overwrites the variable."""
#
-# (C) Pywikibot team, 2015-2018
+# (C) Pywikibot team, 2015-2020
#
# Distributed under the terms of the MIT license.
#
-from __future__ import absolute_import, division, unicode_literals
-
# Just kill the old value suffices
fixes = {}
diff --git a/tests/i18n/pywikibot.py b/tests/i18n/pywikibot.py
index 5261a7f..fb48092 100644
--- a/tests/i18n/pywikibot.py
+++ b/tests/i18n/pywikibot.py
@@ -1,10 +1,8 @@
# -*- coding: utf-8 -*-
"""i18n message bundle called 'pywikibot' to fool the i18n loader."""
#
-# (C) Pywikibot team, 2014-2018
+# (C) Pywikibot team, 2014-2020
#
# Distributed under the terms of the MIT license.
#
-from __future__ import absolute_import, division, unicode_literals
-
msg = {}
diff --git a/tests/pwb/print_env.py b/tests/pwb/print_env.py
index 6f4d4c7..48c660c 100644
--- a/tests/pwb/print_env.py
+++ b/tests/pwb/print_env.py
@@ -2,12 +2,10 @@
# -*- coding: utf-8 -*-
"""Script that forms part of pwb_tests."""
#
-# (C) Pywikibot team, 2015-2018
+# (C) Pywikibot team, 2015-2020
#
# Distributed under the terms of the MIT license.
#
-from __future__ import absolute_import, division, unicode_literals
-
import os
import sys
diff --git a/tests/pwb/print_locals.py b/tests/pwb/print_locals.py
index 5b6b2df..c1f27e3 100644
--- a/tests/pwb/print_locals.py
+++ b/tests/pwb/print_locals.py
@@ -2,12 +2,10 @@
# -*- coding: utf-8 -*-
"""Script that forms part of pwb_tests."""
#
-# (C) Pywikibot team, 2013-2018
+# (C) Pywikibot team, 2013-2020
#
# Distributed under the terms of the MIT license.
#
-from __future__ import absolute_import, division, unicode_literals
-
import os.path
if __name__ == '__main__':
diff --git a/tests/pwb/print_unicode.py b/tests/pwb/print_unicode.py
index cacccbc..2f55325 100644
--- a/tests/pwb/print_unicode.py
+++ b/tests/pwb/print_unicode.py
@@ -2,12 +2,10 @@
# -*- coding: utf-8 -*-
"""Script that forms part of pwb_tests."""
#
-# (C) Pywikibot team, 2018
+# (C) Pywikibot team, 2020
#
# Distributed under the terms of the MIT license.
#
-from __future__ import absolute_import, division, unicode_literals
-
import pywikibot
if __name__ == '__main__':
diff --git a/tests/template_bot_tests.py b/tests/template_bot_tests.py
index d978eed..10a0f0f 100644
--- a/tests/template_bot_tests.py
+++ b/tests/template_bot_tests.py
@@ -5,8 +5,6 @@
#
# Distributed under the terms of the MIT license.
#
-from __future__ import absolute_import, division, unicode_literals
-
import pywikibot
from pywikibot.pagegenerators import XMLDumpPageGenerator
To view, visit change 640363. To unsubscribe, or for help writing mail filters, visit settings.