[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

Update docs building to use modern sphinx-build.
Update to use apidoc for newer sphinx.
Remove cruft from setup.cfg and doc/source.conf.py

Change-Id: I6a0643fcf8e28e09b1c69cda98dc53c71e6c508d
This commit is contained in:
Andreas Jaeger 2020-02-03 20:05:06 +01:00
parent 74bfb0b761
commit 4d45f96942
8 changed files with 27 additions and 33 deletions

View File

@ -3,7 +3,6 @@
- check-requirements
- openstack-cover-jobs
- openstack-lower-constraints-jobs
- openstack-python-jobs
- openstack-python3-ussuri-jobs
- periodic-stable-jobs
- publish-openstack-docs-pti

View File

@ -18,8 +18,8 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
'openstackdocstheme',
'sphinxcontrib.apidoc',
]
modindex_common_prefix = ['oslotest.']
@ -48,13 +48,17 @@ pygments_style = 'sphinx'
# Sphinx are currently 'default' and 'sphinxdoc'.
html_theme = 'openstackdocs'
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# -- openstackdocstheme configuration ----------------------------------------
repository_name = 'openstack/oslotest'
bug_project = 'oslotest'
bug_tag = ''
# sphinxcontrib.apidoc options
apidoc_module_dir = '../../oslotest'
apidoc_output_dir = 'reference/api'
apidoc_excluded_paths = [
'tests/*',
'tests']
apidoc_separate_modules = True

View File

@ -6,4 +6,4 @@ API
.. toctree::
:maxdepth: 1
api/autoindex
api/modules.rst

View File

@ -38,6 +38,7 @@ rfc3986==0.3.1
six==1.10.0
snowballstemmer==1.2.1
Sphinx==1.6.5
sphinxcontrib-apidoc===0.2.0
sphinxcontrib-websupport==1.0.1
stestr==2.0.0
stevedore==1.20.0

View File

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

View File

@ -6,6 +6,7 @@ description-file =
author = OpenStack
author-email = openstack-discuss@lists.openstack.org
home-page = https://docs.openstack.org/oslotest/latest/
python-requires = >=3.6
classifier =
Environment :: OpenStack
Intended Audience :: Developers
@ -13,11 +14,11 @@ 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 =
@ -26,21 +27,3 @@ scripts =
tools/oslo_debug_helper
tools/oslo_run_cross_tests
tools/oslo_run_pre_release_tests
[build_sphinx]
source-dir = doc/source
build-dir = doc/build
all_files = 1
warning-is-error = 1
[upload_sphinx]
upload-dir = doc/build/html
[pbr]
autodoc_index_modules = true
api_doc_dir = reference/api
autodoc_exclude_modules =
oslotest.tests.*
[wheel]
universal = true

View File

@ -2,7 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
hacking>=1.1.0,<1.2.0 # Apache-2.0
hacking>=2.0.0,<2.1.0 # Apache-2.0
# when we can require tox>= 1.4, this can go into tox.ini:
# [testenv:cover]
@ -10,9 +10,9 @@ hacking>=1.1.0,<1.2.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
# this is required for the docs build jobs
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
sphinxcontrib-apidoc>=0.2.0 # BSD
oslo.config>=5.2.0 # Apache-2.0
stestr>=2.0.0
reno>=2.5.0 # Apache-2.0

View File

@ -1,6 +1,6 @@
[tox]
minversion = 3.1
envlist = py27,py37,pep8
minversion = 3.1.0
envlist = py37,pep8
ignore_basepython_conflict = True
[testenv]
@ -27,7 +27,9 @@ commands =
commands = {posargs}
[testenv:docs]
commands = python setup.py build_sphinx
commands =
sphinx-build -W --keep-going -b html -d doc/build/doctrees doc/source doc/build/html
[testenv:releasenotes]
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html