[v2] doc: fix build with python 3.8
diff mbox series

Message ID 20191211110140.1290875-1-thomas@monjalon.net
State Accepted, archived
Headers show
Series
  • [v2] doc: fix build with python 3.8
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/travis-robot success Travis build: passed
ci/checkpatch success coding style OK

Commit Message

Thomas Monjalon Dec. 11, 2019, 11:01 a.m. UTC
After upgrading to python-3.8.0, a syntax mismatch is revealed:

doc/guides/conf.py:240: SyntaxWarning: "is not" with a literal.
    Did you mean "!="?
    if value is not '':

Removing "is not ''" seems the right thing to do.

A patch may also be needed in the RTD theme package:
https://github.com/readthedocs/sphinx_rtd_theme/commit/a49a812c.diff
(not included in release 0.4.3)

Fixes: 9db3f52126fb ("doc: generate NIC overview table from ini files")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
v1: if value != ''
v2: if value
---
 doc/guides/conf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bruce Richardson Dec. 11, 2019, 11:15 a.m. UTC | #1
On Wed, Dec 11, 2019 at 12:01:40PM +0100, Thomas Monjalon wrote:
> After upgrading to python-3.8.0, a syntax mismatch is revealed:
> 
> doc/guides/conf.py:240: SyntaxWarning: "is not" with a literal.
>     Did you mean "!="?
>     if value is not '':
> 
> Removing "is not ''" seems the right thing to do.
> 
> A patch may also be needed in the RTD theme package:
> https://github.com/readthedocs/sphinx_rtd_theme/commit/a49a812c.diff
> (not included in release 0.4.3)
> 
> Fixes: 9db3f52126fb ("doc: generate NIC overview table from ini files")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Thomas Monjalon Dec. 12, 2019, 10:27 p.m. UTC | #2
11/12/2019 12:15, Bruce Richardson:
> On Wed, Dec 11, 2019 at 12:01:40PM +0100, Thomas Monjalon wrote:
> > After upgrading to python-3.8.0, a syntax mismatch is revealed:
> > 
> > doc/guides/conf.py:240: SyntaxWarning: "is not" with a literal.
> >     Did you mean "!="?
> >     if value is not '':
> > 
> > Removing "is not ''" seems the right thing to do.
> > 
> > A patch may also be needed in the RTD theme package:
> > https://github.com/readthedocs/sphinx_rtd_theme/commit/a49a812c.diff
> > (not included in release 0.4.3)
> > 
> > Fixes: 9db3f52126fb ("doc: generate NIC overview table from ini files")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> 
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Applied

Patch
diff mbox series

diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index e2b52e2df9..0892c06dec 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -237,7 +237,7 @@  def generate_overview_table(output_filename, table_id, section, table_name, titl
                                                                 ini_filename))
                 continue
 
-            if value is not '':
+            if value:
                 # Get the first letter only.
                 ini_data[ini_filename][name] = value[0]