Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Release history
Current release
---------------

* PendingDeprecationWarning: support for py2.6 and py3.3 will be dropped
* Bugfixes and improvements
* Localisation updates

Expand Down
14 changes: 11 additions & 3 deletions pwb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}.
"""


Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down