From 8c4ff32c15714093f4cd6fea1926cb177af003eb Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 4 Feb 2020 22:27:25 +0100 Subject: [PATCH] [ussuri][goal] Drop python 2.7 support and testing OpenStack is dropping the py2.7 support in ussuri cycle. 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://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html Use modern sphinx-build command. Change-Id: I8b6d7f69bb465150115cfc18a047e5775f1ff567 --- .zuul.yaml | 3 +-- .../drop-python-2-7-73d3113c69d724d6.yaml | 5 +++++ setup.cfg | 19 +++---------------- setup.py | 8 -------- tox.ini | 19 +++++++++---------- 5 files changed, 18 insertions(+), 36 deletions(-) create mode 100644 releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml diff --git a/.zuul.yaml b/.zuul.yaml index 05f00f5..0b68faa 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,5 +1,4 @@ - project: templates: - - openstack-python-jobs - - openstack-python3-train-jobs + - openstack-python3-ussuri-jobs - check-requirements diff --git a/releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml b/releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml new file mode 100644 index 0000000..3ff5c85 --- /dev/null +++ b/releasenotes/notes/drop-python-2-7-73d3113c69d724d6.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + Python 2.7 support has been dropped. The minimum version of Python now + supported by molteniron is Python 3.6. diff --git a/setup.cfg b/setup.cfg index 95c343d..07b03c4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,6 +6,7 @@ description-file = author = OpenStack author-email = openstack-dev@lists.openstack.org home-page = http://www.openstack.org/ +python-requires = >=3.6 classifier = Environment :: OpenStack Intended Audience :: Information Technology @@ -13,25 +14,16 @@ 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 + Programming Language :: Python :: 3 :: Only + Programming Language :: Python :: Implementation :: CPython [files] packages = molteniron -[build_sphinx] -source-dir = doc/source -build-dir = doc/build -all_files = 1 -warning-is-error = 1 - -[upload_sphinx] -upload-dir = doc/build/html - [compile_catalog] directory = molteniron/locale domain = molteniron @@ -45,8 +37,3 @@ input_file = molteniron/locale/molteniron.pot keywords = _ gettext ngettext l_ lazy_gettext mapping_file = babel.cfg output_file = molteniron/locale/molteniron.pot - -[build_releasenotes] -all_files = 1 -build-dir = releasenotes/build -source-dir = releasenotes/source diff --git a/setup.py b/setup.py index e73540e..e363fa9 100755 --- a/setup.py +++ b/setup.py @@ -17,14 +17,6 @@ from setuptools import setup # from setuptools import find_packages -# In python < 2.7.4, a lazy loading of package `pbr` will break -# setuptools if some other modules registered functions in `atexit`. -# solution from: http://bugs.python.org/issue15881#msg170215 -try: - import multiprocessing # noqa -except ImportError: - pass - setup(name="molteniron", version="1.0", description="Client/server database for Ironic Baremetal services", diff --git a/tox.ini b/tox.ini index 8287eba..1e911c9 100644 --- a/tox.ini +++ b/tox.ini @@ -1,15 +1,18 @@ [tox] -minversion = 2.0 -envlist = py3,py27,pypy,pep8 +minversion = 3.1.0 +envlist = py3,pypy,pep8 +ignore_basepython_conflict = True skipsdist = True [testenv] +basepython = python3 usedevelop = True -install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages} setenv = VIRTUAL_ENV={envdir} PYTHONWARNINGS=default::DeprecationWarning -deps = -r{toxinidir}/test-requirements.txt +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/test-requirements.txt # Don't worry about installing bash commands in the virtual environment. whitelist_externals = mkdir diff @@ -84,23 +87,19 @@ commands = mkdir -p testenv/var/run/ stop [testenv:pep8] -basepython = python3 commands = flake8 {posargs} [testenv:venv] -basepython = python3 commands = {posargs} [testenv:cover] -basepython = python3 commands = python setup.py test --coverage --testr-args='{posargs}' [testenv:docs] -basepython = python3 -commands = python setup.py build_sphinx +commands = + sphinx-build -W -d doc/build/doctrees -b html doc/source doc/build/html [testenv:releasenotes] -basepython = python3 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html