From 81f8fa655ccecd409fe6dcda0d3763592c053e57 Mon Sep 17 00:00:00 2001 From: Chuck Carmack Date: Mon, 23 Nov 2015 18:49:29 +0000 Subject: [PATCH] Remove python 2.6 support from python-novaclient Since oslo is removing support for python 2.6, nova needs to also remove support from clients and libraries. This commit is to remove support from python-novaclient. -- Python 2.6 compatibilty code was removed. -- Python 2.6 was removed as a tox environment, install venv, and from the classifiers in setup.cfg. -- Release notes have been updated. UpgradeImpact Co-Authored-By: Andrey Kurilin Change-Id: I3f587ff38d478d075af5fd014e2b4b8416e185d4 Closes-bug: 1518390 --- novaclient/client.py | 4 ---- .../notes/remove-py26-support-f31379e86f40d975.yaml | 3 +++ setup.cfg | 5 +++-- tools/install_venv_common.py | 6 +++--- tox.ini | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 releasenotes/notes/remove-py26-support-f31379e86f40d975.yaml diff --git a/novaclient/client.py b/novaclient/client.py index 0fc998389..2bd6f0562 100644 --- a/novaclient/client.py +++ b/novaclient/client.py @@ -736,10 +736,6 @@ def discover_extensions(version): def _discover_via_python_path(): for (module_loader, name, _ispkg) in pkgutil.iter_modules(): if name.endswith('_python_novaclient_ext'): - if not hasattr(module_loader, 'load_module'): - # Python 2.6 compat: actually get an ImpImporter obj - module_loader = module_loader.find_module(name) - module = module_loader.load_module(name) if hasattr(module, 'extension_name'): name = module.extension_name diff --git a/releasenotes/notes/remove-py26-support-f31379e86f40d975.yaml b/releasenotes/notes/remove-py26-support-f31379e86f40d975.yaml new file mode 100644 index 000000000..4f144875c --- /dev/null +++ b/releasenotes/notes/remove-py26-support-f31379e86f40d975.yaml @@ -0,0 +1,3 @@ +--- +upgrade: + - Python 2.6 support has been removed from python-novaclient. diff --git a/setup.cfg b/setup.cfg index 174a80f87..e5173d752 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,9 +16,10 @@ classifier = License :: OSI Approved :: Apache Software License Operating System :: OS Independent Programming Language :: Python - Programming Language :: Python :: 2.6 + Programming Language :: Python :: 2 Programming Language :: Python :: 2.7 - Programming Language :: Python :: 3.3 + Programming Language :: Python :: 3 + Programming Language :: Python :: 3.4 [files] packages = diff --git a/tools/install_venv_common.py b/tools/install_venv_common.py index e279159ab..962b2f930 100644 --- a/tools/install_venv_common.py +++ b/tools/install_venv_common.py @@ -17,7 +17,7 @@ virtual environments. Since this script is used to bootstrap a virtualenv from the system's Python -environment, it should be kept strictly compatible with Python 2.6. +environment, it should be kept strictly compatible with Python 2.7. Synced in from openstack-common """ @@ -47,8 +47,8 @@ class InstallVenv(object): sys.exit(1) def check_python_version(self): - if sys.version_info < (2, 6): - self.die("Need Python Version >= 2.6") + if sys.version_info < (2, 7): + self.die("Need Python Version >= 2.7") def run_command_with_code(self, cmd, redirect_output=True, check_exit_code=True): diff --git a/tox.ini b/tox.ini index 6fe9d7bab..4373434e3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ # noted to use py34 you need virtualenv >= 1.11.4 [tox] -envlist = py26,py27,py33,py34,pypy,pep8,docs +envlist = py27,py33,py34,pypy,pep8,docs minversion = 1.6 skipsdist = True