Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp888102rdh; Sun, 24 Sep 2023 17:05:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHfLUAwQiC8j0zpChoSJsxd/QL3JHNpAeIiKvktM5KuF4xAjk4y854FbPHnV0b5k2jK8iJw X-Received: by 2002:a05:6a20:9383:b0:13d:17cc:5bca with SMTP id x3-20020a056a20938300b0013d17cc5bcamr4217277pzh.18.1695600345359; Sun, 24 Sep 2023 17:05:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695600345; cv=none; d=google.com; s=arc-20160816; b=Vl2RZnt9n64eIcrbSCEaIIedzckK0QaEd+7xpxEm0peTxmsl4RHB3uMPMYxNiKVVD4 1EDMCtvzmg/OwuJG2YXChCB8CD5zvtoPaA520c48tbn2jE28Ua9IWkVNfRus8F2SrG0l lDZv0Lci/mqP6MjsxEI5H846bnKdsXglgHlbj7KnWdPSYJfaLZWa5ATwSGHYiuTZA3Z8 A9qWq8HwWm7+AhWYekAi7BZG8JhF+jiXHNeMPGYGW3djI9G3jJu0w0g372EFo68eTj2J hftrqpWkdu+ZV6of1yaOjcW6qjWogQgdzxUrUOtSOgl8LTPYb7t/aJAQJmE9iGmufr4f m8dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=BKloag/y3wObRwoHJ5YrsbKpoVh/LwWhJ9+J5Kji/kA=; fh=roiTNmTgwCJVcifDOH9ij1uK0CcwS7CJQgu6Iy+LGwA=; b=AX2xzHll9lZc8M0aRQQOOmwm1wvDFIv5csWtjBR8n1a2x5uIRe7jDQ2VQVHSWk5HD9 jxrhSTajK5233VzdkSzP1o8Pl54brwAGxtr+MFuwDnpGyzcooX7bWNoZ0aW5UQFy28Pe 9f/eogU+Qcy2GYthC1VRVJXFKdIFRgDa6F7WARyuCCAvja9N8ElnvG8qMrWAAAXx9lCA NLCtABQjuUY+VAPAmrnGqbuJsgiHMl6hzIr9RoCFrqmN8ti8R65welfj8L1yY8JPBC87 gsmBxmQejqGTgoVd24yz2hgh16NOsM6P7vmITIEuK+Jn+52T7+uD5dt5FZZgT173Jdrt zCaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Ep28kp7t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id t4-20020a17090340c400b001bf5c12e9a5si8849774pld.166.2023.09.24.17.05.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 17:05:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Ep28kp7t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id C76C5818CCAA; Sun, 24 Sep 2023 11:48:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230345AbjIXSry (ORCPT + 99 others); Sun, 24 Sep 2023 14:47:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229930AbjIXSrx (ORCPT ); Sun, 24 Sep 2023 14:47:53 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CCC9CE; Sun, 24 Sep 2023 11:47:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Cc:Content-ID:Content-Description; bh=BKloag/y3wObRwoHJ5YrsbKpoVh/LwWhJ9+J5Kji/kA=; b=Ep28kp7txgrei0cOh+31XEsElD Uzwgq+koccxwXa1ObQO23d5sYB4Mph+b1oeOUNSb2h6RnIjDZIzDvvd7uPk7xDuudb8zVlt6bKMq1 DPKPtF06yTZoz5t7kgbR8zQJ8+eOjjD5zph9fkQM2VCSsisTEhUYdZasvccGWPNS9A6CZfaqZzqN/ luTLjZ5FjgSdAPDsGzlMlGlod+KZZmZcqd0gVrqdQVT8rGiFU9j2rEFZhbW0zbiey7J12WBgUZMFD dEJRrFzEaWxHlmawN2s+VcEbRk7ce1rfJdw+FnlbMwiEFxa3IWyD2tfa1VWTl//5gKhkVFhGeMGU3 krnWPfrQ==; Received: from [2601:1c2:980:9ec0::9fed] by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qkU8r-00Cbfy-1j; Sun, 24 Sep 2023 18:47:41 +0000 Message-ID: <5fd1b5cd-ea6c-44a1-9cb5-8f692d32ec99@infradead.org> Date: Sun, 24 Sep 2023 11:47:37 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] docs: Fix Sphinx 8 warning caused by paths represented with strings Content-Language: en-US To: Claudio Cambra , skhan@linuxfoundation.org, ivan.orlov0322@gmail.com, linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org, Linux Doc Mailing List , Jonathan Corbet References: <20230924184057.91861-1-developer@claudiocambra.com> From: Randy Dunlap In-Reply-To: <20230924184057.91861-1-developer@claudiocambra.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sun, 24 Sep 2023 11:48:11 -0700 (PDT) Hi, On 9/24/23 11:40, Claudio Cambra wrote: > Running "make htmldocs" generates several lines of this warning: > > Documentation/sphinx/kerneldoc.py:141: RemovedInSphinx80Warning: Sphinx 8 will drop support for representing paths as strings. Use "pathlib.Path" or "os.fspath" instead. > doc = (env.srcdir + "/" + env.docname + ":" + str(self.lineno)) > > Making "doc" an fspath type and creating a new variable with the > appended colon and lineno fixes this warning. > > Signed-off-by: Claudio Cambra > --- > Documentation/sphinx/kerneldoc.py | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerneldoc.py > index 9395892c7ba3..e2c835e10dba 100644 > --- a/Documentation/sphinx/kerneldoc.py > +++ b/Documentation/sphinx/kerneldoc.py > @@ -138,7 +138,8 @@ class KernelDocDirective(Directive): > lineoffset = int(match.group(1)) - 1 > # we must eat our comments since the upset the markup > else: > - doc = env.srcdir + "/" + env.docname + ":" + str(self.lineno) > + doc = os.path.join(env.srcdir, env.docname) > + doc_with_line = (doc + ":" + str(self.lineno)) > result.append(line, doc + ": " + filename, lineoffset) > lineoffset += 1 > This patch should be sent to the linux-doc@vger.kernel.org mailing list, with the Documentation maintainer copied on the patch. We also have this similar patch to consider: https://lore.kernel.org/linux-doc/20230910040811.53046-1-erer1243@gmail.com/ Thanks. -- ~Randy