Use Sphinx 1.5 warning-is-error

With pbr 2.0 and Sphinx 1.5, the setting for treat sphinx warnings as
errors is setting warning-is-error in build_sphinx section. Migrate
the setting from the old warnerrors one.

There are a couple of small items to be cleaned up.

Change-Id: I01b1ac49c69d001ea25a475d903311d0b592656e
This commit is contained in:
Stephen Finucane 2017-03-22 12:35:10 +00:00
parent e3701dd534
commit d114804f1a
3 changed files with 11 additions and 12 deletions

View File

@ -140,9 +140,8 @@ html_static_path = ['_static']
git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local",
"-n1"]
try:
html_last_updated_fmt = subprocess.Popen(git_cmd,
stdout=subprocess.PIPE).\
communicate()[0]
html_last_updated_fmt = str(
subprocess.Popen(git_cmd, stdout=subprocess.PIPE).communicate()[0])
except Exception:
warnings.warn('Cannot get last updated time from git repository. '
'Not setting "html_last_updated_fmt".')
@ -183,3 +182,6 @@ html_use_index = False
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# A list of warning types to suppress arbitrary warning messages.
suppress_warnings = ['image.nonlocal_uri']

View File

@ -45,12 +45,10 @@ oslo.config.opts =
tempest.config = tempest.config:list_opts
[build_sphinx]
all_files = 1
all-files = 1
warning-is-error = 1
build-dir = doc/build
source-dir = doc/source
[pbr]
warnerrors = True
[wheel]
universal = 1

View File

@ -102,11 +102,10 @@ class TempestPlugin(object):
in any ServiceClients object instantiated by tests.
The default implementation returns an empty list.
:return list of dictionaries. Each element of the list represents
the service client for an API. Each dict must define all
parameters required for the invocation of
`service_clients.ServiceClients.register_service_client_module`.
:rtype: list
:returns: Each element of the list represents the service client for an
API. Each dict must define all parameters required for the invocation
of `service_clients.ServiceClients.register_service_client_module`.
:rtype: list of dictionaries
Example: