From 1479c9173750d4a248fe0ed48091fbd0f338a69a Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Tue, 16 Oct 2018 14:40:07 -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: I0b4d0d66ad60ff8e9b2d7de70d9858bd6ca5efa6 Signed-off-by: Sean McGinnis --- doc/ext/support_matrix.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/ext/support_matrix.py b/doc/ext/support_matrix.py index b3e08076b..e160689b6 100644 --- a/doc/ext/support_matrix.py +++ b/doc/ext/support_matrix.py @@ -22,16 +22,19 @@ It is used via a single directive in the .rst file """ import os - -import six -import six.moves.configparser as config_parser import sys from docutils import nodes from docutils.parsers import rst +from sphinx.util import logging +from sphinx.util.osutil import copyfile +import six +import six.moves.configparser as config_parser + from designate.backend.base import Backend from designate.backend.agent_backend.base import AgentBackend -from sphinx.util.osutil import copyfile + +LOG = logging.getLogger(__name__) class SupportMatrix(object): @@ -434,7 +437,7 @@ def copy_assets(app, exception): assets = ['support-matrix.css', 'support-matrix.js'] if app.builder.name != 'html' or exception: return - app.info('Copying assets: %s' % ', '.join(assets)) + LOG.info('Copying assets: %s' % ', '.join(assets)) for asset in assets: dest = os.path.join(app.builder.outdir, '_static', asset) source = os.path.abspath(os.path.dirname(__file__))