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_kernel_file: ~/CentOS-7-x86_64-GenericCloud.kernel
centos_partition_file: ~/CentOS-7-x86_64-GenericCloud-root.qcow2 centos_partition_file: ~/CentOS-7-x86_64-GenericCloud-root.qcow2
metalsmith_root_size: 9 metalsmith_root_size: 9
metalsmith_python: python3
- job: - job:
name: metalsmith-integration-glance-localboot-centos7 name: metalsmith-integration-glance-localboot-centos7
@ -130,16 +131,13 @@
metalsmith_traits: [CUSTOM_GOLD] metalsmith_traits: [CUSTOM_GOLD]
- job: - job:
name: metalsmith-integration-glance-netboot-cirros-iscsi-py3 name: metalsmith-integration-glance-netboot-cirros-iscsi
description: | description: |
Integration job using Glance as image source and CirrOS with netboot. Integration job using Glance as image source and CirrOS with netboot.
parent: metalsmith-integration-base parent: metalsmith-integration-base
vars: vars:
devstack_localrc:
USE_PYTHON3: true
metalsmith_netboot: true metalsmith_netboot: true
metalsmith_precreate_port: true metalsmith_precreate_port: true
metalsmith_python: python3
- job: - job:
name: metalsmith-integration-glance-netboot-cirros-direct name: metalsmith-integration-glance-netboot-cirros-direct
@ -154,7 +152,7 @@
IRONIC_DEFAULT_DEPLOY_INTERFACE: direct IRONIC_DEFAULT_DEPLOY_INTERFACE: direct
- job: - job:
name: metalsmith-integration-http-netboot-cirros-direct-py3 name: metalsmith-integration-http-netboot-cirros-direct
description: | description: |
Integration job using HTTP as image source and direct deploy. Integration job using HTTP as image source and direct deploy.
parent: metalsmith-integration-base parent: metalsmith-integration-base
@ -162,16 +160,13 @@
vars: vars:
metalsmith_netboot: true metalsmith_netboot: true
metalsmith_precreate_port: true metalsmith_precreate_port: true
metalsmith_python: python3
metalsmith_use_http: true metalsmith_use_http: true
devstack_localrc: devstack_localrc:
IRONIC_DEFAULT_DEPLOY_INTERFACE: direct IRONIC_DEFAULT_DEPLOY_INTERFACE: direct
USE_PYTHON3: true
- project: - project:
templates: templates:
- check-requirements - check-requirements
- openstack-python-jobs
- openstack-python3-ussuri-jobs - openstack-python3-ussuri-jobs
- openstack-lower-constraints-jobs - openstack-lower-constraints-jobs
- openstack-cover-jobs - openstack-cover-jobs
@ -180,12 +175,12 @@
check: check:
jobs: jobs:
- metalsmith-integration-glance-localboot-centos7 - 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-glance-netboot-cirros-direct
- metalsmith-integration-http-netboot-cirros-direct-py3 - metalsmith-integration-http-netboot-cirros-direct
gate: gate:
jobs: jobs:
- metalsmith-integration-glance-localboot-centos7 - 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-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 # of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later. # process, which may cause wedges in the gate later.
reno>=2.5.0 # Apache-2.0 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 sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
sphinxcontrib-apidoc>=0.2.0 # BSD sphinxcontrib-apidoc>=0.2.0 # BSD
sphinxcontrib-svg2pdfconverter>=0.1.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 openstacksdk>=0.29.0 # Apache-2.0
requests>=2.18.4 # Apache-2.0 requests>=2.18.4 # Apache-2.0
six>=1.10.0 # MIT 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 PrettyTable<0.8,>=0.7.2 # BSD

View File

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

10
tox.ini
View File

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