jenkins-bot merged this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
Drop support for Python 3.3

Bug: T184508
Change-Id: I61c94c4324b717e6b6b9ed95278714752e4d6888
---
M .appveyor.yml
M .travis.yml
M HISTORY.rst
M dev-requirements.txt
M docs/index.rst
M pwb.py
M pywikibot/README.rst
M pywikibot/__init__.py
M pywikibot/tools/__init__.py
M requests-requirements.txt
M requirements.txt
M setup.py
M tests/utils.py
13 files changed, 20 insertions(+), 59 deletions(-)

diff --git a/.appveyor.yml b/.appveyor.yml
index 2224a15..87a3ef6 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -30,20 +30,12 @@
PYTHON_VERSION: "2.7.2"
PYTHON_ARCH: "32"

- - PYTHON: "C:\\Python330"
- PYTHON_VERSION: "3.3.0"
- PYTHON_ARCH: "32"
-
- PYTHON: "C:\\Python340"
PYTHON_VERSION: "3.4.0"
PYTHON_ARCH: "32"

- PYTHON: "C:\\Python272-x64"
PYTHON_VERSION: "2.7.2"
- PYTHON_ARCH: "64"
-
- - PYTHON: "C:\\Python330-x64"
- PYTHON_VERSION: "3.3.0"
PYTHON_ARCH: "64"

- PYTHON: "C:\\Python340-x64"
@@ -54,10 +46,6 @@

- PYTHON: "C:\\Python27"
PYTHON_VERSION: "2.7.x"
- PYTHON_ARCH: "32"
-
- - PYTHON: "C:\\Python33"
- PYTHON_VERSION: "3.3.x"
PYTHON_ARCH: "32"

- PYTHON: "C:\\Python34"
@@ -74,10 +62,6 @@

- PYTHON: "C:\\Python27-x64"
PYTHON_VERSION: "2.7.x"
- PYTHON_ARCH: "64"
-
- - PYTHON: "C:\\Python33-x64"
- PYTHON_VERSION: "3.3.x"
PYTHON_ARCH: "64"

- PYTHON: "C:\\Python34-x64"
diff --git a/.travis.yml b/.travis.yml
index 89d281a..044670e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,7 +7,6 @@
python:
- '2.6'
- '2.7'
- - '3.3'
- '3.4'
- '3.5'
- '3.6'
@@ -146,13 +145,13 @@
# Disabled due to T173498
#- python: '2.7'
# env: LANGUAGE=en FAMILY=wpbeta SITE_ONLY=1 OAUTH_DOMAIN="en.wikipedia.beta.wmflabs.org"
- #- python: '3.3'
+ #- python: '3.6'
# env: LANGUAGE=zh FAMILY=wpbeta SITE_ONLY=1 OAUTH_DOMAIN="zh.wikipedia.beta.wmflabs.org"
- python: '3.4'
env: LANGUAGE=en FAMILY=wsbeta SITE_ONLY=1
- python: '2.7'
env: LANGUAGE=wikia FAMILY=wikia PYWIKIBOT2_TEST_NO_RC=1
- - python: '3.3'
+ - python: '3.5'
env: LANGUAGE=en FAMILY=musicbrainz SITE_ONLY=1
# Disabled due to T173498
#- python: '3.4'
diff --git a/HISTORY.rst b/HISTORY.rst
index d03abac..d989c25 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -4,6 +4,7 @@
Current release
---------------

+* Dropped support for Python 3.3 (T184508)
* Bugfixes and improvements
* Localisation updates

diff --git a/dev-requirements.txt b/dev-requirements.txt
index 7bc6482..5084cdf 100644
--- a/dev-requirements.txt
+++ b/dev-requirements.txt
@@ -4,8 +4,7 @@

pytest>=2.8.0
pytest-timeout
-pytest-runner<=3.0 ; python_version == '3.3'
-pytest-runner ; python_version != '3.3'
+pytest-runner
pytest-cov
pytest-attrib
pytest-httpbin
diff --git a/docs/index.rst b/docs/index.rst
index 4e60261..91c773c 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -13,7 +13,7 @@

Pywikibot is a Python library and collection of scripts that automate work on `MediaWiki <https://mediawiki.org>`_ sites.

-Pywikibot supports Python 2.6.5+, 2.7.2+ and 3.3+.
+Pywikibot supports Python 2.6.5+, 2.7.2+ and 3.4+.

Pywikibot and this documentation are licensed under the :ref:`MIT license <licenses-MIT>`;
manual pages on mediawiki.org are licensed under the `CC-BY-SA 3.0`_ license.
diff --git a/pwb.py b/pwb.py
index 082e353..aed8514 100755
--- a/pwb.py
+++ b/pwb.py
@@ -36,14 +36,14 @@
Pywikibot is not available on:
{version}

