diff --git a/HISTORY.rst b/HISTORY.rst index c88b72a859..28d94f7b80 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,7 @@ Release history Current release --------------- +* PendingDeprecationWarning: support for py2.6 and py3.3 will be dropped * Bugfixes and improvements * Localisation updates diff --git a/pwb.py b/pwb.py index 2f495ce0fd..9454d0885c 100755 --- a/pwb.py +++ b/pwb.py @@ -32,12 +32,13 @@ PYTHON_VERSION = sys.version_info[:3] PY2 = (PYTHON_VERSION[0] == 2) PY26 = (PYTHON_VERSION < (2, 7)) +SUPPORT = 'supported under Python 2.7.2+ or 3.4+' versions_required_message = """ Pywikibot not available on: -%s +{version} -Pywikibot is only supported under Python 2.6.5+, 2.7.2+ or 3.3+ +Pywikibot is only {supported}. """ @@ -50,7 +51,8 @@ def python_is_supported(): if not python_is_supported(): - print(versions_required_message % sys.version) + print(versions_required_message.format(version=sys.version, + supported=SUPPORT)) sys.exit(1) pwb = None @@ -200,6 +202,12 @@ def abspath(path): def main(): """Command line entry point.""" + if PY2 or not PY2 and PYTHON_VERSION < (3, 4): + warn('\nPywikibot support for Python release {version} will be ' + 'dropped soon.\nPywikibot will be {supported} further.\n' + .format(version=sys.version, supported=SUPPORT), + PendingDeprecationWarning ) + global filename if filename: file_package = None