[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

Cleanup tox.ini and setup.cfg from old cruft, use sphinx-build.

Change-Id: I395558c888d31925c26571f62ffc1ea556f2e2c4
Co-Authored-By: Hervé Beraud <hberaud@redhat.com>
This commit is contained in:
Andreas Jaeger 2020-02-03 16:14:42 +01:00 committed by Hervé Beraud
parent ef6afda962
commit 3e241f33da
8 changed files with 18 additions and 53 deletions

View File

@ -1,10 +1,8 @@
- project:
templates:
- check-requirements
- lib-forward-testing
- lib-forward-testing-python3
- openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python3-train-jobs
- periodic-stable-jobs
- publish-openstack-docs-pti

View File

@ -8,7 +8,6 @@ dulwich==0.15.0
extras==1.0.0
fixtures==3.0.0
flake8==2.2.4
funcsigs==1.0.0
hacking==0.10.3
imagesize==0.7.1
Jinja2==2.10

View File

@ -0,0 +1,5 @@
---
upgrade:
- |
Python 2.7 support has been dropped. The minimum version of Python now
supported by debtcollector is Python 3.6.

View File

@ -5,4 +5,3 @@
pbr!=2.1.0,>=2.0.0 # Apache-2.0
six>=1.10.0 # MIT
wrapt>=1.7.0 # BSD License
funcsigs>=1.0.0;python_version=='2.7' or python_version=='2.6' # Apache-2.0

View File

@ -6,6 +6,7 @@ description-file =
author = OpenStack
author-email = openstack-discuss@lists.openstack.org
home-page = https://docs.openstack.org/debtcollector/latest
python-requires = >=3.6
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
@ -13,24 +14,12 @@ 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 =
debtcollector
[build_sphinx]
source-dir = doc/source
build-dir = doc/build
all_files = 1
warning-is-error = 1
[upload_sphinx]
upload-dir = doc/build/html
[wheel]
universal = 1

View File

@ -16,14 +16,6 @@
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
import setuptools
# 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
setuptools.setup(
setup_requires=['pbr>=2.0.0'],
pbr=True)

View File

@ -6,8 +6,7 @@ hacking<0.11,>=0.10.0
coverage!=4.4,>=4.0 # Apache-2.0
python-subunit>=1.0.0 # Apache-2.0/BSD
sphinx!=1.6.6,!=1.6.7,>=1.6.5,<2.0.0;python_version=='2.7' # BSD
sphinx!=1.6.6,!=1.6.7,>=1.6.5;python_version>='3.4' # BSD
sphinx!=1.6.6,!=1.6.7,>=1.6.5 # BSD
openstackdocstheme>=1.18.1 # Apache-2.0
stestr>=2.0.0 # Apache-2.0
testtools>=2.2.0 # MIT

34
tox.ini
View File

@ -1,37 +1,31 @@
[tox]
minversion = 2.0
envlist = py27,py37,pep8
minversion = 3.1.1
envlist = py37,pep8
ignore_basepython_conflict = True
[testenv]
basepython = python3
setenv =
VIRTUAL_ENV={envdir}
BRANCH_NAME=master
CLIENT_NAME=debtcollector
install_command = pip install {opts} {packages}
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands = stestr run --slowest {posargs}
commands =
stestr run --slowest {posargs}
sphinx-build -b doctest doc/source doc/build
doc8 --ignore-path "doc/source/history.rst" doc/source
[testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs}
[testenv:debug-py27]
basepython = python2.7
commands = oslo_debug_helper {posargs}
[testenv:pep8]
basepython = python3
commands = flake8
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:cover]
basepython = python3
setenv =
PYTHON=coverage run --source $project --parallel-mode
commands =
@ -41,15 +35,7 @@ commands =
coverage xml -o cover/coverage.xml
[testenv:docs]
basepython = python3
commands = python setup.py build_sphinx
[testenv:py27]
basepython = python2.7
commands =
stestr run --slowest {posargs}
sphinx-build -b doctest doc/source doc/build
doc8 --ignore-path "doc/source/history.rst" doc/source
commands = sphinx-build -W --keep-going -b html -d doc/build/doctrees doc/source doc/build/html
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
@ -58,11 +44,9 @@ ignore = E123,E125
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[testenv:releasenotes]
basepython = python3
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