-This version of Pywikibot only supports Python 2.6.5+, 2.7.2+ or 3.3+.
+This version of Pywikibot only supports Python 2.6.5+, 2.7.2+ or 3.4+.
"""


def python_is_supported():
"""Check that Python is supported."""
# Any change to this must be copied to setup.py
- return (PYTHON_VERSION >= (3, 3, 0) or
+ return (PYTHON_VERSION >= (3, 4, 0) or
(PY2 and PYTHON_VERSION >= (2, 7, 2)) or
(PY26 and PYTHON_VERSION >= (2, 6, 5)))

diff --git a/pywikibot/README.rst b/pywikibot/README.rst
index 225eca8..a9dd281 100644
--- a/pywikibot/README.rst
+++ b/pywikibot/README.rst
@@ -32,7 +32,7 @@

You need to have at least python version `2.6.5 <http://www.python.org/download/>`_
or newer installed on your computer to be able to run any of the code in this
-package, but not 3.0-3.2. It works fine with 3.3-3.4 versions of python installed.
+package, but not 3.0-3.3. It works fine with 3.4+ versions of python installed.
Support for older versions of python is not planned. Some scripts could run with
older python releases. Please refer the manual at mediawiki for further details
and restrictions.
diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index 938cf59..1264b64 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -135,9 +135,9 @@
deprecate_arg = redirect_func(_deprecate_arg)


-if sys.version_info[:2] in ((2, 6), (3, 3)):
+if sys.version_info[:2] == (2, 6):
warn(
- 'Pywikibot will soon drop support for Python 2.6 and 3.3',
+ 'Pywikibot will soon drop support for Python 2.6',
DeprecationWarning,
)

diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index ba0d3c7..611a957 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -108,7 +108,7 @@
except ImportError:
warn("""
pywikibot support of Python 2.6 relies on package future for many features.
-Please upgrade to Python 2.7+ or Python 3.3+, or run:
+Please upgrade to Python 2.7+ or Python 3.4+, or run:
"pip install future>=0.15.0"
""", RuntimeWarning)
try:
@@ -1221,8 +1221,6 @@
Safely return function Signature object (PEP 362).

inspect.signature was introduced in 3.3, however backports are available.
- In Python 3.3, it does not support all types of callables, and should
- not be relied upon. Python 3.4 works correctly.

Any exception calling inspect.signature is ignored and None is returned.

diff --git a/requests-requirements.txt b/requests-requirements.txt
index 6b4eed5..651eabf 100644
--- a/requests-requirements.txt
+++ b/requests-requirements.txt
@@ -3,11 +3,10 @@
# requests security extra
# Bug T105767 on Python 2.7 release 9+
cryptography>=1.3.4 ; python_version != '2.6' and (python_full_version < '2.7.9' or python_version > '3.3')
-cryptography>=1.3.4,<2.0 ; python_version == '3.3'
cryptography>=1.3.4,<=2.0.3 ; python_version == '2.6' and platform_system == 'Windows'
cryptography>=1.3.4,<2.2 ; python_version == '2.6' and platform_system != 'Windows'
pyOpenSSL>=0.14,!=17.2.0 ; python_full_version < '2.7.9' and python_version != '2.6'
-PyOpenSSL<17.5.0 ; python_version == '3.3' or python_version == '2.6'
+PyOpenSSL<17.5.0 ; python_version == '2.6'
idna>=2.0.0 ; python_full_version < '2.7.9' or python_version >= '3'
# https://github.com/eliben/pycparser/issues/147
pycparser != 2.14
diff --git a/requirements.txt b/requirements.txt
index 11bac63..f3c051f 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -23,11 +23,10 @@

# requests security extra
cryptography>=1.3.4 ; python_version != '2.6' and python_full_version < '2.7.9'
-cryptography>=1.3.4,<2.0 ; python_version == '3.3'
cryptography>=1.3.4,<=2.0.3 ; python_version == '2.6' and platform_system == 'Windows'
cryptography>=1.3.4,<2.2 ; python_version == '2.6' and platform_system != 'Windows'
pyOpenSSL>=0.14,!=17.2.0 ; python_full_version < '2.7.9' and python_version != '2.6'
-PyOpenSSL<17.5.0 ; python_version == '3.3' or python_version == '2.6'
+PyOpenSSL<17.5.0 ; python_version == '2.6'
idna>=2.0.0 ; python_full_version < '2.7.9'
# https://github.com/eliben/pycparser/issues/147
pycparser != 2.14
@@ -55,7 +54,6 @@

# GUI
Pillow<4.0.0 ; python_version == '2.6'
-Pillow>=2.0.0,<5.0.0 ; python_version == '3.3'
Pillow ; python_version == '2.7' or python_version >= '3.4'

# core pagegenerators
@@ -76,8 +74,7 @@
# If you see that on Python 2, change this to flickrapi==1.4.5
# On Python 3, force pip to install requests 2.2.1, or remove flickrapi below.
flickrapi>=1.4.5,<2 ; python_version < '2.7'
-flickrapi<2.3.1 ; python_version == '3.3'
-flickrapi ; python_version >= '2.7' and python_version != '3.3'
+flickrapi ; python_version >= '2.7'

# incomplete core component botirc
irc ; python_version > '2.6'
diff --git a/setup.py b/setup.py
index 25bb902..1b2ccce 100644
--- a/setup.py
+++ b/setup.py
@@ -29,14 +29,14 @@
Pywikibot is not available on:
{version}

-This version of Pywikibot only supports Python 2.6.5+, 2.7.2+ or 3.3+.
+This version of Pywikibot only supports Python 2.6.5+, 2.7.2+ or 3.4+.
"""


