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 number of issues that need to resolved to make this work.
Most of these trivial enough but unfortunately the history document
contains issue due to its inclusion of ChangeLog, which is based on
commit message summary lines and contains some invalid rST.  There
doesn't appear to be anyway to edit there retroactively nor disable
warnings on a specific files, thus the removal.

Change-Id: Ied79fc95d3711f8f3880e3e07e20f2c69b9a36ab
This commit is contained in:
Stephen Finucane 2017-03-16 14:42:17 +00:00
parent b1cf3141b9
commit 32d23459dc
6 changed files with 26 additions and 38 deletions

View File

@ -53,7 +53,8 @@ modindex_common_prefix = ['oslo_config.']
# Sphinx are currently 'default' and 'sphinxdoc'. # Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme_path = ["."] # html_theme_path = ["."]
# html_theme = '_theme' # html_theme = '_theme'
html_static_path = ['static'] # html_static_path = ['static']
# Output file base name for HTML help builder. # Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project htmlhelp_basename = '%sdoc' % project

View File

@ -1,2 +0,0 @@
.. include:: ../../ChangeLog

View File

@ -29,14 +29,6 @@ Contents
faq faq
contributing contributing
Release Notes
=============
.. toctree::
:maxdepth: 1
history
Indices and tables Indices and tables
================== ==================

View File

@ -46,11 +46,11 @@ the value can not be converted.
For convenience, there are predefined option subclasses in For convenience, there are predefined option subclasses in
:mod:`oslo_config.cfg` that set the option `type` as in the following table: :mod:`oslo_config.cfg` that set the option `type` as in the following table:
==================================== ====== ====================================== ======
Type Option Type Option
==================================== ====== ====================================== ======
:class:`oslo_config.types.String` - :class:`oslo_config.cfg.StrOpt` :class:`oslo_config.types.String` :class:`oslo_config.cfg.StrOpt`
- :class:`oslo_config.cfg.SubCommandOpt` :class:`oslo_config.types.String` :class:`oslo_config.cfg.SubCommandOpt`
:class:`oslo_config.types.Boolean` :class:`oslo_config.cfg.BoolOpt` :class:`oslo_config.types.Boolean` :class:`oslo_config.cfg.BoolOpt`
:class:`oslo_config.types.Integer` :class:`oslo_config.cfg.IntOpt` :class:`oslo_config.types.Integer` :class:`oslo_config.cfg.IntOpt`
:class:`oslo_config.types.Float` :class:`oslo_config.cfg.FloatOpt` :class:`oslo_config.types.Float` :class:`oslo_config.cfg.FloatOpt`
@ -59,9 +59,9 @@ Type Option
:class:`oslo_config.types.Dict` :class:`oslo_config.cfg.DictOpt` :class:`oslo_config.types.Dict` :class:`oslo_config.cfg.DictOpt`
:class:`oslo_config.types.IPAddress` :class:`oslo_config.cfg.IPOpt` :class:`oslo_config.types.IPAddress` :class:`oslo_config.cfg.IPOpt`
:class:`oslo_config.types.Hostname` :class:`oslo_config.cfg.HostnameOpt` :class:`oslo_config.types.Hostname` :class:`oslo_config.cfg.HostnameOpt`
:class:`oslo_config.types.HostAddress`:class:`oslo_config.cfg.HostAddressOpt` :class:`oslo_config.types.HostAddress` :class:`oslo_config.cfg.HostAddressOpt`
:class:`oslo_config.types.URI` :class:`oslo_config.cfg.URIOpt` :class:`oslo_config.types.URI` :class:`oslo_config.cfg.URIOpt`
==================================== ====== ====================================== ======
For :class:`oslo_config.cfg.MultiOpt` the `item_type` parameter defines For :class:`oslo_config.cfg.MultiOpt` the `item_type` parameter defines
the type of the values. For convenience, :class:`oslo_config.cfg.MultiStrOpt` the type of the values. For convenience, :class:`oslo_config.cfg.MultiStrOpt`
@ -2278,7 +2278,7 @@ class ConfigOpts(collections.Mapping):
_ConfigDirOpt('config-dir', _ConfigDirOpt('config-dir',
metavar='DIR', metavar='DIR',
default=default_config_dirs, default=default_config_dirs,
help='Path to a config directory to pull *.conf ' help='Path to a config directory to pull `*.conf` '
'files from. This file set is sorted, so as to ' 'files from. This file set is sorted, so as to '
'provide a predictable parse order if ' 'provide a predictable parse order if '
'individual options are over-ridden. The set ' 'individual options are over-ridden. The set '
@ -3119,7 +3119,7 @@ class ConfigOpts(collections.Mapping):
def reload_config_files(self): def reload_config_files(self):
"""Reload configure files and parse all options """Reload configure files and parse all options
:return False if reload configure files failed or else return True :return: False if reload configure files failed or else return True
""" """
try: try:
@ -3141,7 +3141,7 @@ class ConfigOpts(collections.Mapping):
:param hook: a function accepting this ConfigOpts object and a dict of :param hook: a function accepting this ConfigOpts object and a dict of
config mutations, as returned by mutate_config_files. config mutations, as returned by mutate_config_files.
:return None :return: None
""" """
self._mutate_hooks.add(hook) self._mutate_hooks.add(hook)
@ -3153,8 +3153,8 @@ class ConfigOpts(collections.Mapping):
Hooks are called in a NON-DETERMINISTIC ORDER. Do not expect hooks to Hooks are called in a NON-DETERMINISTIC ORDER. Do not expect hooks to
be called in the same order as they were added. be called in the same order as they were added.
:return {(None or 'group', 'optname'): (old_value, new_value), ... } :return: {(None or 'group', 'optname'): (old_value, new_value), ... }
:raises Error if reloading fails :raises: Error if reloading fails
""" """
self.__cache.clear() self.__cache.clear()

View File

@ -771,7 +771,6 @@ class HostAddress(object):
:param version: defines which version should be explicitly :param version: defines which version should be explicitly
checked (4 or 6) in case of an IP address checked (4 or 6) in case of an IP address
:param type_name: Type name to be used in the sample config file. :param type_name: Type name to be used in the sample config file.
""" """
def __init__(self, version=None, type_name='host address value'): def __init__(self, version=None, type_name='host address value'):

View File

@ -34,15 +34,13 @@ oslo.config.opts =
oslo.config = oslo_config._list_opts:list_opts oslo.config = oslo_config._list_opts:list_opts
[build_sphinx] [build_sphinx]
all-files = 1
warning-is-error = 1
source-dir = doc/source source-dir = doc/source
build-dir = doc/build build-dir = doc/build
all_files = 1
[upload_sphinx] [upload_sphinx]
upload-dir = doc/build/html upload-dir = doc/build/html
[pbr]
warnerrors = True
[wheel] [wheel]
universal = 1 universal = 1