From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967961AbeCBQm6 (ORCPT ); Fri, 2 Mar 2018 11:42:58 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:41856 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967452AbeCBQmz (ORCPT ); Fri, 2 Mar 2018 11:42:55 -0500 Date: Fri, 2 Mar 2018 08:42:54 -0800 From: Matthew Wilcox To: Jani Nikula Cc: Takashi Iwai , Jonathan Corbet , Jiri Slaby , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] Documentation/sphinx: Fix Directive import error Message-ID: <20180302164254.GB31400@bombadil.infradead.org> References: <20180302152831.11510-1-tiwai@suse.de> <871sh2v53l.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <871sh2v53l.fsf@intel.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 02, 2018 at 06:01:50PM +0200, Jani Nikula wrote: > On Fri, 02 Mar 2018, Takashi Iwai wrote: > > The sphinx.util.compat for Directive stuff was deprecated in the > > recent Sphinx version, and now we get a build error. > > > > Let's import from the new place, docutils.parsers.rst, while keeping > > the old sphinx.util.compat as fallback. > > > > Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=1083694 > > Signed-off-by: Takashi Iwai > > --- > > v1->v2: Change the fallback order as Matthew suggested, the new one at first > > So this crossed my mind as well... and then I thought it'll probably > succeed on older Sphinx, and the fallback is not needed. The question > is, are these equal? Can we just import from docutils.parsers.rst? I found a github page which implies that docutils.parsers.rst.Directive was added 12 years ago (!) so we're probably safe to rely on it: https://github.com/docutils-mirror/docutils/commit/9649abee47b4ce4db51be1d90fcb1fb500fa78b3 Again, I'm no pythonista, so I may have muddled this.