lkml.org 
[lkml]   [2019]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    SubjectRe: [PATCH 5.1 56/85] doc: Cope with the deprecation of AutoReporter
    From
    Date
    On 07. 06. 19, 17:39, Greg Kroah-Hartman wrote:
    > From: Jonathan Corbet <corbet@lwn.net>
    >
    > commit 2404dad1f67f8917e30fc22a85e0dbcc85b99955 upstream.
    >
    > AutoReporter is going away; recent versions of sphinx emit a warning like:
    >
    > Documentation/sphinx/kerneldoc.py:125:
    > RemovedInSphinx20Warning: AutodocReporter is now deprecated.
    > Use sphinx.util.docutils.switch_source_input() instead.
    >
    > Make the switch. But switch_source_input() only showed up in 1.7, so we
    > have to do ugly version checks to keep things working in older versions.

    Hi,

    this patch breaks our build of kernel-docs on 5.1.*:
    https://build.opensuse.org/package/live_build_log/Kernel:stable/kernel-docs/standard/x86_64

    The error is:
    [ 250s] reST markup error:
    [ 250s]
    /home/abuild/rpmbuild/BUILD/kernel-docs-5.1.8/linux-5.1/Documentation/gpu/i915.rst:403:
    (SEVERE/4) Title level inconsistent:
    [ 250s]
    [ 250s] Global GTT Fence Handling
    [ 250s] ~~~~~~~~~~~~~~~~~~~~~~~~~

    Reverting the patch from 5.1.* makes it work again.

    5.2-rc3 (includes the patch) is OK:
    https://build.opensuse.org/package/live_build_log/Kernel:HEAD/kernel-docs/standard/x86_64

    So 5.1.* must be missing something now.

    > Cc: stable@vger.kernel.org
    > Signed-off-by: Jonathan Corbet <corbet@lwn.net>
    > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    >
    > ---
    > Documentation/sphinx/kerneldoc.py | 34 ++++++++++++++++++++++++++--------
    > 1 file changed, 26 insertions(+), 8 deletions(-)
    >
    > --- a/Documentation/sphinx/kerneldoc.py
    > +++ b/Documentation/sphinx/kerneldoc.py
    > @@ -37,7 +37,17 @@ import glob
    > from docutils import nodes, statemachine
    > from docutils.statemachine import ViewList
    > from docutils.parsers.rst import directives, Directive
    > -from sphinx.ext.autodoc import AutodocReporter
    > +
    > +#
    > +# AutodocReporter is only good up to Sphinx 1.7
    > +#
    > +import sphinx
    > +
    > +Use_SSI = sphinx.__version__[:3] >= '1.7'
    > +if Use_SSI:
    > + from sphinx.util.docutils import switch_source_input
    > +else:
    > + from sphinx.ext.autodoc import AutodocReporter
    >
    > __version__ = '1.0'

    thanks,
    --
    js
    suse labs

    \
     
     \ /
      Last update: 2019-06-10 08:27    [W:3.733 / U:0.124 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site