jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/423461 )

Change subject: Deprecation warning; python 2.7.2 and 2.7.3 will be dropped
......................................................................

Deprecation warning; python 2.7.2 and 2.7.3 will be dropped

Bug: T191192
Change-Id: I82ffb279f10e4388c8a6094477ab35fc88993e06
---
M HISTORY.rst
M pywikibot/__init__.py
M tests/utils.py
3 files changed, 13 insertions(+), 1 deletion(-)

Approvals:
  Dalba: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/HISTORY.rst b/HISTORY.rst
index 3c7d1e2..525006e 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -3,7 +3,7 @@

 Current release
 ---------------
-
+* Deprecation warning: support for py2.7.2 and py2.7.3 will be dropped
 * Dropped support for Python 2.6 (T154771)
 * Dropped support for Python 3.3 (T184508)
 * Bugfixes and improvements
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index cd3e18c..0d612f3 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -135,6 +135,14 @@
 deprecate_arg = redirect_func(_deprecate_arg)


+if sys.version_info[:2] == (2, 7) and sys.version_info[2] in (2, 3):
+    warn(
+        'Pywikibot will soon drop support for Python 2.7.2 and 2.7.3, '
+        'please update your Python.',
+        DeprecationWarning,
+    )
+
+
 class Timestamp(datetime.datetime):

     """Class for handling MediaWiki timestamps.
diff --git a/tests/utils.py b/tests/utils.py
index 2f7837a..8178427 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -638,6 +638,10 @@
     @param command: executable to run and arguments to use
     @type command: list of unicode
     """
+    if PYTHON_VERSION[:2] == (2, 7) and PYTHON_VERSION[2] in (2, 3):
+        command.insert(1, '-W ignore:{0}:DeprecationWarning'.format(
+            'Pywikibot will soon drop support for Python 2.7.2 and 2.7.3, '
+            'please update your Python.'))
     # Any environment variables added on Windows must be of type
     # str() on Python 2.
     env = os.environ.copy()

--
To view, visit https://gerrit.wikimedia.org/r/423461
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I82ffb279f10e4388c8a6094477ab35fc88993e06
Gerrit-Change-Number: 423461
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Dalba <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Zoranzoki21 <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to