From: Jonathan Corbet <corbet@lwn.net>
To: Randy Dunlap <rdunlap@infradead.org>,
Claudio Cambra <developer@claudiocambra.com>,
skhan@linuxfoundation.org, ivan.orlov0322@gmail.com,
linux-kernel-mentees@lists.linuxfoundation.org,
linux-kernel@vger.kernel.org,
Linux Doc Mailing List <linux-doc@vger.kernel.org>
Subject: Re: [PATCH] docs: Fix Sphinx 8 warning caused by paths represented with strings
Date: Tue, 03 Oct 2023 10:31:10 -0600 [thread overview]
Message-ID: <87y1gjd5wx.fsf@meer.lwn.net> (raw)
In-Reply-To: <5fd1b5cd-ea6c-44a1-9cb5-8f692d32ec99@infradead.org>
Randy Dunlap <rdunlap@infradead.org> writes:
> 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 <developer@claudiocambra.com>
>> ---
>> 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/
I have, in fact, applied that other patch.
Thanks,
jon
prev parent reply other threads:[~2023-10-03 16:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-24 18:40 Claudio Cambra
2023-09-24 18:47 ` Randy Dunlap
2023-10-03 16:31 ` Jonathan Corbet [this message]
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=87y1gjd5wx.fsf@meer.lwn.net \
--to=corbet@lwn.net \
--cc=developer@claudiocambra.com \
--cc=ivan.orlov0322@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=skhan@linuxfoundation.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
all inboxes | Powered by JetHome®