def python_is_supported():
"""Check that Python is supported."""
# Any change to this must be copied to pwb.py
- return (PYTHON_VERSION >= (3, 3, 0) or
+ return (PYTHON_VERSION >= (3, 4, 0) or
(PY2 and PYTHON_VERSION >= (2, 7, 2)) or
(PY26 and PYTHON_VERSION >= (2, 6, 5)))

@@ -55,8 +55,6 @@
# According to https://pillow.readthedocs.io/en/latest/installation.html#notes
if PY26:
pillow = 'Pillow<4.0.0'
-elif PYTHON_VERSION[:2] == (3, 3):
- pillow = 'Pillow>=2.0.0,<5.0.0'
else:
pillow = 'Pillow'

@@ -81,13 +79,6 @@
'MySQL': ['oursql'],
'unicode7': ['unicodedata2>=7.0.0-2'],
})
-elif PYTHON_VERSION[:2] == (3, 3):
- # requests[security] requires cryptography, but cryptography 2.0+ does not
- # support Python 3.3; T178241
- extra_deps['security'].append('cryptography<2.0')
- # PyOpenSSL is required by requests[security] but has dropped support for
- # Python 3.3 since version 17.5.0 (2017-11-30); T181912
- extra_deps['security'].append('PyOpenSSL<17.5.0')

script_deps = {
'flickrripper.py': [pillow],
@@ -103,12 +94,8 @@
# and will be first packaged for Fedora Core 21.
# flickrapi 1.4.x does not run on Python 3, and setuptools can only
# select flickrapi 2.x for Python 3 installs.
-# flickrapi 2.3.1 dropped support for Python 3.3.
-if PYTHON_VERSION[:2] == (3, 3):
- script_deps['flickrripper.py'].append('flickrapi<2.3.1')
-else:
- script_deps['flickrripper.py'].append(
- 'flickrapi>=1.4.5,<2' if PY26 else 'flickrapi')
+script_deps['flickrripper.py'].append(
+ 'flickrapi>=1.4.5,<2' if PY26 else 'flickrapi')

# lunatic-python is only available for Linux
if sys.platform.startswith('linux'):
@@ -181,8 +168,6 @@
# builds.
# Microsoft makes available a compiler for Python 2.7
# http://www.microsoft.com/en-au/download/details.aspx?id=44266
-# If you set up your own compiler for Python 3, on 3.3 two demo files
-# packaged with pywin32 may fail. Remove com/win32com/demos/ie*.py
if os.name == 'nt' and os.environ.get('PYSETUP_TEST_NO_UI', '0') != '1':
# FIXME: tests/ui_tests.py suggests pywinauto 0.4.2
# which isnt provided on pypi.
@@ -274,7 +259,6 @@
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
diff --git a/tests/utils.py b/tests/utils.py
index 129f0eb..43d883e 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -647,9 +647,9 @@
if PYTHON_VERSION < (2, 7):
command.insert(
1, '-W ignore:{0}:DeprecationWarning'.format(PYTHON_26_CRYPTO_WARN))
- if PYTHON_VERSION[:2] in ((3, 3), (2, 6)):
+ if PYTHON_VERSION[:2] == (2, 6):
command.insert(1, '-W ignore:{0}:DeprecationWarning'.format(
- 'Pywikibot will soon drop support for Python 2.6 and 3.3'))
+ 'Pywikibot will soon drop support for Python 2.6'))
# Any environment variables added on Windows must be of type
# str() on Python 2.
env = os.environ.copy()

To view, visit change 403140. To unsubscribe, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I61c94c4324b717e6b6b9ed95278714752e4d6888
Gerrit-Change-Number: 403140
Gerrit-PatchSet: 6
Gerrit-Owner: Dalba <dalba.wiki@gmail.com>
Gerrit-Reviewer: Dalba <dalba.wiki@gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: Zoranzoki21 <zorandori4444@gmail.com>
Gerrit-Reviewer: jenkins-bot <>