Re: [PATCH 0/8] docs: Fixes for recent versions of Sphinx

From: Mauro Carvalho Chehab
Date: Thu May 23 2019 - 06:41:36 EST


Em Thu, 23 May 2019 12:15:34 +0200
Oleksandr Natalenko <oleksandr@xxxxxxxxxx> escreveu:

> On Thu, May 23, 2019 at 01:13:23PM +0300, Jani Nikula wrote:
> > On Thu, 23 May 2019, Oleksandr Natalenko <oleksandr@xxxxxxxxxx> wrote:
> > > Thanks for the efforts. I've run this on top of Linus' tree, and the
> > > only sphinx-related deprecation warning I've spotted is this one:
> > >
> > > /home/onatalen/work/src/linux/Documentation/sphinx/cdomain.py:51: RemovedInSphinx30Warning: app.override_domain() is deprecated. Use app.add_domain() with override option instead.
> > > app.override_domain(CDomain)
> > >
> > > Otherwise, it builds.
> >
> > Please share your Sphinx version (sphinx-build --version).
>
> [~]$ sphinx-build --version
> sphinx-build 2.0.1
>

Same here with vanilla 2.0.0 (installed via pip3):

Running Sphinx v2.0.0
/devel/v4l/docs/Documentation/sphinx/cdomain.py:51: RemovedInSphinx30Warning: app.override_domain() is deprecated. Use app.add_domain() with override option instead.
app.override_domain(CDomain)

It seems that this message is there since 1.8:

https://www.sphinx-doc.org/en/1.8/_modules/sphinx/application.html

The fix seems to be trivial: just replace it to:

app.add_domain(domain, override=True)

Thanks,
Mauro