mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Matthew Wilcox <willy@infradead.org>
Cc: Jonathan Corbet <corbet@lwn.net>,
	Jani Nikula <jani.nikula@intel.com>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Documentation/sphinx: Fix Directive import error
Date: Fri, 02 Mar 2018 15:55:06 +0100	[thread overview]
Message-ID: <s5hr2p2frxx.wl-tiwai@suse.de> (raw)
In-Reply-To: <20180302145055.GA18137@bombadil.infradead.org>

On Fri, 02 Mar 2018 15:50:55 +0100,
Matthew Wilcox wrote:
> 
> On Fri, Mar 02, 2018 at 12:49:03PM +0100, Takashi Iwai wrote:
> > I'm no expert of sphinx nor python, so something might be wrong.
> > Please check it.
> 
> I'm also not a pythonista, but ...
> 
> > --- a/Documentation/sphinx/kerneldoc.py
> > +++ b/Documentation/sphinx/kerneldoc.py
> > @@ -37,7 +37,10 @@ import glob
> >  from docutils import nodes, statemachine
> >  from docutils.statemachine import ViewList
> >  from docutils.parsers.rst import directives
> > -from sphinx.util.compat import Directive
> > +try:
> > +    from sphinx.util.compat import Directive
> > +except ImportError:
> > +    from docutils.parsers.rst import directives, Directive
> 
> It seems to me the previous line already imported
> docutils.parsers.rst.directives, and we should probably prefer the newer
> parser even with Sphinx 1.6, so I would think this would work better:
> 
> -from sphinx.util.compat import Directive
> +try:
> +    from docutils.parsers.rst import Directive
> +except ImportError:
> +    from sphinx.util.compat import Directive
> 
> (it works on Debian with Sphinx 1.6.7)

Makes more sense, yes.

Jon, would you like me resending the patch?  Or it's trivial enough as
you can fix in place.


thanks,

Takashi

  reply	other threads:[~2018-03-02 14:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-02 11:49 Takashi Iwai
2018-03-02 14:50 ` Matthew Wilcox
2018-03-02 14:55   ` Takashi Iwai [this message]
2018-03-02 15:17     ` Jonathan Corbet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hr2p2frxx.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=corbet@lwn.net \
    --cc=jani.nikula@intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome