From d5a499233cd4d7f397e2eeaf87902c5f011b0ea5 Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Tue, 16 Oct 2018 14:46:04 -0500 Subject: [PATCH] Update sphinx extension logging Sphinx 1.6 deprecated using the application object to perform logging and it will be removed in the upcoming 2.0 release. This updates our extensions to use the recommended sphinx.util.logging instead. Change-Id: I364d8837283be0164624b4ffc4a48352661c697d Signed-off-by: Sean McGinnis --- doc/source/_exts/sigtable.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/source/_exts/sigtable.py b/doc/source/_exts/sigtable.py index fb3d653..ce97a4d 100644 --- a/doc/source/_exts/sigtable.py +++ b/doc/source/_exts/sigtable.py @@ -12,14 +12,16 @@ # License for the specific language governing permissions and limitations # under the License. -"""Build a table of the current teams -""" +"""Build a table of the current teams""" + +import yaml from docutils import nodes from docutils.parsers.rst.directives.tables import Table from docutils.parsers.rst import directives +from sphinx.util import logging -import yaml +LOG = logging.getLogger(__name__) class SIGTable(Table): @@ -34,7 +36,6 @@ class SIGTable(Table): } def run(self): env = self.state.document.settings.env - app = env.app # The required argument to the directive is the name of the # file to parse. @@ -49,8 +50,8 @@ class SIGTable(Table): # Now find the real path to the file, relative to where we are. rel_filename, filename = env.relfn2path(datafile) - app.info('loading sigtable') - app.info('reading %s' % filename) + LOG.info('loading sigtable') + LOG.info('reading %s' % filename) with open(filename, 'r') as f: _teams_yaml = yaml.load(f.read())