From 74ab95431cf6fcbb4f6e749a8db7d494a0f4387e Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Fri, 13 Dec 2019 22:20:47 +0000 Subject: [PATCH] [ussuri][goal] Drop python 2.7 support OpenStack is dropping the py2.7 support in ussuri cycle. specs repo either has py27 job or requirement or tox env. Doc building still use deprcated oslosphinx and incompatible version of yasfb which lead to error- sphinx.errors.ExtensionError: Could not import extension yasfb (exception: cannot import name 'logging') This commit replace oslosphinx with openstackdocstheme ti fix the error. Ussuri Communtiy-wide goal: https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html Change-Id: I76a9e0e3259ec52564f31a239079cd91da897ee9 --- .zuul.yaml | 4 ++-- doc/source/conf.py | 3 ++- requirements.txt | 6 +++--- tox.ini | 6 ++---- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index f3848fbe..99198961 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -3,7 +3,7 @@ - openstack-specs-jobs check: jobs: - - openstack-tox-py27 + - openstack-tox-py37 gate: jobs: - - openstack-tox-py27 + - openstack-tox-py37 diff --git a/doc/source/conf.py b/doc/source/conf.py index bebae661..e3e176fa 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -24,7 +24,7 @@ sys.path.insert(0, os.path.abspath('../..')) extensions = [ 'sphinx.ext.autodoc', #'sphinx.ext.intersphinx', - 'oslosphinx', + 'openstackdocstheme', 'yasfb', ] @@ -75,6 +75,7 @@ pygments_style = 'sphinx' # html_theme_path = ["."] # html_theme = '_theme' # html_static_path = ['static'] +html_theme = "openstackdocs" # Output file base name for HTML help builder. htmlhelp_basename = '%sdoc' % project diff --git a/requirements.txt b/requirements.txt index bf630306..ca0f7d1f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ pbr>=0.6,<1.0 -oslosphinx -sphinx>=1.1.2,<1.2 -yasfb>=0.5.1 +openstackdocstheme +sphinx>=2.0.0 +yasfb>=0.8.0 diff --git a/tox.ini b/tox.ini index 54356f87..a9c4c4eb 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,10 @@ [tox] minversion = 1.6 -envlist = docs,py27 +envlist = docs,pep8 skipsdist = True [testenv] +basepython = python3 usedevelop = True install_command = pip install -U {opts} {packages} setenv = @@ -16,15 +17,12 @@ commands = python setup.py testr --slowest --testr-args='{posargs}' [testenv:venv] -basepython = python3 commands = {posargs} [testenv:docs] -basepython = python3 commands = python setup.py build_sphinx [testenv:spelling] -basepython = python3 deps = -r{toxinidir}/requirements.txt sphinxcontrib-spelling