From 76c915aca28906f526b33cd947e6926eac42efb6 Mon Sep 17 00:00:00 2001 From: Madhuri Kumari Date: Sat, 23 Nov 2019 18:59:01 +0530 Subject: [PATCH] Drop python 2.7 support and testing OpenStack is dropping the py2.7 support in ussuri cycle. Bifrost 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: Ia175fc588f283e33efe2961f006c35c4ecc255b1 --- doc/requirements.txt | 3 +-- .../notes/drop-python2-f465181d67cccd30.yaml | 6 ++++++ setup.cfg | 2 -- tox.ini | 15 ++------------- 4 files changed, 9 insertions(+), 17 deletions(-) create mode 100644 releasenotes/notes/drop-python2-f465181d67cccd30.yaml diff --git a/doc/requirements.txt b/doc/requirements.txt index b902a8501..092516130 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,5 +1,4 @@ -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,!=2.1.0,>=1.6.2;python_version>='3.4' # BSD +sphinx!=1.6.6,!=1.6.7,!=2.1.0,>=1.6.2 # BSD sphinxcontrib-httpdomain>=1.3.0 # BSD sphinxcontrib-blockdiag>=1.5.4 # BSD sphinxcontrib-svg2pdfconverter>=0.1.0 # BSD diff --git a/releasenotes/notes/drop-python2-f465181d67cccd30.yaml b/releasenotes/notes/drop-python2-f465181d67cccd30.yaml new file mode 100644 index 000000000..68313b396 --- /dev/null +++ b/releasenotes/notes/drop-python2-f465181d67cccd30.yaml @@ -0,0 +1,6 @@ +--- +upgrade: + - | + Python 2.7 support has been dropped. Last release of bifrost + to support Python 2.7 is OpenStack Train. The minimum version + of Python now supported by bifrost is Python 3.6. diff --git a/setup.cfg b/setup.cfg index 173bc34b3..949fd14fa 100644 --- a/setup.cfg +++ b/setup.cfg @@ -13,8 +13,6 @@ classifier = License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux 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 diff --git a/tox.ini b/tox.ini index 2c292d56c..04e55fca4 100644 --- a/tox.ini +++ b/tox.ini @@ -1,12 +1,13 @@ [tox] minversion = 3.1.0 -envlist = py3,py27,docs,pep8 +envlist = py3,docs,pep8 skipsdist = True ignore_basepython_conflict=true [testenv] usedevelop = True install_command = pip install -U -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages} +basepython = python3 setenv = VIRTUAL_ENV={envdir} PYTHONWARNINGS=default::DeprecationWarning @@ -16,23 +17,19 @@ commands = python setup.py test --slowest --testr-args='{posargs}' passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY [testenv:pep8] -basepython = python3 commands = flake8 doc8 doc/source releasenotes/source README.rst CONTRIBUTING.rst MISSION.rst HACKING.rst [testenv:venv] -basepython = python3 deps = -r{toxinidir}/test-requirements.txt -r{toxinidir}/doc/requirements.txt commands = {posargs} [testenv:cover] -basepython = python3 commands = python setup.py test --coverage --testr-args='{posargs}' [testenv:docs] -basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt @@ -40,27 +37,20 @@ deps = commands = sphinx-build -W -b html doc/source doc/build/html [testenv:pdf-docs] -basepython = python3 whitelist_externals = make deps = {[testenv:docs]deps} commands = sphinx-build -W -b latex doc/source doc/build/pdf make -C doc/build/pdf [testenv:debug] -basepython = python3 commands = oslo_debug_helper -t bifrost/tests {posargs} [testenv:releasenotes] -basepython = python3 deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html -[testenv:debug-py27] -basepython = python2.7 -commands = oslo_debug_helper -t bifrost/tests {posargs} - [testenv:debug-py36] basepython = python3.6 commands = oslo_debug_helper -t bifrost/tests {posargs} @@ -71,7 +61,6 @@ ignore = F403,H102,H303 exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,os_ironic.py,os_ironic_node.py,os_ironic_inspect.py,os_keystone_service.py [testenv:lower-constraints] -basepython = python3 deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt