[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
This commit is contained in:
Andreas Jaeger 2020-02-04 22:27:25 +01:00
parent ab580cd737
commit 8c4ff32c15
5 changed files with 18 additions and 36 deletions

View File

@ -1,5 +1,4 @@
- project: - project:
templates: templates:
- openstack-python-jobs - openstack-python3-ussuri-jobs
- openstack-python3-train-jobs
- check-requirements - check-requirements

View File

@ -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.

View File

@ -6,6 +6,7 @@ description-file =
author = OpenStack author = OpenStack
author-email = openstack-dev@lists.openstack.org author-email = openstack-dev@lists.openstack.org
home-page = http://www.openstack.org/ home-page = http://www.openstack.org/
python-requires = >=3.6
classifier = classifier =
Environment :: OpenStack Environment :: OpenStack
Intended Audience :: Information Technology Intended Audience :: Information Technology
@ -13,25 +14,16 @@ classifier =
License :: OSI Approved :: Apache Software License License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux Operating System :: POSIX :: Linux
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
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: Implementation :: CPython
[files] [files]
packages = packages =
molteniron 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] [compile_catalog]
directory = molteniron/locale directory = molteniron/locale
domain = molteniron domain = molteniron
@ -45,8 +37,3 @@ input_file = molteniron/locale/molteniron.pot
keywords = _ gettext ngettext l_ lazy_gettext keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg mapping_file = babel.cfg
output_file = molteniron/locale/molteniron.pot output_file = molteniron/locale/molteniron.pot
[build_releasenotes]
all_files = 1
build-dir = releasenotes/build
source-dir = releasenotes/source

View File

@ -17,14 +17,6 @@
from setuptools import setup from setuptools import setup
# from setuptools import find_packages # 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", setup(name="molteniron",
version="1.0", version="1.0",
description="Client/server database for Ironic Baremetal services", description="Client/server database for Ironic Baremetal services",

19
tox.ini
View File

@ -1,15 +1,18 @@
[tox] [tox]
minversion = 2.0 minversion = 3.1.0
envlist = py3,py27,pypy,pep8 envlist = py3,pypy,pep8
ignore_basepython_conflict = True
skipsdist = True skipsdist = True
[testenv] [testenv]
basepython = python3
usedevelop = True usedevelop = True
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
setenv = setenv =
VIRTUAL_ENV={envdir} VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning 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. # Don't worry about installing bash commands in the virtual environment.
whitelist_externals = mkdir whitelist_externals = mkdir
diff diff
@ -84,23 +87,19 @@ commands = mkdir -p testenv/var/run/
stop stop
[testenv:pep8] [testenv:pep8]
basepython = python3
commands = flake8 {posargs} commands = flake8 {posargs}
[testenv:venv] [testenv:venv]
basepython = python3
commands = {posargs} commands = {posargs}
[testenv:cover] [testenv:cover]
basepython = python3
commands = python setup.py test --coverage --testr-args='{posargs}' commands = python setup.py test --coverage --testr-args='{posargs}'
[testenv:docs] [testenv:docs]
basepython = python3 commands =
commands = python setup.py build_sphinx sphinx-build -W -d doc/build/doctrees -b html doc/source doc/build/html
[testenv:releasenotes] [testenv:releasenotes]
basepython = python3
commands = 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