[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHhkmma2uKdnDCCidRVd0pF-xJRPDL_f5qfYos5vpcUE6cXdJA@mail.gmail.com>
Date: Sun, 10 Sep 2023 00:37:27 -0400
From: Oliver F <erer1243@...il.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] docs/sphinx: Explicitly convert Sphinx paths to str
On Sun, Sep 10, 2023 at 12:19 AM Matthew Wilcox <willy@...radead.org> wrote:
>
> On Sun, Sep 10, 2023 at 12:08:06AM -0400, Oliver Faso wrote:
> > else:
> > - doc = env.srcdir + "/" + env.docname + ":" + str(self.lineno)
> > + doc = str(env.srcdir) + "/" + env.docname + ":" + str(self.lineno)
>
> Would we be better off doing the path manipulation in Path, then converting
> to string? ie:
>
> doc = str(env.srcdir / env.docname) + ":" + str(self.lineno)
>
That would be incompatible with earlier Sphinx versions, which most
people are probably using.
The benefits would be supporting non-'/' separators, and invalid uft8 in paths.
But, I think those things don't matter here.
(sorry Matthew for double mail, I hit the wrong reply button)
Powered by blists - more mailing lists