Drop python 2.7 support and testing

OpenStack is dropping the py2.7 support in ussuri cycle.

metalsmith is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal - https://review.opendev.org/#/c/691178/

Change-Id: Icf19488a3f230084faaf2ab5ece626b03495592e
This commit is contained in:
Iury Gregory Melo Ferreira 2019-11-22 18:10:54 +01:00
parent 2d801e2526
commit 33871b187b
6 changed files with 15 additions and 24 deletions

View File

@ -112,6 +112,7 @@
centos_kernel_file: ~/CentOS-7-x86_64-GenericCloud.kernel
centos_partition_file: ~/CentOS-7-x86_64-GenericCloud-root.qcow2
metalsmith_root_size: 9
metalsmith_python: python3
- job:
name: metalsmith-integration-glance-localboot-centos7
@ -130,16 +131,13 @@
metalsmith_traits: [CUSTOM_GOLD]
- job:
name: metalsmith-integration-glance-netboot-cirros-iscsi-py3
name: metalsmith-integration-glance-netboot-cirros-iscsi
description: |
Integration job using Glance as image source and CirrOS with netboot.
parent: metalsmith-integration-base
vars:
devstack_localrc:
USE_PYTHON3: true
metalsmith_netboot: true
metalsmith_precreate_port: true
metalsmith_python: python3
- job:
name: metalsmith-integration-glance-netboot-cirros-direct
@ -154,7 +152,7 @@
IRONIC_DEFAULT_DEPLOY_INTERFACE: direct
- job:
name: metalsmith-integration-http-netboot-cirros-direct-py3
name: metalsmith-integration-http-netboot-cirros-direct
description: |
Integration job using HTTP as image source and direct deploy.
parent: metalsmith-integration-base
@ -162,16 +160,13 @@
vars:
metalsmith_netboot: true
metalsmith_precreate_port: true
metalsmith_python: python3
metalsmith_use_http: true
devstack_localrc:
IRONIC_DEFAULT_DEPLOY_INTERFACE: direct
USE_PYTHON3: true
- project:
templates:
- check-requirements
- openstack-python-jobs
- openstack-python3-ussuri-jobs
- openstack-lower-constraints-jobs
- openstack-cover-jobs
@ -180,12 +175,12 @@
check:
jobs:
- metalsmith-integration-glance-localboot-centos7
- metalsmith-integration-glance-netboot-cirros-iscsi-py3
- metalsmith-integration-glance-netboot-cirros-iscsi
- metalsmith-integration-glance-netboot-cirros-direct
- metalsmith-integration-http-netboot-cirros-direct-py3
- metalsmith-integration-http-netboot-cirros-direct
gate:
jobs:
- metalsmith-integration-glance-localboot-centos7
- metalsmith-integration-glance-netboot-cirros-iscsi-py3
- metalsmith-integration-glance-netboot-cirros-iscsi
- metalsmith-integration-glance-netboot-cirros-direct
- metalsmith-integration-http-netboot-cirros-direct-py3
- metalsmith-integration-http-netboot-cirros-direct

View File

@ -2,7 +2,6 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
reno>=2.5.0 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
sphinxcontrib-apidoc>=0.2.0 # BSD
sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
Python 2.7 support has been dropped. Last release of metalsmith to support
Python 2.7 is OpenStack Train. The minimum version of Python now supported
by metalsmith is Python 3.6.

View File

@ -5,5 +5,4 @@ pbr!=2.1.0,>=2.0.0 # Apache-2.0
openstacksdk>=0.29.0 # Apache-2.0
requests>=2.18.4 # Apache-2.0
six>=1.10.0 # MIT
enum34>=1.0.4;python_version=='2.7' or python_version=='2.6' or python_version=='3.3' # BSD
PrettyTable<0.8,>=0.7.2 # BSD

View File

@ -14,8 +14,6 @@ classifier =
License :: OSI Approved :: Apache Software License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7

10
tox.ini
View File

@ -1,7 +1,8 @@
[tox]
envlist = py3,py27,pep8
envlist = py3,pep8
[testenv]
basepython = python3
usedevelop = True
setenv = VIRTUAL_ENV={envdir}
LANGUAGE=en_US
@ -17,7 +18,6 @@ commands =
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
[testenv:cover]
basepython = python3
setenv = {[testenv]setenv}
PYTHON=coverage run --branch --source metalsmith --parallel-mode
commands =
@ -29,7 +29,6 @@ commands =
coverage xml -o cover/coverage.xml
[testenv:venv]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/requirements.txt
@ -41,13 +40,11 @@ passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY \
OS_USER_DOMAIN_NAME OS_PROJECT_DOMAIN_NAME OS_CLOUD OS_CACERT
[testenv:pep8]
basepython = python3
commands =
flake8 metalsmith
doc8 README.rst doc/source roles
[testenv:docs]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/doc/joined-requirements.txt
@ -55,7 +52,6 @@ commands =
sphinx-build -a -E -W -b html doc/source doc/build/html
[testenv:pdf-docs]
basepython = python3
whitelist_externals = make
deps = {[testenv:docs]deps}
commands =
@ -63,7 +59,6 @@ commands =
make -C doc/build/pdf
[testenv:releasenotes]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/doc/joined-requirements.txt
@ -71,7 +66,6 @@ commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt