[libcamera-devel] Documentation: Use language 'en' for Sphinx 5.0.0
diff mbox series

Message ID 20220620125507.57991-1-jacopo@jmondi.org
State Accepted
Commit 10be87fa7c3bfb097b21ca3d469c67e40c333f7e
Headers show
Series
  • [libcamera-devel] Documentation: Use language 'en' for Sphinx 5.0.0
Related show

Commit Message

Jacopo Mondi June 20, 2022, 12:55 p.m. UTC
Recent versions of Sphinx (> 5.0.0) have dropped support for the
'None' keyword as language specifier:

https://www.sphinx-doc.org/en/master/changes.html#release-5-0-0-released-may-30-2022

10474: language does not accept None as it value. The default value of
       language becomes to 'en' now. Patch by Adam Turner and Takeshi
       KOMIYA.

Causing a compile time warning:

WARNING: Invalid configuration value found: 'language = None'.
Update your configuration to a valid language code. Falling
back to 'en' (English).

Change the language setting to 'en' to silence the warning.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 Documentation/conf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Laurent Pinchart June 20, 2022, 1:14 p.m. UTC | #1
Hi Jacopo,

Thank you for the patch.

On Mon, Jun 20, 2022 at 02:55:07PM +0200, Jacopo Mondi via libcamera-devel wrote:
> Recent versions of Sphinx (> 5.0.0) have dropped support for the
> 'None' keyword as language specifier:
> 
> https://www.sphinx-doc.org/en/master/changes.html#release-5-0-0-released-may-30-2022
> 
> 10474: language does not accept None as it value. The default value of
>        language becomes to 'en' now. Patch by Adam Turner and Takeshi
>        KOMIYA.
> 
> Causing a compile time warning:
> 
> WARNING: Invalid configuration value found: 'language = None'.
> Update your configuration to a valid language code. Falling
> back to 'en' (English).
> 
> Change the language setting to 'en' to silence the warning.
> 
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  Documentation/conf.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/conf.py b/Documentation/conf.py
> index 78602c85e33f..7eeea7f3865b 100644
> --- a/Documentation/conf.py
> +++ b/Documentation/conf.py
> @@ -56,7 +56,7 @@ master_doc = 'index'
>  #
>  # This is also used if you do content translation via gettext catalogs.
>  # Usually you set "language" from the command line for these cases.
> -language = None
> +language = 'en'
>  
>  # List of patterns, relative to source directory, that match files and
>  # directories to ignore when looking for source files.
Kieran Bingham June 20, 2022, 3:54 p.m. UTC | #2
Quoting Jacopo Mondi via libcamera-devel (2022-06-20 13:55:07)
> Recent versions of Sphinx (> 5.0.0) have dropped support for the
> 'None' keyword as language specifier:
> 
> https://www.sphinx-doc.org/en/master/changes.html#release-5-0-0-released-may-30-2022
> 
> 10474: language does not accept None as it value. The default value of
>        language becomes to 'en' now. Patch by Adam Turner and Takeshi
>        KOMIYA.
> 
> Causing a compile time warning:
> 
> WARNING: Invalid configuration value found: 'language = None'.
> Update your configuration to a valid language code. Falling
> back to 'en' (English).
> 
> Change the language setting to 'en' to silence the warning.

Well, I think falling back to English is probably useful ;-)


Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> 
> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
> ---
>  Documentation/conf.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/conf.py b/Documentation/conf.py
> index 78602c85e33f..7eeea7f3865b 100644
> --- a/Documentation/conf.py
> +++ b/Documentation/conf.py
> @@ -56,7 +56,7 @@ master_doc = 'index'
>  #
>  # This is also used if you do content translation via gettext catalogs.
>  # Usually you set "language" from the command line for these cases.
> -language = None
> +language = 'en'
>  
>  # List of patterns, relative to source directory, that match files and
>  # directories to ignore when looking for source files.
> -- 
> 2.36.1
>
Jacopo Mondi June 20, 2022, 4:14 p.m. UTC | #3
Hi Kieran

On Mon, Jun 20, 2022 at 04:54:34PM +0100, Kieran Bingham wrote:
> Quoting Jacopo Mondi via libcamera-devel (2022-06-20 13:55:07)
> > Recent versions of Sphinx (> 5.0.0) have dropped support for the
> > 'None' keyword as language specifier:
> >
> > https://www.sphinx-doc.org/en/master/changes.html#release-5-0-0-released-may-30-2022
> >
> > 10474: language does not accept None as it value. The default value of
> >        language becomes to 'en' now. Patch by Adam Turner and Takeshi
> >        KOMIYA.
> >
> > Causing a compile time warning:
> >
> > WARNING: Invalid configuration value found: 'language = None'.
> > Update your configuration to a valid language code. Falling
> > back to 'en' (English).
> >
> > Change the language setting to 'en' to silence the warning.
>
> Well, I think falling back to English is probably useful ;-)
>

It is, but it triggers a warning and -Werror causes the build to fail

>
> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
>
> >
> > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
> > ---
> >  Documentation/conf.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/Documentation/conf.py b/Documentation/conf.py
> > index 78602c85e33f..7eeea7f3865b 100644
> > --- a/Documentation/conf.py
> > +++ b/Documentation/conf.py
> > @@ -56,7 +56,7 @@ master_doc = 'index'
> >  #
> >  # This is also used if you do content translation via gettext catalogs.
> >  # Usually you set "language" from the command line for these cases.
> > -language = None
> > +language = 'en'
> >
> >  # List of patterns, relative to source directory, that match files and
> >  # directories to ignore when looking for source files.
> > --
> > 2.36.1
> >
Kieran Bingham June 20, 2022, 4:17 p.m. UTC | #4
Quoting Jacopo Mondi (2022-06-20 17:14:01)
> Hi Kieran
> 
> On Mon, Jun 20, 2022 at 04:54:34PM +0100, Kieran Bingham wrote:
> > Quoting Jacopo Mondi via libcamera-devel (2022-06-20 13:55:07)
> > > Recent versions of Sphinx (> 5.0.0) have dropped support for the
> > > 'None' keyword as language specifier:
> > >
> > > https://www.sphinx-doc.org/en/master/changes.html#release-5-0-0-released-may-30-2022
> > >
> > > 10474: language does not accept None as it value. The default value of
> > >        language becomes to 'en' now. Patch by Adam Turner and Takeshi
> > >        KOMIYA.
> > >
> > > Causing a compile time warning:
> > >
> > > WARNING: Invalid configuration value found: 'language = None'.
> > > Update your configuration to a valid language code. Falling
> > > back to 'en' (English).
> > >
> > > Change the language setting to 'en' to silence the warning.
> >
> > Well, I think falling back to English is probably useful ;-)
> >
> 
> It is, but it triggers a warning and -Werror causes the build to fail

Sorry - I meant 'explicitly falling back, as with your patch'

> 
> >
> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> >
> > >
> > > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
> > > ---
> > >  Documentation/conf.py | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/Documentation/conf.py b/Documentation/conf.py
> > > index 78602c85e33f..7eeea7f3865b 100644
> > > --- a/Documentation/conf.py
> > > +++ b/Documentation/conf.py
> > > @@ -56,7 +56,7 @@ master_doc = 'index'
> > >  #
> > >  # This is also used if you do content translation via gettext catalogs.
> > >  # Usually you set "language" from the command line for these cases.
> > > -language = None
> > > +language = 'en'
> > >
> > >  # List of patterns, relative to source directory, that match files and
> > >  # directories to ignore when looking for source files.
> > > --
> > > 2.36.1
> > >

Patch
diff mbox series

diff --git a/Documentation/conf.py b/Documentation/conf.py
index 78602c85e33f..7eeea7f3865b 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -56,7 +56,7 @@  master_doc = 'index'
 #
 # This is also used if you do content translation via gettext catalogs.
 # Usually you set "language" from the command line for these cases.
-language = None
+language = 'en'
 
 # List of patterns, relative to source directory, that match files and
 # directories to ignore when looking for source files.