Received: by 10.223.185.116 with SMTP id b49csp256876wrg; Fri, 2 Mar 2018 18:26:55 -0800 (PST) X-Google-Smtp-Source: AG47ELvu+68QTq+XOrXV7laQq23j5+z/6KO8MYHgqMGYRFNm4osVEay7heeIbWaIyUgjF0y2ISLe X-Received: by 2002:a17:902:167:: with SMTP id 94-v6mr7114521plb.294.1520044014951; Fri, 02 Mar 2018 18:26:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520044014; cv=none; d=google.com; s=arc-20160816; b=bg3tsaGh506FLljXrH52PE/mrBQHPY+cc/1gIZwJ04WwY9gnhDCB1XmbvPgnRIHSJl 18K1VV8cCr1R6f4aSuxC7F5E7Zp8D/qggZieAepvSn9t/N1UYlcqsH6hFp9qhrUwU1F3 CY6VU5z/bM5qnjbhIQ6BhgD+PtehxYx7Axd4OKqenHM7KFsri/u0kiLK4L3+j6zbHrNV 20U71FAsXRGjk3J+vcNaE0hegI0kaGFfEccHRjo+heLBTu0f6L5do8NufhTMk6VnSuY8 XrS+owxXX9t98B0rww3vnqEsgm0fyHu55R9mycdvVRCJLnShGdMCZ7Zg5IN3Mnqj5TiW RdVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=8S5jzo+uofDkl7gAViByLwoC7Tz/SRGIimxjIeg4lqA=; b=nFiXhz4Ng5NjoMRu2gx4NtEpqD8v/6f0GUTx1PIJDImGEeGvYbi9h732jeVnskKCOg ZaiaJnjeKHsRB6tLFxsN285fbmzPrAW36LlhxhPl2CZrqio3H65ONSdd4M9Ggj770Q9h fdBwgWWbHaYp2m3kGo8wicwX/JodWdyt/W6pXBVhFrNQ8va38aeS3vnuYbLQcWEzPu51 NanDCbqNncs8acWXp3zhIFCw9isg4ipUcHstXQ13c3Fk0LZ9eTp+qanG8ktcTt7vhQoA 6z9hPvpHsoNwXxsqP5Z2DApTYq671tZvXj2SQd5GJLQcjLQE81JWGp52D6sCHZnUpAR9 cPmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=stN4H0R2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h186si4797460pge.814.2018.03.02.18.26.39; Fri, 02 Mar 2018 18:26:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=stN4H0R2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1165150AbeCBS2i (ORCPT + 99 others); Fri, 2 Mar 2018 13:28:38 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:51060 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162994AbeCBS2g (ORCPT ); Fri, 2 Mar 2018 13:28:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=8S5jzo+uofDkl7gAViByLwoC7Tz/SRGIimxjIeg4lqA=; b=stN4H0R2Yp0pJjENkTMvFBFAp cszyDW2xpL26p/TWpCv67bHS8eqRNTvcGSeyQgj+6ha//vtgq/VU2U1B8LdRhMLJjg1Vh0xbNCndv wRArTksZL92NlJmh3+SgjQ8oDO1mqmQ7Uc/ZNt0AS12iKYJ4rscEVKLQmZIgS9iZGOroqDeNffL0j 9aznPKHTinXjoxFJjt4rTWLspDgVKW1a2/Kbi9/0HnvrNZ6S5SkMrkfkcML2z4vjoJyY2MGjUukYz Pg9YsyBbv1I7e356FCXXHjTyUaG1eRFS9fIX1WgpbE6UOXy4BNepd9vip0zBuyH1O/EsRlvkLj+YB 3QP3V/AGQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.89 #1 (Red Hat Linux)) id 1erpPz-0006p0-Vd; Fri, 02 Mar 2018 18:28:31 +0000 Date: Fri, 2 Mar 2018 10:28:31 -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: <20180302182831.GF31400@bombadil.infradead.org> References: <20180302152831.11510-1-tiwai@suse.de> <871sh2v53l.fsf@intel.com> <20180302164254.GB31400@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180302164254.GB31400@bombadil.infradead.org> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 02, 2018 at 08:42:54AM -0800, Matthew Wilcox wrote: > 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. I spent some time delving through the Sphinx codebase. The compat version was added so you could use Directive with docutils 0.4 onwards. docutils 0.5 onwards has Directive. So as long as we're comfortable mandating docutils from 2009, we're fine ;-)