Remove support for Python <2.7 and <3.4 They're no longer supported, and the Python ecosystem is starting to drop support: two of our test dependencies no longer support them.
Closes #1150 Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/25c4d99b Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/25c4d99b Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/25c4d99b Branch: refs/heads/trunk Commit: 25c4d99b50017e4fd233ad03fa56d337e99ef451 Parents: 2224ec7 Author: Quentin Pradet <quent...@apache.org> Authored: Sat Dec 16 12:39:53 2017 +0400 Committer: Quentin Pradet <quent...@apache.org> Committed: Sat Dec 16 18:28:05 2017 +0400 ---------------------------------------------------------------------- .travis.yml | 10 ---------- CHANGES.rst | 5 +++++ docs/other/using-http-proxy.rst | 4 ---- libcloud/test/__init__.py | 7 +------ libcloud/utils/py3.py | 14 -------------- setup.py | 7 +------ tox.ini | 7 ++----- 7 files changed, 9 insertions(+), 45 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/25c4d99b/.travis.yml ---------------------------------------------------------------------- diff --git a/.travis.yml b/.travis.yml index c07208b..128549c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,7 @@ language: python sudo: false # Add or remove version for match with Travis support python: - - 2.6 - 2.7 - - 3.3 - 3.4 - 3.5 - 3.6 @@ -48,14 +46,6 @@ matrix: # Trigger ReadTheDocs build on docs builder after_success: - ./contrib/trigger_rtd_build.py 8284 - # For now allow failures of all the builds which use lxml - allow_failures: - - env: ENV=coverage - - env: - python: pypy3 - - env: - python: pypy - # Trigger ReadTheDocs build install: - pip install --upgrade "pip==9.0.1" http://git-wip-us.apache.org/repos/asf/libcloud/blob/25c4d99b/CHANGES.rst ---------------------------------------------------------------------- diff --git a/CHANGES.rst b/CHANGES.rst index 0f19b18..deb451e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,11 @@ Changes in Apach Libcloud in development ---------------------------------------- +- Drop support for Python 2.6 and Python 3.3 + They're no longer supported, and the Python ecosystem is starting to + drop support: two of our test dependencies no longer support them. + [Quentin Pradet] + Common ~~~~~~ http://git-wip-us.apache.org/repos/asf/libcloud/blob/25c4d99b/docs/other/using-http-proxy.rst ---------------------------------------------------------------------- diff --git a/docs/other/using-http-proxy.rst b/docs/other/using-http-proxy.rst index 1a8699a..651fdd7 100644 --- a/docs/other/using-http-proxy.rst +++ b/docs/other/using-http-proxy.rst @@ -9,11 +9,7 @@ Libcloud supports using an HTTP proxy for outgoing HTTP and HTTPS requests. Proxy support has been tested with the following Python versions; -* Python 2.6 * Python 2.7 / PyPy -* Python 3.1 -* Python 3.2 -* Python 3.3 * Python 3.4 You can specify which HTTP proxy to use using one of the approaches described http://git-wip-us.apache.org/repos/asf/libcloud/blob/25c4d99b/libcloud/test/__init__.py ---------------------------------------------------------------------- diff --git a/libcloud/test/__init__.py b/libcloud/test/__init__.py index 645105e..149de42 100644 --- a/libcloud/test/__init__.py +++ b/libcloud/test/__init__.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import unittest import random import requests from libcloud.common.base import Response @@ -31,12 +32,6 @@ from libcloud.utils.py3 import urlparse from libcloud.utils.py3 import parse_qs from libcloud.utils.py3 import parse_qsl from libcloud.utils.py3 import urlquote -from libcloud.utils.py3 import unittest2_required - -if unittest2_required: - import unittest2 as unittest -else: - import unittest XML_HEADERS = {'content-type': 'application/xml'} http://git-wip-us.apache.org/repos/asf/libcloud/blob/25c4d99b/libcloud/utils/py3.py ---------------------------------------------------------------------- diff --git a/libcloud/utils/py3.py b/libcloud/utils/py3.py index 645ffc7..955cb6e 100644 --- a/libcloud/utils/py3.py +++ b/libcloud/utils/py3.py @@ -37,30 +37,21 @@ except ImportError: PY2 = sys.version_info[0] == 2 PY3 = sys.version_info[0] == 3 -PY2_pre_27 = PY2 and sys.version_info < (2, 7) PY2_pre_279 = PY2 and sys.version_info < (2, 7, 9) PY2 = False -PY26 = False PY27 = False PY3 = False -PY32 = False if sys.version_info >= (2, 0) and sys.version_info < (3, 0): PY2 = True -if sys.version_info >= (2, 6) and sys.version_info < (2, 7): - PY26 = True - if sys.version_info >= (2, 7) and sys.version_info < (2, 8): PY27 = True if sys.version_info >= (3, 0): PY3 = True -if sys.version_info >= (3, 2) and sys.version_info < (3, 3): - PY32 = True - if PY2_pre_279: try: from backports.ssl_match_hostname import match_hostname, CertificateError # NOQA @@ -197,8 +188,3 @@ else: def hexadigits(s): # s needs to be a string. return [x.encode("hex") for x in s] - -if PY27 or PY3: - unittest2_required = False -else: - unittest2_required = True http://git-wip-us.apache.org/repos/asf/libcloud/blob/25c4d99b/setup.py ---------------------------------------------------------------------- diff --git a/setup.py b/setup.py index b58ff9f..2b54296 100644 --- a/setup.py +++ b/setup.py @@ -66,12 +66,7 @@ TEST_REQUIREMENTS = [ if PY2_pre_279: TEST_REQUIREMENTS.append('backports.ssl_match_hostname') -if PY2_pre_27: - unittest2_required = True -else: - unittest2_required = False - -if PY2_pre_26 or PY3_pre_34: +if PY2_pre_27 or PY3_pre_34: version = '.'.join([str(x) for x in sys.version_info[:3]]) print('Version ' + version + ' is not supported. Supported versions are ' + ', '.join(SUPPORTED_VERSIONS)) http://git-wip-us.apache.org/repos/asf/libcloud/blob/25c4d99b/tox.ini ---------------------------------------------------------------------- diff --git a/tox.ini b/tox.ini index 7319fd3..73c9714 100644 --- a/tox.ini +++ b/tox.ini @@ -1,22 +1,19 @@ [tox] -envlist = py{2.6,2.7,pypy,pypy3,3.3,3.4,3.5,3.6},checks,lint,pylint,integration,coverage +envlist = py{2.7,pypy,pypy3,3.4,3.5,3.6},checks,lint,pylint,integration,coverage [testenv] passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH deps = -r{toxinidir}/requirements-tests.txt lockfile - py{2.6,2.7}: paramiko - py{2.6}: unittest2 + py2.7: paramiko commands = cp libcloud/test/secrets.py-dist libcloud/test/secrets.py python setup.py test basepython = - py2.6: python2.6 {py2.7,checks,lint,pylint,coverage}: python2.7 docs: python3.5 pypypy: pypy pypypy3: pypy3 - py3.3: python3.3 py3.4: python3.4 py3.5: python3.5 py3.6: python3.6